summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test/SemaObjC')
-rw-r--r--clang/test/SemaObjC/super.m25
1 files changed, 25 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/super.m b/clang/test/SemaObjC/super.m
new file mode 100644
index 00000000000..46b8b4a0974
--- /dev/null
+++ b/clang/test/SemaObjC/super.m
@@ -0,0 +1,25 @@
+// RUN: clang -fsyntax-only -verify %s
+
+@interface Foo
+- iMethod;
++ cMethod;
+@end
+
+@interface A
+@end
+
+@interface B : A
+- (void)instanceMethod;
++ classMethod;
+@end
+
+@implementation B
+
+- (void)instanceMethod {
+ [super iMethod]; // expected-warning{{method '-iMethod' not found (return type defaults to 'id')}}
+}
+
++ classMethod {
+ [super cMethod]; // expected-warning{{method '+cMethod' not found (return type defaults to 'id')}}
+}
+@end
OpenPOWER on IntegriCloud