diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2011-08-25 22:58:42 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2011-08-25 22:58:42 +0000 |
| commit | 5cc730cdef97d98df0b33a21a6b9568b9cddccb1 (patch) | |
| tree | d6712be5b32ceaf20fa48a6a33eef2ac7c7dbc9b /clang | |
| parent | 2ed0ee1ace2f61730c73446796081d70b713add7 (diff) | |
| download | bcm5719-llvm-5cc730cdef97d98df0b33a21a6b9568b9cddccb1.tar.gz bcm5719-llvm-5cc730cdef97d98df0b33a21a6b9568b9cddccb1.zip | |
Don't warn on category implementing a method, if
declated method in the class belongs to a synthesized
property getter/setter. // rdar://10014946
llvm-svn: 138598
Diffstat (limited to 'clang')
| -rw-r--r-- | clang/lib/Sema/SemaDeclObjC.cpp | 2 | ||||
| -rw-r--r-- | clang/test/SemaObjC/protocol-implementing-class-methods.m | 13 |
2 files changed, 14 insertions, 1 deletions
diff --git a/clang/lib/Sema/SemaDeclObjC.cpp b/clang/lib/Sema/SemaDeclObjC.cpp index 03081bec138..af14aa4f84f 100644 --- a/clang/lib/Sema/SemaDeclObjC.cpp +++ b/clang/lib/Sema/SemaDeclObjC.cpp @@ -1488,7 +1488,7 @@ void Sema::MatchAllMethodDeclarations(const llvm::DenseSet<Selector> &InsMap, if (!WarnExactMatch) WarnConflictingTypedMethods(ImpMethodDecl, MethodDecl, isa<ObjCProtocolDecl>(CDecl)); - else + else if (!MethodDecl->isSynthesized()) WarnExactTypedMethods(ImpMethodDecl, MethodDecl, isa<ObjCProtocolDecl>(CDecl)); } diff --git a/clang/test/SemaObjC/protocol-implementing-class-methods.m b/clang/test/SemaObjC/protocol-implementing-class-methods.m index 6d68e8c21cb..f08a5a97d8b 100644 --- a/clang/test/SemaObjC/protocol-implementing-class-methods.m +++ b/clang/test/SemaObjC/protocol-implementing-class-methods.m @@ -26,3 +26,16 @@ - (void) : (double) arg{}; // expected-warning {{category is implementing a method which will also be implemented by its primary class}} - (void) CEMeth {}; // expected-warning {{category is implementing a method which will also be implemented by its primary class}} @end + +// rdar://10014946 +typedef char BOOL; +@interface I +{ + BOOL allowsDeleting; +} +@property (nonatomic, assign, readwrite) BOOL allowsDeleting; +@end + +@implementation I(CAT) +- (BOOL) allowsDeleting { return 1; } +@end |

