3 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -std=c++20 %t/A.cppm -emit-module-interface -o %t/A.pcm
6 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp \
7 // RUN: -fsyntax-only -verify
9 // RUN: %clang_cc1 -std=c++20 %t/B.cppm -emit-module-interface -o %t/B.pcm
10 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cpp \
11 // RUN: -fsyntax-only -verify -DIMPORT_MODULE_B
34 //--- another_records.h
60 export using ::NoNameEntity;
62 export constexpr A a_a{};
63 export constexpr NoNameEntity NoName_a{};
64 export constexpr U u_a{};
71 export using ::NoNameEntity;
73 export constexpr A a_b{};
74 export constexpr NoNameEntity NoName_b{};
75 export constexpr U u_b{};
78 // expected-no-diagnostics
80 #ifdef IMPORT_MODULE_B
82 static_assert(__is_same(decltype(a_a), decltype(a_b)));
83 static_assert(__is_same(decltype(NoName_a), decltype(NoName_b)));
84 static_assert(__is_same(decltype(u_a), decltype(u_b)));
87 A a; // Shouldn't be ambiguous after import B;
91 NoNameEntity Anonymous;