mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-12-14 03:29:57 +00:00
objc - don't complain about unimplemented property when conforming
protocol declares the property, as well as one of its superclasses. Property will be implemented in the super class. // rdar://10120691 llvm-svn: 140586
This commit is contained in:
parent
f6fbfd3f83
commit
698bd3113e
@ -1153,7 +1153,8 @@ void Sema::CollectImmediateProperties(ObjCContainerDecl *CDecl,
|
||||
ObjCPropertyDecl *PropertyFromSuper = SuperPropMap[Prop->getIdentifier()];
|
||||
// Exclude property for protocols which conform to class's super-class,
|
||||
// as super-class has to implement the property.
|
||||
if (!PropertyFromSuper || PropertyFromSuper != Prop) {
|
||||
if (!PropertyFromSuper ||
|
||||
PropertyFromSuper->getIdentifier() != Prop->getIdentifier()) {
|
||||
ObjCPropertyDecl *&PropEntry = PropMap[Prop->getIdentifier()];
|
||||
if (!PropEntry)
|
||||
PropEntry = Prop;
|
||||
|
@ -19,3 +19,21 @@
|
||||
// expected-warning {{property 'MyProperty0' requires method 'setMyProperty0:' to be defined}}\
|
||||
// expected-warning {{property 'MyProperty' requires method 'MyProperty' to be defined}} \
|
||||
// expected-warning {{property 'MyProperty' requires method 'setMyProperty:' to be defined}}
|
||||
|
||||
// rdar://10120691
|
||||
// property is implemented in super class. No warning
|
||||
|
||||
@protocol PROTOCOL1
|
||||
@property int MyProp;
|
||||
@end
|
||||
|
||||
@interface superclass
|
||||
@property int MyProp;
|
||||
@end
|
||||
|
||||
@interface childclass : superclass <PROTOCOL1>
|
||||
@end
|
||||
|
||||
@implementation childclass
|
||||
@end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user