diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-06-15 17:44:38 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-06-15 17:44:38 +0000 |
commit | c722ea4fbf886d6460b256b5e819a4ee751d5fff (patch) | |
tree | cea324555f88ac0ae9013f3df472421992063846 /lib/Sema/SemaDecl.cpp | |
parent | 7cf84d66965a7706004d8590b5af5fe54b85f525 (diff) |
Allocate template parameter lists for out-of-line definitions via the
ASTContext rather than via the normal heap.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@106008 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Sema/SemaDecl.cpp')
-rw-r--r-- | lib/Sema/SemaDecl.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/lib/Sema/SemaDecl.cpp b/lib/Sema/SemaDecl.cpp index 9ba3ee6ca4..d1818b813c 100644 --- a/lib/Sema/SemaDecl.cpp +++ b/lib/Sema/SemaDecl.cpp @@ -2573,7 +2573,8 @@ Sema::ActOnVariableDeclarator(Scope* S, Declarator& D, DeclContext* DC, SetNestedNameSpecifier(NewVD, D); if (NumMatchedTemplateParamLists > 0) { - NewVD->setTemplateParameterListsInfo(NumMatchedTemplateParamLists, + NewVD->setTemplateParameterListsInfo(Context, + NumMatchedTemplateParamLists, (TemplateParameterList**)TemplateParamLists.release()); } @@ -3151,7 +3152,8 @@ Sema::ActOnFunctionDeclarator(Scope* S, Declarator& D, DeclContext* DC, } if (NumMatchedTemplateParamLists > 0) { - NewFD->setTemplateParameterListsInfo(NumMatchedTemplateParamLists, + NewFD->setTemplateParameterListsInfo(Context, + NumMatchedTemplateParamLists, (TemplateParameterList**)TemplateParamLists.release()); } @@ -5412,7 +5414,8 @@ CreateNewDecl: = static_cast<NestedNameSpecifier*>(SS.getScopeRep()); New->setQualifierInfo(NNS, SS.getRange()); if (NumMatchedTemplateParamLists > 0) { - New->setTemplateParameterListsInfo(NumMatchedTemplateParamLists, + New->setTemplateParameterListsInfo(Context, + NumMatchedTemplateParamLists, (TemplateParameterList**) TemplateParameterLists.release()); } } |