forked from OSchip/llvm-project
Extend bracket insertion to handle nullary selectors, e.g.
a getFoo] llvm-svn: 113969
This commit is contained in:
parent
e9bba4f1a4
commit
d6d980044e
|
@ -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;
|
||||
|
|
|
@ -11,9 +11,11 @@
|
|||
@interface A
|
||||
- (int)method1:(int)x second:(float)y;
|
||||
+ (int)method2:(int)x second:(double)y;
|
||||
- (int)getBlah;
|
||||
@end
|
||||
|
||||
void f(A *a, int i, int j) {
|
||||
a method1:5+2 second:+(3.14159)];
|
||||
a method1:[a method1:3 second:j] second:i++]
|
||||
a getBlah];
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue