diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-06 23:23:27 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-10-06 23:23:27 +0000 |
commit | c076e37e2223cfe998fa5e657dece30da78fcdc4 (patch) | |
tree | 85391761a23e7d9965646c6cd3c89e43543ffc08 /test/SemaObjC/class-unavail-warning.m | |
parent | 3a387441ae339363ee5b254658f295e97bd9e913 (diff) |
Implicitly assume that a ObjC category to an unavailable interface is also unavailable;
only give an 'unavailable' error on the @implementation of the category. rdar://10234078
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@141335 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaObjC/class-unavail-warning.m')
-rw-r--r-- | test/SemaObjC/class-unavail-warning.m | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/test/SemaObjC/class-unavail-warning.m b/test/SemaObjC/class-unavail-warning.m index a0c2d5588e..b2bd388311 100644 --- a/test/SemaObjC/class-unavail-warning.m +++ b/test/SemaObjC/class-unavail-warning.m @@ -2,7 +2,7 @@ // rdar://9092208 __attribute__((unavailable("not available"))) -@interface MyClass { // expected-note 7 {{declaration has been explicitly marked unavailable here}} +@interface MyClass { // expected-note 8 {{declaration has been explicitly marked unavailable here}} @public void *_test; MyClass *ivar; // no error. @@ -21,6 +21,16 @@ __attribute__((unavailable("not available"))) - (MyClass *)meth; // expected-error {{unavailable}} @end +@interface MyClass (Cat1) +- (MyClass *)meth; // no error. +@end + +@interface MyClass (Cat2) // no error. +@end + +@implementation MyClass (Cat2) // expected-error {{unavailable}} +@end + int main() { [MyClass new]; // expected-error {{'MyClass' is unavailable: not available}} [MyClass self]; // expected-error {{'MyClass' is unavailable: not available}} |