Fariborz Jahanian | 17d0d0d | 2009-01-08 23:23:10 +0000 | [diff] [blame] | 1 | // RUN: clang -fsyntax-only -Wreadonly-setter-attrs -verify %s |
Fariborz Jahanian | 567c8df | 2008-12-06 01:12:43 +0000 | [diff] [blame] | 2 | |
| 3 | @protocol P0 |
Fariborz Jahanian | ba45da8 | 2008-12-08 19:28:10 +0000 | [diff] [blame] | 4 | @property(readonly,assign) id X; // expected-warning {{property attributes 'readonly' and 'assign' are mutually exclusive}} |
Fariborz Jahanian | 567c8df | 2008-12-06 01:12:43 +0000 | [diff] [blame] | 5 | @end |
| 6 | |
| 7 | @protocol P1 |
Fariborz Jahanian | ba45da8 | 2008-12-08 19:28:10 +0000 | [diff] [blame] | 8 | @property(readonly,retain) id X; // expected-warning {{property attributes 'readonly' and 'retain' are mutually exclusive}} |
Fariborz Jahanian | 567c8df | 2008-12-06 01:12:43 +0000 | [diff] [blame] | 9 | @end |
| 10 | |
| 11 | @protocol P2 |
Fariborz Jahanian | ba45da8 | 2008-12-08 19:28:10 +0000 | [diff] [blame] | 12 | @property(readonly,copy) id X; // expected-warning {{property attributes 'readonly' and 'copy' are mutually exclusive}} |
Fariborz Jahanian | 567c8df | 2008-12-06 01:12:43 +0000 | [diff] [blame] | 13 | @end |
| 14 | |
| 15 | @protocol P3 |
| 16 | @property(readonly,readwrite) id X; // expected-error {{property attributes 'readonly' and 'readwrite' are mutually exclusive}} |
| 17 | @end |
| 18 | |
| 19 | @protocol P4 |
| 20 | @property(assign,copy) id X; // expected-error {{property attributes 'assign' and 'copy' are mutually exclusive}} |
| 21 | @end |
| 22 | |
| 23 | @protocol P5 |
| 24 | @property(assign,retain) id X; // expected-error {{property attributes 'assign' and 'retain' are mutually exclusive}} |
| 25 | @end |
| 26 | |
| 27 | @protocol P6 |
| 28 | @property(copy,retain) id X; // expected-error {{property attributes 'copy' and 'retain' are mutually exclusive}} |
| 29 | @end |
| 30 | |
| 31 | |
| 32 | |