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