diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
commit | c72c57c9e9b69944e3e009cd5e209634839581d3 (patch) | |
tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /test/SemaCXX/c99-variable-length-array.cpp | |
parent | 5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff) | |
download | FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz |
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'test/SemaCXX/c99-variable-length-array.cpp')
-rw-r--r-- | test/SemaCXX/c99-variable-length-array.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/test/SemaCXX/c99-variable-length-array.cpp b/test/SemaCXX/c99-variable-length-array.cpp index 7773c08..bb620c7 100644 --- a/test/SemaCXX/c99-variable-length-array.cpp +++ b/test/SemaCXX/c99-variable-length-array.cpp @@ -1,4 +1,4 @@ -// RUN: %clang_cc1 -fsyntax-only -verify -Wvla %s +// RUN: %clang_cc1 -fsyntax-only -verify -Wvla-extension %s struct NonPOD { NonPOD(); }; @@ -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}} |