[clang-repl] Consider the scope spec in template lookups for deduction guides.
commit2c4620c1dadc032f968ce0aa835a441f268a8cdb
authorVassil Vassilev <v.g.vassilev@gmail.com>
Mon, 8 May 2023 10:48:03 +0000 (8 10:48 +0000)
committerVassil Vassilev <v.g.vassilev@gmail.com>
Mon, 8 May 2023 17:54:56 +0000 (8 17:54 +0000)
tree1744f3e07224de93975100b80211b3c362934328
parent25cc5a71b3a2f197fd3c31eeba1eeb1711b93de2
[clang-repl] Consider the scope spec in template lookups for deduction guides.

isDeductionGuideName looks up the underlying template and if the template name
is qualified we miss that qualification resulting in an error. This issue
resurfaced in clang-repl where we call isDeductionGuideName more often to
distinguish between if we had a statement or declaration.

This patch passes the CXXScopeSpec information down to LookupTemplateName to
make the lookup more precise.

Differential revision: https://reviews.llvm.org/D147319
clang/include/clang/Sema/Sema.h
clang/lib/Parse/ParseDecl.cpp
clang/lib/Parse/ParseExprCXX.cpp
clang/lib/Parse/ParseTentative.cpp
clang/lib/Sema/SemaTemplate.cpp
clang/test/Interpreter/disambiguate-decl-stmt.cpp