clang/test/Modules/visibility-for-implicit-global-module.cppm
raw| 1 | // RUN: rm -rf %t |
| 2 | // RUN: mkdir %t |
| 3 | // RUN: split-file %s %t |
| 4 | // |
| 5 | // RUN: %clang_cc1 -std=c++20 %t/a.interface.cppm -emit-module-interface -o %t/a.pcm |
| 6 | // RUN: %clang_cc1 -std=c++20 %t/a.impl.cc -fmodule-file=a:interface=%t/a.pcm \ |
| 7 | // RUN: -verify -fsyntax-only |
| 8 | |
| 9 | //--- a.interface.cppm |
| 10 | export module a:interface; |
| 11 | extern "C++" constexpr int a = 43; |
| 12 | |
| 13 | //--- a.impl.cc |
| 14 | // expected-no-diagnostics |
| 15 | module a:impl; |
| 16 | import :interface; |
| 17 | static_assert(a == 43); |
| 18 |