summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseTentative.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Parse/ParseTentative.cpp')
-rw-r--r--clang/lib/Parse/ParseTentative.cpp7
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.
OpenPOWER on IntegriCloud