diff options
author | Douglas Gregor <dgregor@apple.com> | 2010-09-28 17:48:56 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2010-09-28 17:48:56 +0000 |
commit | 857736454fabeb828e399dce094bbb3aad64fba2 (patch) | |
tree | b4eeb626d6d990e6cc0595105119eacf7b3d7744 /lib/Parse/ParseExpr.cpp | |
parent | b3358724d985dc08889f7905f20284718361e885 (diff) |
When we have two identifiers in a row in Objective-C, make sure to
verify that we aren't in a message-send expression before digging into
the identifier or looking ahead more tokens. Fixes a regression
(<rdar://problem/8483253>) I introduced with bracket insertion.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@114968 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Parse/ParseExpr.cpp')
-rw-r--r-- | lib/Parse/ParseExpr.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp index e04e62bcb2..2785f1b14d 100644 --- a/lib/Parse/ParseExpr.cpp +++ b/lib/Parse/ParseExpr.cpp @@ -671,7 +671,7 @@ ExprResult Parser::ParseCastExpression(bool isUnaryExpression, // If we have an Objective-C class name followed by an identifier and // either ':' or ']', this is an Objective-C class message send that's // missing the opening '['. Recovery appropriately. - if (getLang().ObjC1 && Tok.is(tok::identifier)) { + if (getLang().ObjC1 && Tok.is(tok::identifier) && !InMessageExpression) { const Token& Next = NextToken(); if (Next.is(tok::colon) || Next.is(tok::r_square)) if (ParsedType Typ = Actions.getTypeName(II, ILoc, getCurScope())) |