Richard Smith | c0de2f2 | 2017-06-26 04:41:22 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fmodules -fobjc-arc -x objective-c-module-map %s -fmodule-name=Foo -verify |
| 2 | |
| 3 | module Foo {} |
| 4 | |
| 5 | #pragma clang module contents |
| 6 | #pragma clang module begin Foo |
| 7 | |
| 8 | // expected-no-diagnostics |
| 9 | |
| 10 | #pragma clang module build Foundation |
| 11 | module Foundation {} |
| 12 | #pragma clang module contents |
| 13 | #pragma clang module begin Foundation |
| 14 | @interface NSIndexSet |
| 15 | @end |
| 16 | #pragma clang module end |
| 17 | #pragma clang module endbuild |
| 18 | |
| 19 | #pragma clang module import Foundation |
| 20 | |
| 21 | @interface NSIndexSet (Testing) |
| 22 | - (int)foo; |
| 23 | @end |
| 24 | |
| 25 | static inline int test(NSIndexSet *obj) { |
| 26 | return [obj foo]; |
| 27 | } |
| 28 | |
| 29 | #pragma clang module end |