[Clang][Sema] Substitute constraints only for declarations with different lexical...
authorAlexander Shaposhnikov <ashaposhnikov@google.com>
Wed, 17 May 2023 21:02:02 +0000 (21:02 +0000)
committerAlexander Shaposhnikov <ashaposhnikov@google.com>
Wed, 17 May 2023 21:24:44 +0000 (21:24 +0000)
commit122b938944ceb966e04d7a4d253f7f9ba27c477d
tree4e28e6b29bfacbb5b8f46e4eb23f47e3e934b165
parenta0615d020a02e252196383439e2c8143c6525e05
[Clang][Sema] Substitute constraints only for declarations with different lexical contexts

Substitute constraints only for declarations with different lexical contexts.
This results in avoiding the substitution of constraints during the redeclaration check
inside a class (and by product caching the wrong substitution result).

Test plan: ninja check-all

Differential revision: https://reviews.llvm.org/D150730
clang/lib/Sema/SemaConcept.cpp
clang/test/SemaTemplate/concepts-no-early-substitution.cpp [new file with mode: 0644]