Correct deferred concepts with NTTP placeholder constraints
authorErich Keane <erich.keane@intel.com>
Wed, 29 Mar 2023 19:17:25 +0000 (12:17 -0700)
committerErich Keane <erich.keane@intel.com>
Thu, 30 Mar 2023 13:15:02 +0000 (06:15 -0700)
commit18fe66396906178872dd933a39e38779a5a3c722
tree3808466d633a79cdb1f1a854a8177a757678990a
parent1f04aebb03057c9bfbf3117bbbb0b83a85f62d0b
Correct deferred concepts with NTTP placeholder constraints

Seemingly we never tested this, but the constraint on a NTTP was being
swtiched to the 'instantiated' version, but constraints need to be
relative to the 'top level', so this was causing us to not be able to
check the constraint on final use.

This patch corrects the issue by making the constraint created with the
un-instantiated version in the case of dependent constraint attachment.

Fixes: #61777
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaTemplate.cpp
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clang/test/SemaTemplate/concepts.cpp