aboutsummaryrefslogtreecommitdiff
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.cpp3
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 2f9bb957ec..7773c0849b 100644
--- a/test/SemaCXX/c99-variable-length-array.cpp
+++ b/test/SemaCXX/c99-variable-length-array.cpp
@@ -73,10 +73,11 @@ void test_accept_array(int N) {
}
// Variably-modified types cannot be used in local classes.
-void local_classes(int N) {
+void local_classes(int N) { // expected-note {{declared here}}
struct X {
int size;
int array[N]; // expected-error{{fields must have a constant size: 'variable length array in structure' extension will never be supported}} \
+ // expected-error{{reference to local variable 'N' declared in enclosing function 'local_classes'}} \
// expected-warning{{variable length arrays are a C99 feature}}
};
}