1*67e74705SXin Li// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o %t %s 2*67e74705SXin Li// rdar://7923851. 3*67e74705SXin Li 4*67e74705SXin Li// Superclass declares property. Subclass redeclares the same property. 5*67e74705SXin Li// Do not @synthesize-by-default in the subclass. P1 6*67e74705SXin Li// Superclass declares a property. Subclass declares a different property with the same name 7*67e74705SXin Li// (such as different type or attributes). Do not @synthesize-by-default in the subclass. P2 8*67e74705SXin Li// Superclass conforms to a protocol that declares a property. Subclass redeclares the 9*67e74705SXin Li// same property. Do not @synthesize-by-default in the subclass. P3 10*67e74705SXin Li// Superclass conforms to a protocol that declares a property. Subclass conforms to the 11*67e74705SXin Li// same protocol or a derived protocol. Do not @synthesize-by-default in the subclass. P4 12*67e74705SXin Li 13*67e74705SXin Li 14*67e74705SXin Li@protocol PROTO 15*67e74705SXin Li @property int P3; 16*67e74705SXin Li @property int P4; 17*67e74705SXin Li@end 18*67e74705SXin Li 19*67e74705SXin Li@protocol PROTO1 <PROTO> 20*67e74705SXin Li @property int IMP1; 21*67e74705SXin Li@end 22*67e74705SXin Li 23*67e74705SXin Li@interface Super <PROTO> 24*67e74705SXin Li @property int P1; 25*67e74705SXin Li @property (copy) id P2; 26*67e74705SXin Li@end 27*67e74705SXin Li 28*67e74705SXin Li@interface Sub : Super <PROTO1> 29*67e74705SXin Li @property int P1; 30*67e74705SXin Li @property (nonatomic, retain) id P2; // expected-warning {{property 'P2' 'copy' attribute does not match the property inherited from 'Super'}} \ 31*67e74705SXin Li // expected-warning {{property 'P2' 'atomic' attribute does not match the property inherited from 'Super'}} 32*67e74705SXin Li @property int P3; 33*67e74705SXin Li @property int IMP2; 34*67e74705SXin Li@end 35*67e74705SXin Li 36*67e74705SXin Li@implementation Sub 37*67e74705SXin Li@end 38*67e74705SXin Li 39