From 44ecdbdc6134c4906a8b8982809ead267cf52237 Mon Sep 17 00:00:00 2001 From: Richard Smith Date: Thu, 31 Jan 2013 05:19:49 +0000 Subject: Improve 'failed template argument deduction' diagnostic for the case where we have a direct mismatch between some component of the template and some component of the argument. The diagnostic now says what the mismatch was, but doesn't yet say which part of the template doesn't match. llvm-svn: 174039 --- clang/test/SemaCXX/c99-variable-length-array.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/test/SemaCXX/c99-variable-length-array.cpp') diff --git a/clang/test/SemaCXX/c99-variable-length-array.cpp b/clang/test/SemaCXX/c99-variable-length-array.cpp index de9c11e5651..bb620c71fa0 100644 --- a/clang/test/SemaCXX/c99-variable-length-array.cpp +++ b/clang/test/SemaCXX/c99-variable-length-array.cpp @@ -64,8 +64,9 @@ X1 x1a; X1 x1b; // expected-note{{in instantiation of}} // Template argument deduction does not allow deducing a size from a VLA. +// FIXME: This diagnostic should make it clear that the two 'N's are different entities! template -void accept_array(T (&array)[N]); // expected-note{{candidate template ignored: failed template argument deduction}} +void accept_array(T (&array)[N]); // expected-note{{candidate template ignored: could not match 'T [N]' against 'int [N]'}} void test_accept_array(int N) { int array[N]; // expected-warning{{variable length arrays are a C99 feature}} -- cgit v1.2.3