]> granicus.if.org Git - clang/commitdiff
Testcase missed from r306075.
authorRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 26 Jun 2017 04:41:22 +0000 (04:41 +0000)
committerRichard Smith <richard-llvm@metafoo.co.uk>
Mon, 26 Jun 2017 04:41:22 +0000 (04:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306270 91177308-0d34-0410-b5e6-96231b3b80d8

test/Modules/interface-visibility.m [new file with mode: 0644]

diff --git a/test/Modules/interface-visibility.m b/test/Modules/interface-visibility.m
new file mode 100644 (file)
index 0000000..2bb124c
--- /dev/null
@@ -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