blob: 96ef3eddecb15ce33a7ca6393470788f7d123d5d [file] [log] [blame]
Patrick Beardb2f68202012-04-06 18:12:22 +00001// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -verify -Wno-objc-root-class %s
Fariborz Jahanian831fb962011-06-25 00:17:46 +00002// 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 Jahanian78980052011-08-01 22:39:49 +000020@synthesize newName2;
Fariborz Jahanian831fb962011-06-25 00:17:46 +000021@end