diff options
Diffstat (limited to 'test/SemaObjC/attr-objc-runtime-visible.m')
-rw-r--r-- | test/SemaObjC/attr-objc-runtime-visible.m | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/test/SemaObjC/attr-objc-runtime-visible.m b/test/SemaObjC/attr-objc-runtime-visible.m new file mode 100644 index 0000000000000..b5ec809ff2f58 --- /dev/null +++ b/test/SemaObjC/attr-objc-runtime-visible.m @@ -0,0 +1,19 @@ +// RUN: %clang_cc1 -verify -fsyntax-only %s + +__attribute__((objc_runtime_visible)) +@interface A +@end + +@interface A(X) +@end + +@implementation A(X) // expected-error{{cannot implement a category for class 'A' that is only visible via the Objective-C runtime}} +@end + +@interface B : A +@end + +@implementation B // expected-error{{cannot implement subclass 'B' of a superclass 'A' that is only visible via the Objective-C runtime}} +@end + + |