summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaObjC/incomplete-implementation.m
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2013-12-05 20:52:31 +0000
committerFariborz Jahanian <fjahanian@apple.com>2013-12-05 20:52:31 +0000
commitf3077a29ce97c6af1b8ad66a83266c9330fc227c (patch)
treec43ebce1d601de7a9d5b2bc525acbf377e83fce9 /clang/test/SemaObjC/incomplete-implementation.m
parent9af3938b51b9e9ceecbafa34b196b5e754f3aaa3 (diff)
downloadbcm5719-llvm-f3077a29ce97c6af1b8ad66a83266c9330fc227c.tar.gz
bcm5719-llvm-f3077a29ce97c6af1b8ad66a83266c9330fc227c.zip
ObjectiveC: Don't warn when method implemented in
category is declared in category's primary class's super class. Because the super class is expected to implemented the method. // rdar://15580969 llvm-svn: 196531
Diffstat (limited to 'clang/test/SemaObjC/incomplete-implementation.m')
-rw-r--r--clang/test/SemaObjC/incomplete-implementation.m26
1 files changed, 26 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/incomplete-implementation.m b/clang/test/SemaObjC/incomplete-implementation.m
index 4b8d600cb8b..74dea2aa86b 100644
--- a/clang/test/SemaObjC/incomplete-implementation.m
+++ b/clang/test/SemaObjC/incomplete-implementation.m
@@ -39,3 +39,29 @@ __attribute__((visibility("default")))
@end
+// rdar://15580969
+typedef char BOOL;
+
+@protocol NSObject
+- (BOOL)isEqual:(id)object;
+@end
+
+@interface NSObject <NSObject>
+@end
+
+@protocol NSApplicationDelegate <NSObject>
+- (void)ImpleThisMethod; // expected-note {{method 'ImpleThisMethod' declared here}}
+@end
+
+@interface AppDelegate : NSObject <NSApplicationDelegate>
+@end
+
+@implementation AppDelegate (MRRCategory)
+
+- (BOOL)isEqual:(id)object
+{
+ return __objc_no;
+}
+
+- (void)ImpleThisMethod {} // expected-warning {{category is implementing a method which will also be implemented by its primary class}}
+@end
OpenPOWER on IntegriCloud