summaryrefslogtreecommitdiff
path: root/clang/test/SemaObjC/forward-class-receiver.m
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaObjC/forward-class-receiver.m')
-rw-r--r--clang/test/SemaObjC/forward-class-receiver.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/forward-class-receiver.m b/clang/test/SemaObjC/forward-class-receiver.m
new file mode 100644
index 0000000..9bcb039
--- /dev/null
+++ b/clang/test/SemaObjC/forward-class-receiver.m
@@ -0,0 +1,13 @@
+// RUN: %clang_cc1 -fsyntax-only -verify %s
+
+@interface I
++ new; // expected-note {{method 'new' is used for the forward class}}
+@end
+Class isa;
+
+@class NotKnown; // expected-note{{forward declaration of class here}}
+
+void foo(NotKnown *n) {
+ [isa new];
+ [NotKnown new]; /* expected-warning {{receiver 'NotKnown' is a forward class and corresponding}} */
+}