diff options
author | Chris Lattner <sabre@nondot.org> | 2011-03-26 18:11:38 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2011-03-26 18:11:38 +0000 |
commit | 3b3e1a9e79703da067d23756e5624a4f487d6278 (patch) | |
tree | b225eade76df65c53e06e4f073c06324a29bc958 /lib/Parse/ParseObjc.cpp | |
parent | 3d9ce907a7a77dba1f81bfff6af05f7cbe31b115 (diff) |
fix the second part of rdar://8366474 - clang fails to parse ObjC selectors with '::', when :: isn't the first part of the selector.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@128344 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseObjc.cpp')
-rw-r--r-- | lib/Parse/ParseObjc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/Parse/ParseObjc.cpp b/lib/Parse/ParseObjc.cpp index d17e517b1f..b42cf9f0ae 100644 --- a/lib/Parse/ParseObjc.cpp +++ b/lib/Parse/ParseObjc.cpp @@ -2350,7 +2350,7 @@ ExprResult Parser::ParseObjCSelectorExpression(SourceLocation AtLoc) { return ExprError(Diag(Tok, diag::err_expected_colon)); ++nColons; - ConsumeToken(); // Eat the ':'. + ConsumeToken(); // Eat the ':' or '::'. if (Tok.is(tok::r_paren)) break; @@ -2366,7 +2366,7 @@ ExprResult Parser::ParseObjCSelectorExpression(SourceLocation AtLoc) { SourceLocation Loc; SelIdent = ParseObjCSelectorPiece(Loc); KeyIdents.push_back(SelIdent); - if (!SelIdent && Tok.isNot(tok::colon)) + if (!SelIdent && Tok.isNot(tok::colon) && Tok.isNot(tok::coloncolon)) break; } } |