diff options
author | Benjamin Kramer <benny.kra@googlemail.com> | 2012-04-14 12:14:03 +0000 |
---|---|---|
committer | Benjamin Kramer <benny.kra@googlemail.com> | 2012-04-14 12:14:03 +0000 |
commit | 1e6b6060f943d53ecca748a7779866fdd53472ab (patch) | |
tree | 662172f9f24f8c03ecc08a554b625b55049e9d2a /clang/lib/Parse/ParseTemplate.cpp | |
parent | ffe7c7f4b23c9d5efc50fbb1dee3c83b4dc6ac13 (diff) | |
download | bcm5719-llvm-1e6b6060f943d53ecca748a7779866fdd53472ab.tar.gz bcm5719-llvm-1e6b6060f943d53ecca748a7779866fdd53472ab.zip |
Parser: Don't manage TemplateAnnotationIds in a delayed cleanup pool.
Instead, make it the allocation function's responsibility to add them
to a list and clear it when a top-level decl is finished.
This plugs leakage of TemplateAnnotationIds. DelayedCleanupPool is
ugly and unused, remove it.
llvm-svn: 154743
Diffstat (limited to 'clang/lib/Parse/ParseTemplate.cpp')
-rw-r--r-- | clang/lib/Parse/ParseTemplate.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseTemplate.cpp b/clang/lib/Parse/ParseTemplate.cpp index 61cd9f2119a..f8204d9cda5 100644 --- a/clang/lib/Parse/ParseTemplate.cpp +++ b/clang/lib/Parse/ParseTemplate.cpp @@ -838,7 +838,7 @@ bool Parser::AnnotateTemplateIdToken(TemplateTy Template, TemplateNameKind TNK, // later. Tok.setKind(tok::annot_template_id); TemplateIdAnnotation *TemplateId - = TemplateIdAnnotation::Allocate(TemplateArgs.size()); + = TemplateIdAnnotation::Allocate(TemplateArgs.size(), TemplateIds); TemplateId->TemplateNameLoc = TemplateNameLoc; if (TemplateName.getKind() == UnqualifiedId::IK_Identifier) { TemplateId->Name = TemplateName.Identifier; |