Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / temp / temp.spec / temp.explicit / p1-0x.cpp
blob580ef3151e5d39c34b97b5ebc5cd8c33966415df
1 // RUN: %clang_cc1 -fsyntax-only -std=c++11 -verify %s
3 template<typename T>
4 struct X {
5 void f() {}
6 };
8 template inline void X<int>::f(); // expected-error{{explicit instantiation cannot be 'inline'}}
10 template<typename T>
11 struct Y {
12 constexpr int f() { return 0; } // expected-warning{{C++14}}
15 template constexpr int Y<int>::f() const; // expected-error{{explicit instantiation cannot be 'constexpr'}}
17 template<typename T>
18 struct Z {
19 enum E : T { e1, e2 };
20 T t; // expected-note {{refers here}}
23 template enum Z<int>::E; // expected-error {{enumerations cannot be explicitly instantiated}}
24 template int Z<int>::t; // expected-error {{explicit instantiation of 't' does not refer to}}