summaryrefslogtreecommitdiffstats
path: root/test/Modules
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2017-06-26 04:41:22 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2017-06-26 04:41:22 +0000
commit5e20da547e5b423629b840120dd79bedd858a37b (patch)
tree6155465c96a5a0da139a1bfb59af76694aa64e3a /test/Modules
parent9aa5da98fa039407661e61e35538bee210f4c278 (diff)
Testcase missed from r306075.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306270 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Modules')
-rw-r--r--test/Modules/interface-visibility.m29
1 files changed, 29 insertions, 0 deletions
diff --git a/test/Modules/interface-visibility.m b/test/Modules/interface-visibility.m
new file mode 100644
index 0000000000..2bb124ce09
--- /dev/null
+++ b/test/Modules/interface-visibility.m
@@ -0,0 +1,29 @@
+// RUN: %clang_cc1 -fmodules -fobjc-arc -x objective-c-module-map %s -fmodule-name=Foo -verify
+
+module Foo {}
+
+#pragma clang module contents
+#pragma clang module begin Foo
+
+// expected-no-diagnostics
+
+#pragma clang module build Foundation
+module Foundation {}
+#pragma clang module contents
+#pragma clang module begin Foundation
+@interface NSIndexSet
+@end
+#pragma clang module end
+#pragma clang module endbuild
+
+#pragma clang module import Foundation
+
+@interface NSIndexSet (Testing)
+- (int)foo;
+@end
+
+static inline int test(NSIndexSet *obj) {
+ return [obj foo];
+}
+
+#pragma clang module end