Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / clang / test / SemaTemplate / canonical-expr-type-0x.cpp
blobd7379eadab1a52871e9d51ad96cea8397876e5fb
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
3 void f();
5 // Test typeof(expr) canonicalization
6 template<typename T, T N>
7 void f0(T x, decltype(f(N, x)) y) { } // expected-note{{previous}}
9 template<typename T, T N>
10 void f0(T x, decltype((f)(N, x)) y) { }
12 template<typename U, U M>
13 void f0(U u, decltype(f(M, u))) { } // expected-error{{redefinition}}
15 // PR12438: Test sizeof...() canonicalization
16 template<int> struct N {};
18 template<typename...T>
19 N<sizeof...(T)> f1() {} // expected-note{{previous}}
21 template<typename, typename...T>
22 N<sizeof...(T)> f1() {}
24 template<class...U>
25 N<sizeof...(U)> f1() {} // expected-error{{redefinition}}