Diagnose when method parameter is an object.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62431 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/SemaObjC/method-bad-param.m b/test/SemaObjC/method-bad-param.m
new file mode 100644
index 0000000..34f71e7
--- /dev/null
+++ b/test/SemaObjC/method-bad-param.m
@@ -0,0 +1,18 @@
+// RUN: clang -fsyntax-only -verify %s
+
+@interface foo
+@end
+
+@implementation foo
+@end
+
+@interface bar
+-(void) my_method:(foo) my_param; // expected-error {{can not use an object as parameter to a method}}
+@end
+
+@implementation bar
+-(void) my_method:(foo) my_param // expected-error {{can not use an object as parameter to a method}}
+{
+}
+@end
+