3 // RUN: split-file %s %t
5 // RUN: %clang_cc1 -xc++ -std=c++20 -fmodules -fmodule-name=library \
6 // RUN: -emit-module %t/modules.map \
7 // RUN: -o %t/module.pcm \
17 module
"conflicting" {
19 header
"conflicting.h"
28 concept ConflictingConcept
= true;
30 template <class T
, class U
>
31 concept same_as
= __is_same(T
, U
);
33 template<class T
> concept truec
= true;
37 #endif // SAMEAS_CONCEPTS_H
45 template <class T
, class U
= int>
46 concept ConflictingConcept
= true; // expected-error {{redefinition of concept 'ConflictingConcept' with different template}}
47 // expected-note@* {{previous definition}}
49 int same_as
; // expected-error {{redefinition of 'same_as' as different kind of symbol}}
50 // expected-note@* {{previous definition}}
52 template<class T
> concept var
= false; // expected-error {{redefinition of 'var' as different kind of symbol}}
53 // expected-note@* {{previous definition}}
55 template<class T
> concept truec
= true; // expected-error {{redefinition of 'truec'}}
56 // expected-note@* {{previous definition}}
57 #endif // CONFLICTING_H