Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / temp / temp.spec / temp.expl.spec / p15.cpp
blob72f33df7efa42b48945269a7fbefe4c389bbed31
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
3 struct NonDefaultConstructible {
4 NonDefaultConstructible(const NonDefaultConstructible&); // expected-note{{candidate constructor}}
5 };
7 template<typename T, typename U>
8 struct X {
9 static T member;
12 template<typename T, typename U>
13 T X<T, U>::member; // expected-error{{no matching constructor}}
15 // Okay; this is a declaration, not a definition.
16 template<>
17 NonDefaultConstructible X<NonDefaultConstructible, long>::member;
19 NonDefaultConstructible &test(bool b) {
20 return b? X<NonDefaultConstructible, int>::member // expected-note{{instantiation}}
21 : X<NonDefaultConstructible, long>::member;
24 namespace rdar9422013 {
25 template<int>
26 struct X {
27 struct Inner {
28 static unsigned array[17];
32 template<> unsigned X<1>::Inner::array[]; // okay