opnsense-src/test/SemaTemplate/canonical-expr-type-0x.cpp

17 lines
461 B
C++
Raw Normal View History

2010-01-01 05:34:51 -05:00
// RUN: %clang_cc1 -fsyntax-only -verify -std=c++0x %s
2009-10-14 14:03:49 -04:00
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}}