Emit diagnostics for methods not found.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43037 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/method-not-defined.m b/test/Sema/method-not-defined.m
new file mode 100644
index 0000000..adb8a67
--- /dev/null
+++ b/test/Sema/method-not-defined.m
@@ -0,0 +1,14 @@
+// RUN: clang -fsyntax-only -verify %s
+
+typedef struct objc_object *id;
+@interface Foo
+@end
+
+void test() {
+ Foo *fooObj;
+ id obj;
+
+ [[Foo alloc] init]; // expected-warning {{method '+alloc' not found (return type defaults to 'id')}} expected-warning {{method '-init' not found (return type defaults to 'id')}}
+ [fooObj notdefined]; // expected-warning {{method '-notdefined' not found (return type defaults to 'id')}}
+ [obj whatever:1 :2 :3]; // expected-warning {{method '-whatever:::' not found (return type defaults to 'id'))}}
+}