2012-07-25 15:26:32 +08:00
|
|
|
// RUN: %clang_cc1 -fsyntax-only -fobjc-default-synthesize-properties -Wno-objc-root-class -verify %s
|
|
|
|
// RUN: %clang_cc1 -x objective-c++ -fsyntax-only -fobjc-default-synthesize-properties -Wno-objc-root-class -verify %s
|
2012-05-20 02:17:17 +08:00
|
|
|
// rdar://11448209
|
|
|
|
|
2012-05-22 01:02:43 +08:00
|
|
|
#define READONLY readonly
|
|
|
|
|
2012-05-20 02:17:17 +08:00
|
|
|
@class NSView;
|
|
|
|
|
|
|
|
#define IBOutlet __attribute__((iboutlet))
|
|
|
|
|
|
|
|
@interface I
|
|
|
|
@property (getter = MyGetter, readonly, assign) IBOutlet NSView *myView; // expected-note {{property declared here}} \
|
|
|
|
// expected-note {{readonly IBOutlet property should be changed to be readwrite}}
|
2012-05-22 01:02:43 +08:00
|
|
|
|
|
|
|
@property (readonly) IBOutlet NSView *myView1; // expected-note {{readonly IBOutlet property should be changed to be readwrite}} \
|
|
|
|
// expected-note {{property declared here}}
|
|
|
|
|
|
|
|
@property (getter = MyGetter, READONLY) IBOutlet NSView *myView2; // expected-note {{property declared here}}
|
|
|
|
|
2012-05-20 02:17:17 +08:00
|
|
|
@end
|
|
|
|
|
2012-05-22 01:02:43 +08:00
|
|
|
@implementation I // expected-warning 3 {{readonly IBOutlet property when auto-synthesized may not work correctly with 'nib' loader}}
|
2012-05-20 02:17:17 +08:00
|
|
|
@end
|