Douglas Gregor | 0adaa88 | 2011-12-05 17:28:06 +0000 | [diff] [blame] | 1 | // RUN: rm -rf %t |
Douglas Gregor | c13a34b | 2012-01-03 19:32:59 +0000 | [diff] [blame] | 2 | // RUN: %clang_cc1 -x objective-c++ -fmodule-cache-path %t -fmodules -I %S/Inputs/wildcard-submodule-exports %s -verify |
| 3 | // FIXME: When we have a syntax for modules in C++, use that. |
Douglas Gregor | 0adaa88 | 2011-12-05 17:28:06 +0000 | [diff] [blame] | 4 | |
Ted Kremenek | 32ad2ee | 2012-03-01 22:07:04 +0000 | [diff] [blame] | 5 | @__experimental_modules_import C.One; |
Douglas Gregor | 0adaa88 | 2011-12-05 17:28:06 +0000 | [diff] [blame] | 6 | |
| 7 | void test_C_One() { |
| 8 | int *A1_ptr = A1; |
| 9 | long *C1_ptr = C1; |
| 10 | (void)B1; // expected-error{{use of undeclared identifier 'B1'}} |
| 11 | } |
| 12 | |
Ted Kremenek | 32ad2ee | 2012-03-01 22:07:04 +0000 | [diff] [blame] | 13 | @__experimental_modules_import C.Two; |
Douglas Gregor | 0adaa88 | 2011-12-05 17:28:06 +0000 | [diff] [blame] | 14 | |
| 15 | void test_C_Two() { |
| 16 | unsigned int *A2_ptr = A2; |
| 17 | unsigned short *B2_ptr = B2; |
| 18 | unsigned long *C2_ptr = C2; |
| 19 | } |
| 20 | |
Ted Kremenek | 32ad2ee | 2012-03-01 22:07:04 +0000 | [diff] [blame] | 21 | @__experimental_modules_import B.One; |
Douglas Gregor | 0adaa88 | 2011-12-05 17:28:06 +0000 | [diff] [blame] | 22 | |
| 23 | void test_B_One() { |
| 24 | short *B1_ptr = B1; |
| 25 | } |
| 26 | |