Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / temp / temp.constr / temp.constr.decl / var-template-decl.cpp
blobeabb636b0bbbf33bcaacad8f2e3d187e860de256
1 // RUN: %clang_cc1 -std=c++2a -x c++ -verify %s
3 namespace nodiag {
5 struct B {
6 template <typename T> requires (bool(T()))
7 static int A;
8 };
10 template <typename U> requires (bool(U()))
11 int B::A = int(U());
13 } // end namespace nodiag
15 namespace diag {
17 struct B {
18 template <typename T> requires (bool(T())) // expected-note{{previous template declaration is here}}
19 static int A;
22 template <typename U> requires (!bool(U())) // expected-error{{requires clause differs in template redeclaration}}
23 int B::A = int(U());
25 } // end namespace diag