summaryrefslogtreecommitdiffstats
path: root/clang/test
diff options
context:
space:
mode:
Diffstat (limited to 'clang/test')
-rw-r--r--clang/test/Analysis/PR2978.m1
-rw-r--r--clang/test/SemaObjC/super.m25
2 files changed, 26 insertions, 0 deletions
diff --git a/clang/test/Analysis/PR2978.m b/clang/test/Analysis/PR2978.m
index 69deec9860d..aa5d173807b 100644
--- a/clang/test/Analysis/PR2978.m
+++ b/clang/test/Analysis/PR2978.m
@@ -5,6 +5,7 @@
@interface NSObject
- (void)release;
+- dealloc;
@end
@interface MyClass : NSObject {
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