brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · 8a2e4b6 Raw
38 lines · plain
1// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -o %t %s2 3// Superclass declares property. Subclass redeclares the same property.4// Do not @synthesize-by-default in the subclass. P15// Superclass declares a property. Subclass declares a different property with the same name6// (such as different type or attributes). Do not @synthesize-by-default in the subclass. P27// Superclass conforms to a protocol that declares a property. Subclass redeclares the 8// same property.  Do not @synthesize-by-default in the subclass. P39// Superclass conforms to a protocol that declares a property. Subclass conforms to the 10// same protocol or a derived protocol. Do not @synthesize-by-default in the subclass. P411 12 13@protocol PROTO14  @property int P3;15  @property int P4;16@end17 18@protocol PROTO1 <PROTO> 19  @property int IMP1;20@end21 22@interface Super <PROTO>23  @property int P1;24  @property (copy) id P2;25@end26 27@interface Sub : Super <PROTO1>28  @property int P1;29  @property (nonatomic, retain) id P2; // expected-warning {{property 'P2' 'copy' attribute does not match the property inherited from 'Super'}} \30				       // expected-warning {{property 'P2' 'atomic' attribute does not match the property inherited from 'Super'}}31  @property int P3;32  @property int IMP2;33@end34 35@implementation Sub 36@end37 38