diff options
author | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-31 05:19:49 +0000 |
---|---|---|
committer | Richard Smith <richard-llvm@metafoo.co.uk> | 2013-01-31 05:19:49 +0000 |
commit | 29805ca6d278b4d9563adfee67f2478f0fecdcfc (patch) | |
tree | 6103fe65ccc1fd85a434739449974a76ec470f58 /test/SemaCXX/c99-variable-length-array.cpp | |
parent | 626799b2903a2ab7f58ed82f10153bad4e0f1b7f (diff) |
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.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@174039 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/SemaCXX/c99-variable-length-array.cpp')
-rw-r--r-- | test/SemaCXX/c99-variable-length-array.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/test/SemaCXX/c99-variable-length-array.cpp b/test/SemaCXX/c99-variable-length-array.cpp index de9c11e565..bb620c71fa 100644 --- a/test/SemaCXX/c99-variable-length-array.cpp +++ b/test/SemaCXX/c99-variable-length-array.cpp @@ -64,8 +64,9 @@ X1<HasConstantValue> x1a; X1<HasNonConstantValue> 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<typename T, unsigned N> -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}} |