Debian Codegraph @

clang/test/Modules/pr119947.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/a.cppm -emit-reduced-module-interface -o %t/a.pcm
6 // RUN: %clang_cc1 -std=c++20 %t/use.cpp -fprebuilt-module-path=%t -emit-llvm -o -
7
8
9 //--- a.cppm
10 export module a;
11
12 struct a_inner {
13 ~a_inner() {
14 }
15 void f(auto) {
16 }
17 };
18
19 export template<typename T>
20 struct a {
21 a() {
22 struct local {};
23 inner.f(local());
24 }
25 private:
26 a_inner inner;
27 };
28
29
30 namespace {
31
32 struct s {
33 };
34
35 } // namespace
36
37 void f() {
38 a<s> x;
39 }
40
41 //--- use.cpp
42 import a;
43
44 namespace {
45
46 struct s {
47 };
48
49 } // namespace
50
51 void g() {
52 a<s> x;
53 }
54