3 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/a.cppm -o %t/a.pcm
6 // RUN: %clang_cc1 -std=c++20 %t/b.cppm -fprebuilt-module-path=%t -emit-module-interface -o %t/b.pcm -verify
8 // Testing the behavior of `-fskip-odr-check-in-gmf`
9 // RUN: %clang_cc1 -std=c++20 -fskip-odr-check-in-gmf -emit-module-interface %t/a.cppm -o \
11 // RUN: %clang_cc1 -std=c++20 -fskip-odr-check-in-gmf %t/b.cppm -fprebuilt-module-path=%t \
12 // RUN: -emit-module-interface -DSKIP_ODR_CHECK_IN_GMF -o %t/b.pcm -verify
14 // RUN: %clang_cc1 -std=c++20 -emit-reduced-module-interface %t/a.cppm -o %t/a.pcm
15 // RUN: %clang_cc1 -std=c++20 %t/b.cppm -fprebuilt-module-path=%t -emit-reduced-module-interface \
16 // RUN: -o %t/b.pcm -verify -DREDUCED
23 void operator &&(_Dom1 __v, _Dom1 __w)
32 template<typename... _Types>
35 static constexpr bool _S_copy_ctor =
36 (__is_trivial(_Types) && ...);
39 template<typename... _Types>
44 noexcept((__is_trivial(_Types) && ...))
52 // The operator&& defined in 'foo.h' will pollute the
53 // expression '__is_trivial(_Types) && ...' in bar.h
57 export namespace std {
60 using std::operator&&;
68 export namespace std {
71 using std::operator&&;
74 #ifdef SKIP_ODR_CHECK_IN_GMF
75 // expected-no-diagnostics
77 // expected-error@* {{has different definitions in different modules; first difference is defined here found data member '_S_copy_ctor' with an initializer}}
78 // expected-note@* {{but in 'a.<global>' found data member '_S_copy_ctor' with a different initializer}}