| 1 |
// RUN: rm -rf %t |
| 2 |
// RUN: split-file %s %t |
| 3 |
|
| 4 |
|
| 5 |
// RUN: %clang -std=c++20 -fmodule-header %t/A.h -o %t/A.pcm |
| 6 |
// RUN: %clang -std=c++20 -fmodule-header %t/B.h -o %t/B.pcm |
| 7 |
// RUN: %clang -std=c++20 -fsyntax-only -fmodule-file=%t/A.pcm -fmodule-file=%t/B.pcm %t/main.cpp |
| 8 |
|
| 9 |
//--- A.h |
| 10 |
// expected-no-diagnostics |
| 11 |
enum { A = 0 }; |
| 12 |
|
| 13 |
//--- B.h |
| 14 |
// expected-no-diagnostics |
| 15 |
enum { B = 1 }; |
| 16 |
|
| 17 |
//--- main.cpp |
| 18 |
// expected-no-diagnostics |
| 19 |
import "A.h"; |
| 20 |
import "B.h"; |
| 21 |
int main() {} |