summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseTemplate.cpp
diff options
context:
space:
mode:
authorJohn McCall <rjmccall@apple.com>2010-12-24 02:08:15 +0000
committerJohn McCall <rjmccall@apple.com>2010-12-24 02:08:15 +0000
commit53fa71476d0539b031a8f91232607f5ca8f182e5 (patch)
tree9e6d370da16c00a54a4b7f8ad66553458cedf899 /clang/lib/Parse/ParseTemplate.cpp
parentb4d271ef46bde4815c3ca3363779645ce3513811 (diff)
downloadbcm5719-llvm-53fa71476d0539b031a8f91232607f5ca8f182e5.tar.gz
bcm5719-llvm-53fa71476d0539b031a8f91232607f5ca8f182e5.zip
Refactor how we collect attributes during parsing, and add slots for attributes
on array and function declarators. This is pretty far from complete, and I'll revisit it later if someone doesn't beat me to it. llvm-svn: 122535
Diffstat (limited to 'clang/lib/Parse/ParseTemplate.cpp')
-rw-r--r--clang/lib/Parse/ParseTemplate.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/clang/lib/Parse/ParseTemplate.cpp b/clang/lib/Parse/ParseTemplate.cpp
index d38d0599ac2..afa2cc62f9f 100644
--- a/clang/lib/Parse/ParseTemplate.cpp
+++ b/clang/lib/Parse/ParseTemplate.cpp
@@ -196,20 +196,18 @@ Parser::ParseSingleDeclarationAfterTemplate(
return 0;
}
- CXX0XAttributeList PrefixAttrs;
- if (getLang().CPlusPlus0x && isCXX0XAttributeSpecifier())
- PrefixAttrs = ParseCXX0XAttributes();
+ ParsedAttributesWithRange prefixAttrs;
+ MaybeParseCXX0XAttributes(prefixAttrs);
if (Tok.is(tok::kw_using))
return ParseUsingDirectiveOrDeclaration(Context, TemplateInfo, DeclEnd,
- PrefixAttrs);
+ prefixAttrs);
// Parse the declaration specifiers, stealing the accumulated
// diagnostics from the template parameters.
ParsingDeclSpec DS(DiagsFromTParams);
- if (PrefixAttrs.HasAttr)
- DS.AddAttributes(PrefixAttrs.AttrList);
+ DS.takeAttributesFrom(prefixAttrs);
ParseDeclarationSpecifiers(DS, TemplateInfo, AS,
getDeclSpecContextFromDeclaratorContext(Context));
OpenPOWER on IntegriCloud