aboutsummaryrefslogtreecommitdiff
path: root/test/SemaObjC/custom-atomic-property.m
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaObjC/custom-atomic-property.m')
-rw-r--r--test/SemaObjC/custom-atomic-property.m14
1 files changed, 12 insertions, 2 deletions
diff --git a/test/SemaObjC/custom-atomic-property.m b/test/SemaObjC/custom-atomic-property.m
index cf3d473849..f80119e149 100644
--- a/test/SemaObjC/custom-atomic-property.m
+++ b/test/SemaObjC/custom-atomic-property.m
@@ -5,6 +5,16 @@
@end
@implementation Foo
- -(Foo*)myProp {return 0;} // expected-warning {{atomic by default property 'myProp' has a user defined setter/getter (property should be marked 'atomic' if this is intended)}}
- -(void)setMyProp:(Foo*)e {} // expected-warning {{atomic by default property 'myProp' has a user defined setter/getter (property should be marked 'atomic' if this is intended)}}
+ -(Foo*)myProp {return 0;} // expected-warning {{atomic by default property 'myProp' has a user defined getter (property should be marked 'atomic' if this is intended)}}
+ -(void)setMyProp:(Foo*)e {} // expected-warning {{atomic by default property 'myProp' has a user defined setter (property should be marked 'atomic' if this is intended)}}
+@end
+
+@interface Foo2 {
+ Foo *myProp;
+}
+@property (assign) Foo *myProp;
+@end
+
+@implementation Foo2
+@synthesize myProp; // no warnings.
@end