3 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/same_as.cppm -o %t/same_as.pcm
6 // RUN: %clang_cc1 -std=c++20 -emit-module-interface -fprebuilt-module-path=%t %t/concepts.cppm -o %t/concepts.pcm
7 // RUN: %clang_cc1 -std=c++20 -emit-module-interface -fprebuilt-module-path=%t %t/format.cppm -o %t/format.pcm
8 // RUN: %clang_cc1 -std=c++20 -emit-module-interface %t/conflicting.cppm -o %t/conflicting.pcm
9 // RUN: %clang_cc1 -std=c++20 -fprebuilt-module-path=%t %t/Use.cppm -fsyntax-only -verify
12 export module same_as
;
13 export
template <class T
, class U
>
14 concept same_as
= __is_same(T
, U
);
17 export module concepts
;
18 export import same_as
;
20 export
template <class T
>
21 concept ConflictingConcept
= true;
26 export import concepts
;
27 export import same_as
;
29 export
template <class T
> void foo()
30 requires same_as
<T
, int>
33 //--- conflicting.cppm
34 export module conflicting
;
35 export
template <class T
, class U
= int>
36 concept ConflictingConcept
= true;
42 template <class T
> void foo()
43 requires same_as
<T
, T
>
45 ConflictingConcept
auto x
= 10; // expected-error {{reference to 'ConflictingConcept' is ambiguous}}
46 // expected-note@* 2 {{candidate}}