Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / temp / temp.decls / temp.mem / p1.cpp
blobb48e145e1468dbd71c826ff0c7d732057cbd4e0d
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
4 template <class T> struct A {
5 static T cond;
7 template <class U> struct B {
8 static T twice(U value) {
9 return (cond ? value + value : value);
13 extern template bool A<bool>::cond;
15 int foo() {
16 A<bool>::cond = true;
17 return A<bool>::B<int>::twice(4);
20 namespace PR6376 {
21 template<typename T>
22 struct X {
23 template<typename Y>
24 struct Y1 { }; //
27 template<>
28 struct X<float> {
29 template<typename Y>
30 struct Y1 { };
33 template<typename T, typename U>
34 struct Z : public X<T>::template Y1<U> { };
36 Z<float, int> z0;