[all-commits] [llvm/llvm-project] 639a7a: [Clang][AST] Store injected template arguments in ...
Krystian Stasiowski via All-commits
all-commits at lists.llvm.org
Tue Oct 29 10:37:17 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 639a7ac648f1e50ccd2556e17d401c04f9cce625
https://github.com/llvm/llvm-project/commit/639a7ac648f1e50ccd2556e17d401c04f9cce625
Author: Krystian Stasiowski <sdkrystian at gmail.com>
Date: 2024-10-29 (Tue, 29 Oct 2024)
Changed paths:
M clang/include/clang/AST/ASTContext.h
M clang/include/clang/AST/DeclTemplate.h
M clang/lib/AST/ASTContext.cpp
M clang/lib/AST/DeclTemplate.cpp
M clang/lib/Sema/SemaTemplateDeduction.cpp
M clang/lib/Sema/SemaTemplateInstantiate.cpp
Log Message:
-----------
[Clang][AST] Store injected template arguments in TemplateParameterList (#113579)
Currently, we store injected template arguments in
`RedeclarableTemplateDecl::CommonBase`. This approach has a couple
problems:
1. We can only access the injected template arguments of
`RedeclarableTemplateDecl` derived types, but other `Decl` kinds still
make use of the injected arguments (e.g.
`ClassTemplatePartialSpecializationDecl`,
`VarTemplatePartialSpecializationDecl`, and `TemplateTemplateParmDecl`).
2. Accessing the injected template arguments requires the common data
structure to be allocated. This may occur before we determine whether a
previous declaration exists (e.g. when comparing constraints), so if the
template _is_ a redeclaration, we end up discarding the common data
structure.
This patch moves the storage and access of injected template arguments
from `RedeclarableTemplateDecl` to `TemplateParameterList`.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list