[X86] Move getGFNICtrlMask before CTLZ/CTTZ lowering. NFC.
[llvm-project.git] / clang / test / SemaCXX / specialization-diagnose-crash.cpp
blob5fd387cab19d97074ab1137039fae53f37668b60
1 // RUN: %clang_cc1 -fsyntax-only %s --std=c++17 -verify
2 // This is a reduction of GH57370 and GH58028, originally appearing
3 // in libstdc++'s variant code.
5 struct V1 {};
6 struct V2 : V1 {
7 int &a;
8 };
10 template <class T> using void_t = void;
12 template <class T> struct X { T x; };
14 template <class T1, class T2, class = void> struct Variant {
15 Variant() = delete; // expected-note {{deleted here}}
18 template <class T1, class T2>
19 struct Variant<T1, T2, void_t<decltype(X<T2>{T1()})>> {};
21 void f() {
22 Variant<V1, V1>();
23 Variant<V1, V2>(); // expected-error {{call to deleted constructor}}