brintos

brintos / llvm-project-archived public Read only

0
0
Text · 530 B · 0589161 Raw
25 lines · plain
1// RUN: rm -rf %t2// RUN: mkdir %t3// RUN: split-file %s %t4//5// RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm6// RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t -I%t %t/p2468r2.cpp -verify7 8//--- A.cppm9module;10export module A;11export {12namespace NS {13struct S {};14bool operator==(S, int);15} // namespace NS16}17 18namespace NS { bool operator!=(S, int); } // Not visible.19 20 21//--- p2468r2.cpp22// expected-no-diagnostics23import A;24bool x = 0 == NS::S(); // Ok. operator!= from module A is not visible.25