diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-10 03:25:07 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2012-04-10 03:25:07 +0000 |
commit | 3dff251da1bf2ca1339190b98307fb67fe872318 (patch) | |
tree | 92fb23d2c68a2cf47a22421ac976b85024c2b003 /clang/lib/Parse/ParseTentative.cpp | |
parent | 4463399b0da32b232c7c0c5a669cf4d24187b826 (diff) | |
download | bcm5719-llvm-3dff251da1bf2ca1339190b98307fb67fe872318.tar.gz bcm5719-llvm-3dff251da1bf2ca1339190b98307fb67fe872318.zip |
Parsing of C++11 attributes:
* Alternative tokens (such as 'compl') are treated as identifiers in
attribute names.
* An attribute-list can start with a comma.
* An ellipsis may not be used with either of our currently-supported
C++11 attributes.
llvm-svn: 154381
Diffstat (limited to 'clang/lib/Parse/ParseTentative.cpp')
-rw-r--r-- | clang/lib/Parse/ParseTentative.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/clang/lib/Parse/ParseTentative.cpp b/clang/lib/Parse/ParseTentative.cpp index 18bc0ddc5b9..5ce6b2b91cd 100644 --- a/clang/lib/Parse/ParseTentative.cpp +++ b/clang/lib/Parse/ParseTentative.cpp @@ -485,18 +485,17 @@ Parser::isCXX11AttributeSpecifier(bool Disambiguate, // If a keyword or an alternative token that satisfies the syntactic // requirements of an identifier is contained in an attribute-token, // it is considered an identifier. - if (!Tok.getIdentifierInfo()) { + SourceLocation Loc; + if (!TryParseCXX11AttributeIdentifier(Loc)) { IsAttribute = false; break; } - ConsumeToken(); if (Tok.is(tok::coloncolon)) { ConsumeToken(); - if (!Tok.getIdentifierInfo()) { + if (!TryParseCXX11AttributeIdentifier(Loc)) { IsAttribute = false; break; } - ConsumeToken(); } // Parse the attribute-argument-clause, if present. |