diff options
| author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-01-31 23:20:03 +0000 |
|---|---|---|
| committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-01-31 23:20:03 +0000 |
| commit | b5b5a59f185876899e94f29391331425c084347b (patch) | |
| tree | 279d11d85cf392aebbacfbd9200600ddfcbd00ae /clang/test | |
| parent | c30c39982d426062543b44e20da0dcf627fe6a72 (diff) | |
| download | bcm5719-llvm-b5b5a59f185876899e94f29391331425c084347b.tar.gz bcm5719-llvm-b5b5a59f185876899e94f29391331425c084347b.zip | |
Improve the diagnostic for -Wcustom-atomic-properties. Suggestion by Fariborz!
llvm-svn: 124620
Diffstat (limited to 'clang/test')
| -rw-r--r-- | clang/test/SemaObjC/custom-atomic-property.m | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/clang/test/SemaObjC/custom-atomic-property.m b/clang/test/SemaObjC/custom-atomic-property.m index cf3d473849f..f80119e1490 100644 --- a/clang/test/SemaObjC/custom-atomic-property.m +++ b/clang/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 |

