[clang] AST: SubstTemplateTypeParmType support for non-canonical underlying type
authorMatheus Izvekov <mizvekov@gmail.com>
Sun, 28 Aug 2022 20:26:01 +0000 (22:26 +0200)
committerMatheus Izvekov <mizvekov@gmail.com>
Wed, 21 Sep 2022 12:22:19 +0000 (14:22 +0200)
commitef4bbfe338bd85a9938d47c2d65f0eef874a6f7c
tree2922354300281684bef5dd82c30d1b490ac0e39b
parent54d81e49e3b72f6a305891fe169ecd7c6f559223
[clang] AST: SubstTemplateTypeParmType support for non-canonical underlying type

This change allows us to represent in the AST some specific
circumstances where we substitute a template parameter type
which is part of the underlying type of a previous substitution.

This presently happens in some circumstances dealing with
substitution of defaulted parameters of template template
parameters, and in some other cases during concepts substitution.

The main motivation for this change is for the future use in the
implementation of template specialization resugaring, as this will
allow us to represent a substitution with sugared types.

Signed-off-by: Matheus Izvekov <mizvekov@gmail.com>
Differential Revision: https://reviews.llvm.org/D132816
clang/include/clang/AST/Type.h
clang/include/clang/AST/TypeProperties.td
clang/lib/AST/ASTContext.cpp
clang/lib/AST/ASTImporter.cpp
clang/lib/AST/Type.cpp
clang/lib/Sema/SemaTemplate.cpp
clang/lib/Sema/TreeTransform.h
clang/test/AST/ast-dump-template-decls.cpp