clang/test/SemaCXX/P2788.cpp
raw| 1 | // RUN: rm -rf %t |
| 2 | // RUN: split-file %s %t |
| 3 | |
| 4 | |
| 5 | // RUN: %clang_cc1 -std=c++20 -verify -emit-module-interface %t/B.cpp -o %t/B.pcm |
| 6 | // RUN: %clang_cc1 -std=c++20 -verify -emit-module-interface %t/A.cpp -fmodule-file=A:B=%t/B.pcm -o %t/A.pcm |
| 7 | |
| 8 | //--- A.cpp |
| 9 | // expected-no-diagnostics |
| 10 | export module A; |
| 11 | import :B; |
| 12 | export int x = dimensions + 1; |
| 13 | |
| 14 | //--- B.cpp |
| 15 | // expected-no-diagnostics |
| 16 | export module A:B; |
| 17 | const int dimensions=3; |