]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - test/SemaTemplate/canonical-expr-type-0x.cpp
Vendor import of clang release_30 branch r142614:
[FreeBSD/FreeBSD.git] / test / SemaTemplate / canonical-expr-type-0x.cpp
1 // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s
2
3 void 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
9 template<typename T, T N>
10 void f0(T x, decltype(f(N)) y) { } // expected-note{{previous}}
11
12 template<typename T, T N>
13 void f0(T x, decltype((f)(N)) y) { }
14
15 template<typename U, U M>
16 void f0(U u, decltype(f(M))) { } // expected-error{{redefinition}}