diff options
| author | John McCall <rjmccall@apple.com> | 2010-11-10 07:01:40 +0000 |
|---|---|---|
| committer | John McCall <rjmccall@apple.com> | 2010-11-10 07:01:40 +0000 |
| commit | ad31b5f2cb0eb7996bcd88921f050b7041572fc4 (patch) | |
| tree | cf95d8aad14639ebc2b3213249b7fead50e648ac /clang/test/SemaObjC | |
| parent | 5eec2b0bd38ad650d09c8afa01e6f3df002d9816 (diff) | |
| download | bcm5719-llvm-ad31b5f2cb0eb7996bcd88921f050b7041572fc4.tar.gz bcm5719-llvm-ad31b5f2cb0eb7996bcd88921f050b7041572fc4.zip | |
Propagate the deprecated and unavailable attributes from a
@property declaration to the autogenerated methods. I'm uncertain
whether this should apply to attributes in general, but these are
a reasonable core.
Implements rdar://problem/8617301
llvm-svn: 118676
Diffstat (limited to 'clang/test/SemaObjC')
| -rw-r--r-- | clang/test/SemaObjC/attr-deprecated.m | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/SemaObjC/attr-deprecated.m b/clang/test/SemaObjC/attr-deprecated.m index a58068bf832..d3d5f9537b7 100644 --- a/clang/test/SemaObjC/attr-deprecated.m +++ b/clang/test/SemaObjC/attr-deprecated.m @@ -97,3 +97,14 @@ __attribute ((deprecated)) @end +@interface Test2 +@property int test2 __attribute__((deprecated)); +@end + +void test(Test2 *foo) { + int x; + x = foo.test2; // expected-warning {{'test2' is deprecated}} + x = [foo test2]; // expected-warning {{'test2' is deprecated}} + foo.test2 = x; // expected-warning {{'test2' is deprecated}} + [foo setTest2: x]; // expected-warning {{'setTest2:' is deprecated}} +} |

