1 // RUN: %clang_cc1 -fsyntax-only -Wreadonly-setter-attrs -verify %s -fblocks
3 // Check property attribute consistency.
6 @property(readonly, readwrite) int p0; // expected-error {{property attributes 'readonly' and 'readwrite' are mutually exclusive}}
8 @property(retain) int p1; // expected-error {{property with 'retain' attribute must be of object type}}
10 @property(copy) int p2; // expected-error {{property with 'copy' attribute must be of object type}}
12 @property(assign, copy) id p3_0; // expected-error {{property attributes 'assign' and 'copy' are mutually exclusive}}
13 @property(assign, retain) id p3_1; // expected-error {{property attributes 'assign' and 'retain' are mutually exclusive}}
14 @property(copy, retain) id p3_2; // expected-error {{property attributes 'copy' and 'retain' are mutually exclusive}}
15 @property(assign, copy, retain) id p3_3; // expected-error {{property attributes 'assign' and 'copy' are mutually exclusive}}, expected-error {{property attributes 'assign' and 'retain' are mutually exclusive}}
17 @property id p4; // expected-warning {{no 'assign', 'retain', or 'copy' attribute is specified - 'assign' is assumed}}, expected-warning {{default property attribute 'assign' not appropriate for non-gc object}}
19 @property(nonatomic,copy) int (^includeMailboxCondition)();
20 @property(nonatomic,copy) int (*includeMailboxCondition2)(); // expected-error {{property with 'copy' attribute must be of object type}}
25 @property (retain) int PROP; // expected-error {{property with 'retain' attribute must be of object type}}
26 @property(nonatomic,copy) int (*PROP1)(); // expected-error {{property with 'copy' attribute must be of object type}}