2012-04-07 02:12:22 +08:00
|
|
|
// RUN: %clang_cc1 -triple x86_64-apple-darwin11 -fsyntax-only -verify -Wno-objc-root-class %s
|
2011-06-25 08:17:46 +08:00
|
|
|
// rdar://9636091
|
|
|
|
|
|
|
|
@interface I
|
|
|
|
@property (nonatomic, retain) id newName __attribute__((ns_returns_not_retained)) ;
|
|
|
|
|
|
|
|
@property (nonatomic, retain) id newName1 __attribute__((ns_returns_not_retained)) ;
|
|
|
|
- (id) newName1 __attribute__((ns_returns_not_retained));
|
|
|
|
|
|
|
|
@property (nonatomic, retain) id newName2 __attribute__((ns_returns_not_retained)); // expected-note {{roperty declared here}}
|
|
|
|
- (id) newName2; // expected-warning {{property declared as returning non-retained objects; getter returning retained objects}}
|
|
|
|
@end
|
|
|
|
|
|
|
|
@implementation I
|
|
|
|
@synthesize newName;
|
|
|
|
|
|
|
|
@synthesize newName1;
|
|
|
|
- (id) newName1 { return 0; }
|
|
|
|
|
2011-08-02 06:39:49 +08:00
|
|
|
@synthesize newName2;
|
2011-06-25 08:17:46 +08:00
|
|
|
@end
|