LBracLoc, RBracLoc, ReturnType, VK))
return ExprError();
+ if (Method && !Method->getResultType()->isVoidType() &&
+ RequireCompleteType(LBracLoc, Method->getResultType(),
+ diag::err_illegal_message_expr_incomplete_type))
+ return ExprError();
+
// Construct the appropriate ObjCMessageExpr.
Expr *Result;
if (SuperLoc.isValid())
LBracLoc, RBracLoc, ReturnType, VK))
return ExprError();
- if (!ReturnType->isVoidType()) {
- if (RequireCompleteType(LBracLoc, ReturnType,
- diag::err_illegal_message_expr_incomplete_type))
- return ExprError();
- }
+ if (Method && !Method->getResultType()->isVoidType() &&
+ RequireCompleteType(LBracLoc, Method->getResultType(),
+ diag::err_illegal_message_expr_incomplete_type))
+ return ExprError();
// Construct the appropriate ObjCMessageExpr instance.
Expr *Result;
A *im = [A create:(void (*)(void *cgl_ctx, X r, void *data)) fun
callbackData:ptr];
}
+
+// <rdar://problem/8807070>
+template<typename T> struct X1; // expected-note{{template is declared here}}
+
+@interface B
++ (X1<int>)blah;
++ (X1<float>&)blarg;
+@end
+
+void f() {
+ [B blah]; // expected-error{{implicit instantiation of undefined template 'X1<int>'}}
+ [B blarg];
+}