summaryrefslogtreecommitdiffstats
path: root/test/SemaObjC/arc-property-decl-attrs.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/arc-property-decl-attrs.m')
-rw-r--r--test/SemaObjC/arc-property-decl-attrs.m27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/SemaObjC/arc-property-decl-attrs.m b/test/SemaObjC/arc-property-decl-attrs.m
index ee48d310ed..7393f58199 100644
--- a/test/SemaObjC/arc-property-decl-attrs.m
+++ b/test/SemaObjC/arc-property-decl-attrs.m
@@ -225,3 +225,30 @@ __attribute__((objc_root_class))
@implementation TypeVsSetter
@synthesize prop; // expected-note {{property synthesized here}}
@end
+
+@protocol AutoStrongProp
+
+@property (nonatomic, readonly) NSObject *prop;
+
+@end
+
+@protocol AutoStrongProp_Internal <AutoStrongProp>
+
+// This property gets the 'strong' attribute automatically.
+@property (nonatomic, readwrite) NSObject *prop;
+
+@end
+
+@interface SynthesizeWithImplicitStrongNoError : NSObject <AutoStrongProp>
+@end
+
+@interface SynthesizeWithImplicitStrongNoError () <AutoStrongProp_Internal>
+
+@end
+
+@implementation SynthesizeWithImplicitStrongNoError
+
+// no error, 'strong' is implicit in the 'readwrite' property.
+@synthesize prop = _prop;
+
+@end