[clang] Implement sugared substitution changes to infrastructure
authorMatheus Izvekov <mizvekov@gmail.com>
Sun, 25 Sep 2022 15:18:39 +0000 (17:18 +0200)
committerMatheus Izvekov <mizvekov@gmail.com>
Wed, 26 Oct 2022 01:21:15 +0000 (03:21 +0200)
commitc4c2a3c65684e062efcd101a957c6cae0a304a7a
treea1f55ab1301fffdd41760662a1bdcbdb30e3b8c1
parent531219865464146010d9611d6d7515499e109b5a
[clang] Implement sugared substitution changes to infrastructure

Implements the changes required to perform substitution with
non-canonical template arguments, and to 'finalize' them
by not placing 'Subst' nodes.

A finalized substitution means we won't resugar them later,
because these templates themselves were eagerly substituted
with the intended arguments at the point of use. We may still
resugar other templates used within those, though.

This patch does not actually implement any uses of this
functionality, those will be added in subsequent patches,
so expect no changes to existing tests.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D134604
22 files changed:
clang/include/clang/AST/ASTContext.h
clang/include/clang/AST/PropertiesBase.td
clang/include/clang/AST/TemplateName.h
clang/include/clang/AST/Type.h
clang/include/clang/AST/TypeProperties.td
clang/include/clang/Sema/Sema.h
clang/include/clang/Sema/Template.h
clang/lib/AST/ASTContext.cpp
clang/lib/AST/ASTImporter.cpp
clang/lib/AST/TemplateName.cpp
clang/lib/AST/Type.cpp
clang/lib/Sema/SemaConcept.cpp
clang/lib/Sema/SemaExprCXX.cpp
clang/lib/Sema/SemaTemplate.cpp
clang/lib/Sema/SemaTemplateDeduction.cpp
clang/lib/Sema/SemaTemplateInstantiate.cpp
clang/lib/Sema/SemaTemplateInstantiateDecl.cpp
clang/lib/Sema/SemaType.cpp
clang/lib/Sema/TreeTransform.h
clang/lib/Sema/TypeLocBuilder.cpp
clang/lib/Sema/TypeLocBuilder.h
clang/test/SemaTemplate/nested-name-spec-template.cpp