while trying to do error recovery.
rdar://
13207886
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@175282
91177308-0d34-0410-b5e6-
96231b3b80d8
MultiExprArg Args) {
if (!Receiver)
return ExprError();
+
+ // A ParenListExpr can show up while doing error recovery with invalid code.
+ if (isa<ParenListExpr>(Receiver)) {
+ ExprResult Result = MaybeConvertParenListExprToParenExpr(S, Receiver);
+ if (Result.isInvalid()) return ExprError();
+ Receiver = Result.take();
+ }
if (RespondsToSelectorSel.isNull()) {
IdentifierInfo *SelectorId = &Context.Idents.get("respondsToSelector");
[X rect]; // expected-warning {{receiver type 'struct objc_object *' is not 'id' or interface pointer, consider casting it to 'id'}} expected-warning {{method '-rect' not found (return type defaults to 'id')}}
}
+// rdar://13207886
+void foo5(id p) {
+ p
+ [(id)(p) bar]; // expected-error {{missing '['}} \
+ // expected-error {{expected ']'}} \
+ // expected-note {{to match this '['}} \
+ // expected-warning {{instance method '-bar' not found}}
+}