From f3077a29ce97c6af1b8ad66a83266c9330fc227c Mon Sep 17 00:00:00 2001 From: Fariborz Jahanian Date: Thu, 5 Dec 2013 20:52:31 +0000 Subject: 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 --- clang/test/SemaObjC/incomplete-implementation.m | 26 +++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'clang/test') 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 +@end + +@protocol NSApplicationDelegate +- (void)ImpleThisMethod; // expected-note {{method 'ImpleThisMethod' declared here}} +@end + +@interface AppDelegate : NSObject +@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 -- cgit v1.2.3