protocol declares the property, as well as one of its superclasses.
Property will be implemented in the super class. // rdar://
10120691
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@140586
91177308-0d34-0410-b5e6-
96231b3b80d8
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;
// 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
+