? DI->getTypeLoc().getBeginLoc()
: ArgInfo[i].NameLoc;
- ParmVarDecl* Param
- = ParmVarDecl::Create(Context, ObjCMethod,
- StartLoc, ArgInfo[i].NameLoc, ArgInfo[i].Name,
- ArgType, DI, SC_None, SC_None, 0);
-
- if (ArgType->isObjCObjectType()) {
- Diag(ArgInfo[i].NameLoc,
- diag::err_object_cannot_be_passed_returned_by_value)
- << 1 << ArgType;
- Param->setInvalidDecl();
- }
+ ParmVarDecl* Param = CheckParameter(ObjCMethod, StartLoc,
+ ArgInfo[i].NameLoc, ArgInfo[i].Name,
+ ArgType, DI, SC_None, SC_None);
Param->setObjCDeclQualifier(
CvtQTToAstBitMask(ArgInfo[i].DeclSpec.getObjCDeclQualifier()));
X0<A> x0a; // expected-note{{instantiation}}
+
+struct test2 { virtual void foo() = 0; }; // expected-note {{unimplemented}}
+@interface Test2
+- (void) foo: (test2) foo; // expected-error {{parameter type 'test2' is an abstract class}}
+@end