aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/iboutlet.m
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
committerDimitry Andric <dim@FreeBSD.org>2012-08-15 20:02:54 +0000
commit56d91b49b13fe55c918afbda19f6165b5fbff87a (patch)
tree9abb1a658a297776086f4e0dfa6ca533de02104e /test/SemaObjC/iboutlet.m
parent41e20f564abdb05101d6b2b29c59459a966c22cc (diff)
downloadsrc-56d91b49b13fe55c918afbda19f6165b5fbff87a.tar.gz
src-56d91b49b13fe55c918afbda19f6165b5fbff87a.zip
Vendor import of clang trunk r161861:vendor/clang/clang-trunk-r161861
Notes
Notes: svn path=/vendor/clang/dist/; revision=239313 svn path=/vendor/clang/clang-trunk-r161861/; revision=239314; tag=vendor/clang/clang-trunk-r161861
Diffstat (limited to 'test/SemaObjC/iboutlet.m')
-rw-r--r--test/SemaObjC/iboutlet.m23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/SemaObjC/iboutlet.m b/test/SemaObjC/iboutlet.m
new file mode 100644
index 000000000000..a29915c393a1
--- /dev/null
+++ b/test/SemaObjC/iboutlet.m
@@ -0,0 +1,23 @@
+// 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
+// rdar://11448209
+
+#define READONLY readonly
+
+@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}}
+
+@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}}
+
+@end
+
+@implementation I // expected-warning 3 {{readonly IBOutlet property when auto-synthesized may not work correctly with 'nib' loader}}
+@end