xref: /llvm-project/clang/test/Modules/Reachability-using.cpp (revision da00c60dae0040185dc45039c4397f6e746548e9)
1 // RUN: rm -rf %t
2 // RUN: mkdir -p %t
3 // RUN: split-file %s %t
4 //
5 // RUN: %clang_cc1 -std=c++20 %t/mod.cppm -emit-module-interface -o %t/mod.pcm
6 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -fsyntax-only -verify
7 
8 // RUN: %clang_cc1 -std=c++20 %t/mod.cppm -emit-reduced-module-interface -o %t/mod.pcm
9 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp -fsyntax-only -verify
10 //
11 //--- mod.cppm
12 export module mod;
13 struct t {};
14 export using u = t;
15 
16 //--- Use.cpp
17 // expected-no-diagnostics
18 import mod;
foo()19 void foo() {
20   u v{};
21 }
22