aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/canonical-expr-type-0x.cpp
blob: 21552105b0ff925a19884622eb6d92a07b2d4f20 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: clang-cc -fsyntax-only -verify -std=c++0x %s

void f();

// FIXME: would like to refer to the first function parameter in these test,
// but that won't work (yet).

// Test typeof(expr) canonicalization
template<typename T, T N>
void f0(T x, decltype(f(N)) y) { } // expected-note{{previous}}

template<typename T, T N>
void f0(T x, decltype((f)(N)) y) { }

template<typename U, U M>
void f0(U u, decltype(f(M))) { } // expected-error{{redefinition}}