Debian Codegraph @

clang/test/Modules/pr159424.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/b.cppm -fmodule-file=a=%t/a.pcm -fsyntax-only -verify
7
8 //--- a.cppm
9 export module a;
10
11 namespace n {
12
13 struct monostate {
14 friend auto operator==(monostate, monostate) -> bool = default;
15 };
16
17 export struct a {
18 friend auto operator==(a, a) -> bool = default;
19 monostate m;
20 };
21
22 } // namespace n
23
24 //--- b.cppm
25 // expected-no-diagnostics
26 export module b;
27
28 import a;
29
30 namespace n {
31
32 export auto b() -> bool {
33 return a() == a();
34 }
35
36 } // namespace n