blob: 94ae360b43ef044f3d4ba2eb531211050d44f82f [file] [log] [blame]
Richard Smith762bb9d2011-10-13 22:29:44 +00001// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
Douglas Gregor9d702ae2009-07-30 23:36:40 +00002
3void f();
4
5// FIXME: would like to refer to the first function parameter in these test,
6// but that won't work (yet).
7
8// Test typeof(expr) canonicalization
9template<typename T, T N>
10void f0(T x, decltype(f(N)) y) { } // expected-note{{previous}}
11
12template<typename T, T N>
13void f0(T x, decltype((f)(N)) y) { }
14
15template<typename U, U M>
Owen Andersonc9c88b42009-07-31 20:28:54 +000016void f0(U u, decltype(f(M))) { } // expected-error{{redefinition}}