diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-10-24 01:21:09 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-10-24 01:21:09 +0000 |
commit | 37a45ddfbd36e2b0ef1736e6878eb28662e32dd5 (patch) | |
tree | 1928435a05ff983a59deca68fbae8a6c13fa6fa5 /clang/lib/Parse/ParseDeclCXX.cpp | |
parent | 58d0d36006f4268677c77f54d2bfbfee02f671d9 (diff) | |
download | bcm5719-llvm-37a45ddfbd36e2b0ef1736e6878eb28662e32dd5.tar.gz bcm5719-llvm-37a45ddfbd36e2b0ef1736e6878eb28662e32dd5.zip |
Support GNU attributes in alias-declarations now that GCC has implemented them
and we know where they go.
llvm-svn: 193297
Diffstat (limited to 'clang/lib/Parse/ParseDeclCXX.cpp')
-rw-r--r-- | clang/lib/Parse/ParseDeclCXX.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Parse/ParseDeclCXX.cpp b/clang/lib/Parse/ParseDeclCXX.cpp index 4625745c5e2..000d0768f8d 100644 --- a/clang/lib/Parse/ParseDeclCXX.cpp +++ b/clang/lib/Parse/ParseDeclCXX.cpp @@ -508,6 +508,7 @@ Decl *Parser::ParseUsingDeclaration(unsigned Context, } ParsedAttributesWithRange Attrs(AttrFactory); + MaybeParseGNUAttributes(Attrs); MaybeParseCXX11Attributes(Attrs); // Maybe this is an alias-declaration. @@ -525,7 +526,6 @@ Decl *Parser::ParseUsingDeclaration(unsigned Context, Attrs.takeAllFrom(MisplacedAttrs); } - // TODO: Can GNU attributes appear here? ConsumeToken(); Diag(Tok.getLocation(), getLangOpts().CPlusPlus11 ? @@ -1159,8 +1159,7 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind, ParsedAttributesWithRange attrs(AttrFactory); // If attributes exist after tag, parse them. - if (Tok.is(tok::kw___attribute)) - ParseGNUAttributes(attrs); + MaybeParseGNUAttributes(attrs); // If declspecs exist after tag, parse them. while (Tok.is(tok::kw___declspec)) @@ -1170,7 +1169,7 @@ void Parser::ParseClassSpecifier(tok::TokenKind TagTokKind, if (Tok.is(tok::kw___single_inheritance) || Tok.is(tok::kw___multiple_inheritance) || Tok.is(tok::kw___virtual_inheritance)) - ParseMicrosoftInheritanceClassAttributes(attrs); + ParseMicrosoftInheritanceClassAttributes(attrs); // If C++0x attributes exist here, parse them. // FIXME: Are we consistent with the ordering of parsing of different |