summaryrefslogtreecommitdiffstats
path: root/clang/lib/Parse/ParseExpr.cpp
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2010-09-15 14:54:45 +0000
committerDouglas Gregor <dgregor@apple.com>2010-09-15 14:54:45 +0000
commitd6d980044ec659be09eb24850cb233d470f86326 (patch)
treee89c7e5651f20a2e31af365924fe05a78086de0f /clang/lib/Parse/ParseExpr.cpp
parente9bba4f1a44162eb6c02f96ebbd088333e5a45d5 (diff)
downloadbcm5719-llvm-d6d980044ec659be09eb24850cb233d470f86326.tar.gz
bcm5719-llvm-d6d980044ec659be09eb24850cb233d470f86326.zip
Extend bracket insertion to handle nullary selectors, e.g.
a getFoo] llvm-svn: 113969
Diffstat (limited to 'clang/lib/Parse/ParseExpr.cpp')
-rw-r--r--clang/lib/Parse/ParseExpr.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index 1f5a6964e38..e466af2d614 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -984,7 +984,7 @@ Parser::ParsePostfixExpressionSuffix(ExprResult LHS) {
// message send, then this is probably a message send with a missing
// opening bracket '['.
if (getLang().ObjC1 && !InMessageExpression &&
- NextToken().is(tok::colon)) {
+ (NextToken().is(tok::colon) || NextToken().is(tok::r_square))) {
LHS = ParseObjCMessageExpressionBody(SourceLocation(), SourceLocation(),
ParsedType(), LHS.get());
break;
OpenPOWER on IntegriCloud