summaryrefslogtreecommitdiffstats
path: root/test/SemaCXX/c99-variable-length-array.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/SemaCXX/c99-variable-length-array.cpp')
-rw-r--r--test/SemaCXX/c99-variable-length-array.cpp5
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}}
OpenPOWER on IntegriCloud