brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · d415e49 Raw
44 lines · plain
1// RUN: rm -rf %t2// RUN: split-file %s %t3// RUN: cd %t4//5// RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-module-interface -o %t/a.pcm6// RUN: %clang_cc1 -std=c++20 %t/b.cppm -emit-module-interface -o %t/b.pcm \7// RUN:     -fmodule-file=a=%t/a.pcm8// RUN: %clang_cc1 -std=c++20 %t/use.cc -fmodule-file=a=%t/a.pcm -fmodule-file=b=%t/b.pcm \9// RUN:     -fsyntax-only -verify10//11// RUN: %clang_cc1 -std=c++20 %t/a.cppm -emit-reduced-module-interface -o %t/a.pcm12// RUN: %clang_cc1 -std=c++20 %t/b.cppm -emit-reduced-module-interface -o %t/b.pcm \13// RUN:     -fmodule-file=a=%t/a.pcm14// RUN: %clang_cc1 -std=c++20 %t/use.cc -fmodule-file=a=%t/a.pcm -fmodule-file=b=%t/b.pcm \15// RUN:     -fsyntax-only -verify16 17//--- a.cppm18export module a;19 20namespace n {21}22 23//--- b.cppm24export module b;25import a;26 27namespace n {28struct monostate {29	friend bool operator==(monostate, monostate) = default;30};31 32export struct wrapper {33	friend bool operator==(wrapper const &, wrapper const &) = default;34 35	monostate m_value;36};37}38 39//--- use.cc40// expected-no-diagnostics41import b;42 43static_assert(n::wrapper() == n::wrapper());44