Patrick Beard | b2f6820 | 2012-04-06 18:12:22 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -verify -Wno-objc-root-class %s |
Fariborz Jahanian | 831fb96 | 2011-06-25 00:17:46 +0000 | [diff] [blame] | 2 | // rdar://9636091 |
| 3 | |
| 4 | @interface I |
| 5 | @property (nonatomic, retain) id newName __attribute__((ns_returns_not_retained)) ; |
| 6 | |
| 7 | @property (nonatomic, retain) id newName1 __attribute__((ns_returns_not_retained)) ; |
| 8 | - (id) newName1 __attribute__((ns_returns_not_retained)); |
| 9 | |
| 10 | @property (nonatomic, retain) id newName2 __attribute__((ns_returns_not_retained)); // expected-note {{roperty declared here}} |
| 11 | - (id) newName2; // expected-warning {{property declared as returning non-retained objects; getter returning retained objects}} |
| 12 | @end |
| 13 | |
| 14 | @implementation I |
| 15 | @synthesize newName; |
| 16 | |
| 17 | @synthesize newName1; |
| 18 | - (id) newName1 { return 0; } |
| 19 | |
Fariborz Jahanian | 7898005 | 2011-08-01 22:39:49 +0000 | [diff] [blame] | 20 | @synthesize newName2; |
Fariborz Jahanian | 831fb96 | 2011-06-25 00:17:46 +0000 | [diff] [blame] | 21 | @end |