r306270 - Testcase missed from r306075.

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Sun Jun 25 21:41:22 PDT 2017


Author: rsmith
Date: Sun Jun 25 21:41:22 2017
New Revision: 306270

URL: http://llvm.org/viewvc/llvm-project?rev=306270&view=rev
Log:
Testcase missed from r306075.

Added:
    cfe/trunk/test/Modules/interface-visibility.m

Added: cfe/trunk/test/Modules/interface-visibility.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Modules/interface-visibility.m?rev=306270&view=auto
==============================================================================
--- cfe/trunk/test/Modules/interface-visibility.m (added)
+++ cfe/trunk/test/Modules/interface-visibility.m Sun Jun 25 21:41:22 2017
@@ -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
+ at interface NSIndexSet
+ at end
+#pragma clang module end
+#pragma clang module endbuild
+
+#pragma clang module import Foundation
+
+ at interface NSIndexSet (Testing)
+- (int)foo;
+ at end
+
+static inline int test(NSIndexSet *obj) {
+  return [obj foo];
+}
+
+#pragma clang module end




More information about the cfe-commits mailing list