aboutsummaryrefslogtreecommitdiff
path: root/lib/Sema/SemaDeclObjC.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Sema/SemaDeclObjC.cpp')
-rw-r--r--lib/Sema/SemaDeclObjC.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/Sema/SemaDeclObjC.cpp b/lib/Sema/SemaDeclObjC.cpp
index f6a245a317..d140b908a8 100644
--- a/lib/Sema/SemaDeclObjC.cpp
+++ b/lib/Sema/SemaDeclObjC.cpp
@@ -1349,6 +1349,11 @@ Sema::DeclTy *Sema::ActOnMethodDeclaration(
}
else if (argType->isFunctionType())
argType = Context.getPointerType(argType);
+ else if (argType->isObjCInterfaceType()) {
+ // FIXME! provide more precise location for the parameter
+ Diag(MethodLoc, diag::err_object_as_method_param);
+ return 0;
+ }
} else
argType = Context.getObjCIdType();
ParmVarDecl* Param;