[clang] Instantiate NTTPs and template default arguments with sugar
authorMatheus Izvekov <mizvekov@gmail.com>
Sun, 23 Oct 2022 11:41:57 +0000 (13:41 +0200)
committerMatheus Izvekov <mizvekov@gmail.com>
Wed, 26 Oct 2022 01:22:22 +0000 (03:22 +0200)
commit2560c1266993af6e6c15900ce673c6db23132f8b
tree655b0a3015cbf16c2e4b5546ba219ecba705272c
parentc4c2a3c65684e062efcd101a957c6cae0a304a7a
[clang] Instantiate NTTPs and template default arguments with sugar

This makes use of the changes introduced in D134604, in order to
instantiate non-type template parameters and default template arguments
with a final sugared substitution.

This comes at no additional relevant cost.
Since we don't track / unique them in specializations, we wouldn't be
able to resugar them later anyway.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D136564
clang/include/clang/Sema/Sema.h
clang/lib/Sema/SemaTemplate.cpp
clang/lib/Sema/SemaTemplateDeduction.cpp
clang/test/AST/ast-dump-template-decls.cpp
clang/test/CXX/drs/dr3xx.cpp
clang/test/CXX/expr/expr.const/p3-0x.cpp
clang/test/Misc/diag-template-diffing.cpp
clang/test/SemaTemplate/instantiation-default-1.cpp
clang/test/SemaTemplate/make_integer_seq.cpp