aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/iboutlet.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/iboutlet.m')
-rw-r--r--test/SemaObjC/iboutlet.m31
1 files changed, 25 insertions, 6 deletions
diff --git a/test/SemaObjC/iboutlet.m b/test/SemaObjC/iboutlet.m
index a29915c393a1..01e1bfc13bea 100644
--- a/test/SemaObjC/iboutlet.m
+++ b/test/SemaObjC/iboutlet.m
@@ -9,15 +9,34 @@
#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}}
+@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}}
-@property (readonly) IBOutlet NSView *myView1; // expected-note {{readonly IBOutlet property should be changed to be readwrite}} \
- // expected-note {{property declared here}}
+@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}}
-@property (getter = MyGetter, READONLY) IBOutlet NSView *myView2; // expected-note {{property declared here}}
+@property (getter = MyGetter, READONLY) IBOutlet NSView *myView2; // expected-warning {{readonly IBOutlet property 'myView2' when auto-synthesized may not work correctly with 'nib' loader}}
@end
-@implementation I // expected-warning 3 {{readonly IBOutlet property when auto-synthesized may not work correctly with 'nib' loader}}
+@implementation I
+@end
+
+
+// rdar://13123861
+@class UILabel;
+
+@interface NSObject @end
+
+@interface RKTFHView : NSObject
+@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}}
+@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
+
+@implementation RKTFHView
+@synthesize synthReadOnlyReadWrite=_synthReadOnlyReadWrite;
@end