PR45294: Fix handling of assumed template names looked up in the lexical
authorRichard Smith <richard@metafoo.co.uk>
Sat, 28 Mar 2020 03:59:49 +0000 (20:59 -0700)
committerRichard Smith <richard@metafoo.co.uk>
Sat, 28 Mar 2020 04:07:06 +0000 (21:07 -0700)
commit499b2a8d63ca9b319ce3aae462029f37ce7d96dd
treef03b62a55576ddb615ce3f5fd49438b793424af3
parent9dd92a569721a3a37e32387b6677a2c023c32eea
PR45294: Fix handling of assumed template names looked up in the lexical
scope.

There are a few contexts in which we assume a name is a template name;
if such a context is one where we should perform an unqualified lookup,
and lookup finds nothing, we would form a dependent template name even
if the name is not dependent. This happens in particular for the lookup
of a pseudo-destructor.

In passing, rename ActOnDependentTemplateName to just ActOnTemplateName
given that we apply it for non-dependent template names too.
clang/include/clang/Basic/DiagnosticSemaKinds.td
clang/lib/Parse/ParseExprCXX.cpp
clang/lib/Parse/Parser.cpp
clang/lib/Sema/SemaTemplate.cpp
clang/test/Parser/cxx-decl.cpp
clang/test/SemaCXX/literal-operators.cpp
clang/test/SemaCXX/pseudo-destructors.cpp
clang/test/SemaTemplate/nested-name-spec-template.cpp