forked from OSchip/llvm-project
objective-c: don't involve properties when checking
under -Wsuper-class-method-mismatch for method mismatches in current and suprt class. // rdar://11793793 llvm-svn: 159784
This commit is contained in:
parent
13b92929dc
commit
31a2568096
|
@ -2700,7 +2700,8 @@ void Sema::CheckObjCMethodOverrides(ObjCMethodDecl *ObjCMethod,
|
|||
isa<ObjCProtocolDecl>(overridden->getDeclContext()));
|
||||
|
||||
if (CurrentClass && overridden->getDeclContext() != CurrentClass &&
|
||||
isa<ObjCInterfaceDecl>(overridden->getDeclContext())) {
|
||||
isa<ObjCInterfaceDecl>(overridden->getDeclContext()) &&
|
||||
!overridden->isImplicit() /* not meant for properties */) {
|
||||
ObjCMethodDecl::param_iterator ParamI = ObjCMethod->param_begin(),
|
||||
E = ObjCMethod->param_end();
|
||||
ObjCMethodDecl::param_iterator PrevI = overridden->param_begin(),
|
||||
|
|
|
@ -0,0 +1,20 @@
|
|||
// RUN: %clang_cc1 -fsyntax-only -fobjc-arc -fobjc-runtime-has-weak -Wsuper-class-method-mismatch -verify %s
|
||||
// rdar://11793793
|
||||
|
||||
@class NSString;
|
||||
|
||||
@interface Super
|
||||
@property (nonatomic) NSString *thingy;
|
||||
@property () __weak id PROP;
|
||||
@end
|
||||
|
||||
@interface Sub : Super
|
||||
@end
|
||||
|
||||
@implementation Sub
|
||||
- (void)setThingy:(NSString *)val
|
||||
{
|
||||
[super setThingy:val];
|
||||
}
|
||||
@synthesize PROP;
|
||||
@end
|
Loading…
Reference in New Issue