summaryrefslogtreecommitdiffstats
path: root/clang/test/SemaCXX/c99-variable-length-array.cpp
diff options
context:
space:
mode:
authorRichard Smith <richard-llvm@metafoo.co.uk>2013-01-31 05:19:49 +0000
committerRichard Smith <richard-llvm@metafoo.co.uk>2013-01-31 05:19:49 +0000
commit44ecdbdc6134c4906a8b8982809ead267cf52237 (patch)
treeb038d40eacc62cd4db9edc7750f14191b4a4c2b1 /clang/test/SemaCXX/c99-variable-length-array.cpp
parent52e0de4c6e3644fb8b2e02aced03c6731452591f (diff)
downloadbcm5719-llvm-44ecdbdc6134c4906a8b8982809ead267cf52237.tar.gz
bcm5719-llvm-44ecdbdc6134c4906a8b8982809ead267cf52237.zip
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
Diffstat (limited to 'clang/test/SemaCXX/c99-variable-length-array.cpp')
-rw-r--r--clang/test/SemaCXX/c99-variable-length-array.cpp3
1 files changed, 2 insertions, 1 deletions
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<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}}
OpenPOWER on IntegriCloud