brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · a513c66 Raw
42 lines · plain
1// RUN: %clang_cc1 -verify %s2 3@interface I 4{5	id d1;6}7@property (readwrite, copy) id d1;8@property (readwrite, copy) id d2;9@end10 11@interface NOW : I12@property (readonly) id d1; // expected-warning {{attribute 'readonly' of property 'd1' restricts attribute 'readwrite' of property inherited from 'I'}} expected-warning {{'copy' attribute on property 'd1' does not match the property inherited from 'I'}}13@property (readwrite, copy) I* d2;14@end15 16typedef signed char BOOL;17 18@protocol EKProtocolCalendar19@property (nonatomic, readonly) BOOL allowReminders;20@property (atomic, readonly) BOOL allowNonatomicProperty; // expected-note {{property declared here}}21@end22 23@protocol EKProtocolMutableCalendar <EKProtocolCalendar>24@end25 26@interface EKCalendar27@end28 29@interface EKCalendar ()  <EKProtocolMutableCalendar>30@property (nonatomic, assign) BOOL allowReminders;31@property (nonatomic, assign) BOOL allowNonatomicProperty; // expected-warning {{'atomic' attribute on property 'allowNonatomicProperty' does not match the property inherited from 'EKProtocolCalendar'}}32@end33 34__attribute__((objc_root_class))35@interface A36@property (nonatomic, readonly, getter=isAvailable) int available; // expected-note{{property declared here}}37@end38 39@interface A ()40@property (nonatomic, assign, getter=wasAvailable) int available; // expected-warning{{getter name mismatch between property redeclaration ('wasAvailable') and its original declaration ('isAvailable')}}41@end42