[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>
Mon, 31 Oct 2022 16:57:18 +0000 (17:57 +0100)
commitab1140874fc6ab8ceb55a470489b80d953e1c6a6
tree272f0e3e5c68bb6dc5eb1ee9d3af5e55a2b24aca
parent5f820c0f55cd9d4f4520cc92eae0a1c4afe05a54
[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