diff options
Diffstat (limited to 'test/SemaTemplate/canonical-expr-type-0x.cpp')
-rw-r--r-- | test/SemaTemplate/canonical-expr-type-0x.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/test/SemaTemplate/canonical-expr-type-0x.cpp b/test/SemaTemplate/canonical-expr-type-0x.cpp new file mode 100644 index 0000000..2155210 --- /dev/null +++ b/test/SemaTemplate/canonical-expr-type-0x.cpp @@ -0,0 +1,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}} |