1 // RUN: %clang_cc1 -fsyntax-only -Weverything -verify %s
2 // expected-no-diagnostics
3 /** A property may not be both 'readonly' and having a memory management attribute
4 (copy/retain/etc.). But, property declaration in primary class and protcols
5 are tentative as they may be overridden into a 'readwrite' property in class
6 extensions. So, do not issue any warning on 'readonly' and memory management
7 attributes in a property.
16 @interface MyClass : Super
17 @property(nonatomic, copy, readonly) NSString *prop;
18 @property(nonatomic, copy, readonly) id warnProp;
22 @property(nonatomic, copy, readwrite) NSString *prop;
25 @implementation MyClass
32 @property(nonatomic, copy, readonly) NSString *prop;
33 @property(nonatomic, copy, readonly) id warnProp;
36 @interface YourClass : Super <P>
39 @interface YourClass ()
40 @property(nonatomic, copy, readwrite) NSString *prop;
43 @implementation YourClass