From: Richard Smith Date: Mon, 26 Jun 2017 04:41:22 +0000 (+0000) Subject: Testcase missed from r306075. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5e20da547e5b423629b840120dd79bedd858a37b;p=clang Testcase missed from r306075. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@306270 91177308-0d34-0410-b5e6-96231b3b80d8 --- 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