diff options
author | John McCall <rjmccall@apple.com> | 2011-03-24 11:26:52 +0000 |
---|---|---|
committer | John McCall <rjmccall@apple.com> | 2011-03-24 11:26:52 +0000 |
commit | 084e83dfe7e4e531fda9abefa5396c643ffc2a36 (patch) | |
tree | 5b07f08a394c9337d65db0201f296f9811d6fca4 /clang/lib/Parse/ParseTemplate.cpp | |
parent | 33f352ca62f608b71497b1a89015a2149cf16b0f (diff) | |
download | bcm5719-llvm-084e83dfe7e4e531fda9abefa5396c643ffc2a36.tar.gz bcm5719-llvm-084e83dfe7e4e531fda9abefa5396c643ffc2a36.zip |
Insomniac refactoring: change how the parser allocates attributes so that
AttributeLists do not accumulate over the lifetime of parsing, but are
instead reused. Also make the arguments array not require a separate
allocation, and make availability attributes store their stuff in
augmented memory, too.
llvm-svn: 128209
Diffstat (limited to 'clang/lib/Parse/ParseTemplate.cpp')
-rw-r--r-- | clang/lib/Parse/ParseTemplate.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/clang/lib/Parse/ParseTemplate.cpp b/clang/lib/Parse/ParseTemplate.cpp index 799c6179173..84b37889f4d 100644 --- a/clang/lib/Parse/ParseTemplate.cpp +++ b/clang/lib/Parse/ParseTemplate.cpp @@ -196,7 +196,7 @@ Parser::ParseSingleDeclarationAfterTemplate( return 0; } - ParsedAttributesWithRange prefixAttrs; + ParsedAttributesWithRange prefixAttrs(AttrFactory); MaybeParseCXX0XAttributes(prefixAttrs); if (Tok.is(tok::kw_using)) @@ -205,7 +205,7 @@ Parser::ParseSingleDeclarationAfterTemplate( // Parse the declaration specifiers, stealing the accumulated // diagnostics from the template parameters. - ParsingDeclSpec DS(DiagsFromTParams); + ParsingDeclSpec DS(*this, &DiagsFromTParams); DS.takeAttributesFrom(prefixAttrs); @@ -598,7 +598,7 @@ Parser::ParseNonTypeTemplateParameter(unsigned Depth, unsigned Position) { // Parse the declaration-specifiers (i.e., the type). // FIXME: The type should probably be restricted in some way... Not all // declarators (parts of declarators?) are accepted for parameters. - DeclSpec DS; + DeclSpec DS(AttrFactory); ParseDeclarationSpecifiers(DS); // Parse this as a typename. |