Extend bracket insertion to handle nullary selectors, e.g.
a getFoo]
llvm-svn: 113969
diff --git a/clang/lib/Parse/ParseExpr.cpp b/clang/lib/Parse/ParseExpr.cpp
index 1f5a696..e466af2 100644
--- a/clang/lib/Parse/ParseExpr.cpp
+++ b/clang/lib/Parse/ParseExpr.cpp
@@ -984,7 +984,7 @@
// 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;