[clang] [Clang][AST] Store injected template arguments in TemplateParameterList (PR #113579)
Krystian Stasiowski via cfe-commits
cfe-commits at lists.llvm.org
Fri Oct 25 09:57:23 PDT 2024
================
@@ -244,6 +245,17 @@ bool TemplateParameterList::hasAssociatedConstraints() const {
return HasRequiresClause || HasConstrainedParameters;
}
+ArrayRef<TemplateArgument> TemplateParameterList::getInjectedTemplateArgs() {
+ if (const auto *Context = InjectedArgs.dyn_cast<const ASTContext *>()) {
+ TemplateArgument *Args = new (*Context) TemplateArgument[size()];
----------------
sdkrystian wrote:
@erichkeane The allocation function uses `ASTContext` to allocate the memory (it uses a `BumpPtrAllocator`, so we don't need to deallocate).
https://github.com/llvm/llvm-project/pull/113579
More information about the cfe-commits
mailing list