Extend bracket insertion to handle nullary selectors, e.g.
a getFoo]
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@113969 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/Parse/ParseExpr.cpp b/lib/Parse/ParseExpr.cpp
index 1f5a696..e466af2 100644
--- a/lib/Parse/ParseExpr.cpp
+++ b/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;