Debian Codegraph @

clang/test/Modules/module-local-declarations.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/Base.cppm -emit-module-interface -o %t/Base.pcm
6 // RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm -fprebuilt-module-path=%t
7 // RUN: %clang_cc1 -std=c++20 %t/B.cppm -fsyntax-only -verify -fprebuilt-module-path=%t
8
9 //--- Base.cppm
10 export module Base;
11 export template <class T>
12 class Base {};
13
14 //--- A.cppm
15 export module A;
16 import Base;
17 struct S {};
18
19 export Base<S> a;
20
21 //--- B.cppm
22 // expected-no-diagnostics
23 export module B;
24
25 import A;
26 import Base;
27
28 struct S {};
29
30 export Base<S> b;