Richard Smith | 762bb9d | 2011-10-13 22:29:44 +0000 | [diff] [blame] | 1 | // RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s |
Douglas Gregor | 9d702ae | 2009-07-30 23:36:40 +0000 | [diff] [blame] | 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> |
Owen Anderson | c9c88b4 | 2009-07-31 20:28:54 +0000 | [diff] [blame] | 16 | void f0(U u, decltype(f(M))) { } // expected-error{{redefinition}} |