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
|
2013-02-09 15:13:16 +08:00
|
|
|
@property (getter = MyGetter, readonly, assign) IBOutlet NSView *myView; // expected-warning {{readonly IBOutlet property 'myView' when auto-synthesized may not work correctly with 'nib' loader}} expected-note {{property should be changed to be readwrite}}
|
2012-05-22 01:02:43 +08:00
|
|
|
|
2013-02-09 15:13:16 +08:00
|
|
|
@property (readonly) IBOutlet NSView *myView1; // expected-warning {{readonly IBOutlet property 'myView1' when auto-synthesized may not work correctly with 'nib' loader}} expected-note {{property should be changed to be readwrite}}
|
2012-05-22 01:02:43 +08:00
|
|
|
|
2013-02-09 15:13:16 +08:00
|
|
|
@property (getter = MyGetter, READONLY) IBOutlet NSView *myView2; // expected-warning {{readonly IBOutlet property 'myView2' when auto-synthesized may not work correctly with 'nib' loader}}
|
2012-05-22 01:02:43 +08:00
|
|
|
|
2012-05-20 02:17:17 +08:00
|
|
|
@end
|
|
|
|
|
2013-02-09 15:13:16 +08:00
|
|
|
@implementation I
|
2012-05-20 02:17:17 +08:00
|
|
|
@end
|
2013-02-09 07:32:30 +08:00
|
|
|
|
|
|
|
|
|
|
|
// rdar://13123861
|
|
|
|
@class UILabel;
|
|
|
|
|
|
|
|
@interface NSObject @end
|
|
|
|
|
|
|
|
@interface RKTFHView : NSObject
|
2013-02-09 15:13:16 +08:00
|
|
|
@property( readonly ) __attribute__((iboutlet)) UILabel *autoReadOnlyReadOnly; // expected-warning {{readonly IBOutlet property 'autoReadOnlyReadOnly' when auto-synthesized may not work correctly with 'nib' loader}} expected-note {{property should be changed to be readwrite}}
|
2013-02-09 07:32:30 +08:00
|
|
|
@property( readonly ) __attribute__((iboutlet)) UILabel *autoReadOnlyReadWrite;
|
|
|
|
@property( readonly ) __attribute__((iboutlet)) UILabel *synthReadOnlyReadWrite;
|
|
|
|
@end
|
|
|
|
|
|
|
|
@interface RKTFHView()
|
|
|
|
@property( readwrite ) __attribute__((iboutlet)) UILabel *autoReadOnlyReadWrite;
|
|
|
|
@property( readwrite ) __attribute__((iboutlet)) UILabel *synthReadOnlyReadWrite;
|
|
|
|
@end
|
|
|
|
|
2013-02-09 15:13:16 +08:00
|
|
|
@implementation RKTFHView
|
2013-02-09 07:32:30 +08:00
|
|
|
@synthesize synthReadOnlyReadWrite=_synthReadOnlyReadWrite;
|
|
|
|
@end
|