objective-c: don't involve properties when checking

under -Wsuper-class-method-mismatch for method
mismatches in current and suprt class.
// rdar://11793793


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@159784 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Fariborz Jahanian 2012-07-05 22:26:07 +00:00
Родитель c2abbe0b98
Коммит c4133a4773
2 изменённых файлов: 22 добавлений и 1 удалений

Просмотреть файл

@ -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