aboutsummaryrefslogtreecommitdiff
path: root/test/SemaTemplate/canonical-expr-type.cpp
blob: 250420bedb15697c3601900168c45c2e25e2afed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// RUN: clang-cc -fsyntax-only -verify %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, __typeof__(f(N)) y) { } // expected-note{{previous}}

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

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