[AMDGPU][True16][CodeGen] true16 codegen pattern for v_med3_u/i16 (#121850)
[llvm-project.git] / clang / test / SemaTemplate / explicit-instantiation-cxx20.cpp
blob33500baf1e37b10704d7e72c225e60d9bd8e1ae1
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++20 %s
3 template<class T>
4 concept C = true;
6 template<class T>
7 concept D = C<T> && true;
9 template<typename T>
10 struct a {
11 void no_candidate() requires(false) {}
12 // expected-note@-1 {{candidate function not viable: constraints not satisfied}} \
13 // expected-note@-1 {{because 'false' evaluated to false}}
14 void no_candidate() requires(false && false) {}
15 // expected-note@-1 {{candidate function not viable: constraints not satisfied}} \
16 // expected-note@-1 {{because 'false' evaluated to false}}
18 void subsumes();
19 void subsumes() requires C<T>;
20 void subsumes() requires D<T> {};
22 void ok() requires false;
23 void ok() requires true {};
25 void ok2() requires false;
26 void ok2(){};
28 void ambiguous() requires true;
29 // expected-note@-1 {{candidate function}}
30 void ambiguous() requires C<T>;
31 // expected-note@-1 {{candidate function}}
33 template void a<int>::no_candidate();
34 // expected-error@-1 {{no viable candidate for explicit instantiation of 'no_candidate'}}
36 template void a<int>::ambiguous();
37 // expected-error@-1 {{partial ordering for explicit instantiation of 'ambiguous' is ambiguous}}
39 template void a<int>::ok();
40 template void a<int>::ok2();