Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaTemplate / instantiate-declref-ice.cpp
blob7cdeda6fb9dae13eb7c0140137cee69bdd588c0b
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
3 template<int i> struct x {
4 static const int j = i;
5 x<j>* y;
6 };
8 template<int i>
9 const int x<i>::j;
11 int array0[x<2>::j];
13 template<typename T>
14 struct X0 {
15 static const unsigned value = sizeof(T);
18 template<typename T>
19 const unsigned X0<T>::value;
21 int array1[X0<int>::value == sizeof(int)? 1 : -1];
23 const unsigned& testX0() { return X0<int>::value; }
25 int array2[X0<int>::value == sizeof(int)? 1 : -1];
27 template<typename T>
28 struct X1 {
29 static const unsigned value;
32 template<typename T>
33 const unsigned X1<T>::value = sizeof(T);
35 int array3[X1<int>::value == sizeof(int)? 1 : -1];