Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / CXX / temp / temp.spec / temp.explicit / p6.cpp
blob0f5db211905259ed3a1fa34b9252f9e39492fc49
1 // RUN: %clang_cc1 -fsyntax-only -verify %s
2 // expected-no-diagnostics
4 template<class T> class Array { /* ... */ };
5 template<class T> void sort(Array<T>& v) { }
7 // instantiate sort(Array<int>&) - template-argument deduced
8 template void sort<>(Array<int>&);
10 template void sort(Array<long>&);
12 template<typename T, typename U> void f0(T, U*) { }
14 template void f0<int>(int, float*);
15 template void f0<>(double, float*);
17 template<typename T> struct hash { };
18 struct S {
19 bool operator==(const S&) const { return false; }
22 template<typename T> struct Hash_map {
23 void Method(const T& x) { h(x); }
24 hash<T> h;
27 Hash_map<S> *x;
28 const Hash_map<S> *foo() {
29 return x;
32 template<> struct hash<S> {
33 int operator()(const S& k) const {
34 return 0;