Debian Codegraph @

clang/test/Modules/pr143788.cppm

raw
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/M.cppm -emit-module-interface -o %t/M.pcm
6 // RUN: %clang_cc1 -std=c++20 %t/P.cppm -emit-module-interface -o %t/P.pcm
7 // RUN: %clang_cc1 -std=c++20 %t/I.cpp -fmodule-file=M:P=%t/P.pcm -fmodule-file=M=%t/M.pcm -fsyntax-only -verify
8
9 //--- H.hpp
10 struct S{};
11
12 //--- M.cppm
13 export module M;
14
15
16 //--- P.cppm
17 module;
18 #include "H.hpp"
19 module M:P;
20
21 using T = S;
22
23 //--- I.cpp
24 // expected-no-diagnostics
25 module M;
26 import :P;
27
28 T f() { return {}; }