[Clang][Sema] Start fixing handling of out-of-line definitions of constrained templates
authorAlexander Shaposhnikov <ashaposhnikov@google.com>
Fri, 10 Mar 2023 09:10:37 +0000 (09:10 +0000)
committerAlexander Shaposhnikov <ashaposhnikov@google.com>
Fri, 10 Mar 2023 09:21:09 +0000 (09:21 +0000)
commit421c098b32bd50122de8de03a71092c7f36994eb
tree1a116f71657411f359946207b3edb8e1522282e2
parentbf00eda69f4b7044f8eb37027485986883516780
[Clang][Sema] Start fixing handling of out-of-line definitions of constrained templates

This diff starts fixing our handling of out-of-line definitions of constrained templates.
Initially it was motivated by https://github.com/llvm/llvm-project/issues/49620 and
https://github.com/llvm/llvm-project/issues/60231.
In particular, this diff adjusts Sema::computeDeclContext to work properly in the case of
constrained template parameters.

Test plan:
1/ ninja check-all
2/ Bootstrapped Clang passes all the tests
3/ Internal testing

Differential revision: https://reviews.llvm.org/D145034
clang/docs/ReleaseNotes.rst
clang/include/clang/Parse/Parser.h
clang/include/clang/Sema/DeclSpec.h
clang/lib/Parse/ParseDecl.cpp
clang/lib/Parse/ParseDeclCXX.cpp
clang/lib/Sema/SemaCXXScopeSpec.cpp
clang/test/CXX/temp/temp.decls/temp.class.spec/temp.class.spec.mfunc/p1-neg.cpp
clang/test/SemaTemplate/concepts-out-of-line-def.cpp [new file with mode: 0644]