forked from OSchip/llvm-project
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
This commit is contained in:
parent
2ed0ee1ace
commit
5cc730cdef
|
@ -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));
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue