summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/default-synthesize.m
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2011-12-15 01:03:18 +0000
committerFariborz Jahanian <fjahanian@apple.com>2011-12-15 01:03:18 +0000
commitf8aba8c618920db8f6ef2db0c554b0c270503cef (patch)
treecbcecd19dc1ba450b7a50ab275850429d9d6413c /test/SemaObjC/default-synthesize.m
parent5e3a8bea1cb3a8508a99982278934df32ccc7387 (diff)
objc: do not auto synthesize properties declared in
protocols; with a warning. // rdar://10567333 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@146626 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/default-synthesize.m')
-rw-r--r--test/SemaObjC/default-synthesize.m13
1 files changed, 13 insertions, 0 deletions
diff --git a/test/SemaObjC/default-synthesize.m b/test/SemaObjC/default-synthesize.m
index 0d2f473399..d608ded97a 100644
--- a/test/SemaObjC/default-synthesize.m
+++ b/test/SemaObjC/default-synthesize.m
@@ -115,3 +115,16 @@
@synthesize PROP=IVAR;
@end
+// rdar://10567333
+@protocol MyProtocol
+@property (nonatomic, strong) NSString *requiredString; // expected-note {{property declared here}}
+
+@optional
+@property (nonatomic, strong) NSString *optionalString;
+@end
+
+@interface MyClass <MyProtocol>
+@end
+
+@implementation MyClass // expected-warning {{auto property synthesis will not synthesize property declared in a protocol}}
+@end