forked from OSchip/llvm-project
e50bf75196
Crash reported in PR28023 is caused by the fact that non-type template parameters are found by tag name lookup. In the code provided in that PR: template<int V> struct A { struct B { template <int> friend struct V; }; }; the template parameter V is found when lookup for redeclarations of 'struct V' is made. Latter on the error about shadowing of 'V' is emitted but the semantic context of 'struct V' is already determined wrong: 'struct A' instead of translation unit. The fix moves the check for shadowing toward the beginning of the method and thus prevents from wrong context calculations. This change fixes PR28023. llvm-svn: 272366 |
||
---|---|---|
.. | ||
temp.dep | ||
temp.dep.res/temp.point | ||
temp.local |