summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2008-05-27 02:01:50 +0000
committerEli Friedman <eli.friedman@gmail.com>2008-05-27 02:01:50 +0000
commit1f3105e1eeece9ffdc14d7262c7af486ac76600a (patch)
treedf992e68b8b5dca387bd464a88a1928d17695e39
parent0c99509927a0c7a48490486b9fec287b63e5c09c (diff)
downloadclang-1f3105e1eeece9ffdc14d7262c7af486ac76600a.tar.gz
Change diagnostic per suggestion, to make it a bit clearer what is
happening. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51574 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/DiagnosticKinds.def2
-rw-r--r--test/Parser/builtin_classify_type.c4
-rw-r--r--test/Sema/array-constraint.c2
-rw-r--r--test/Sema/typedef-variable-type.c2
4 files changed, 5 insertions, 5 deletions
diff --git a/include/clang/Basic/DiagnosticKinds.def b/include/clang/Basic/DiagnosticKinds.def
index ce41cfdcf6..f1a015c39a 100644
--- a/include/clang/Basic/DiagnosticKinds.def
+++ b/include/clang/Basic/DiagnosticKinds.def
@@ -712,7 +712,7 @@ DIAG(warn_enum_too_large, WARNING,
DIAG(err_case_label_not_integer_constant_expr, ERROR,
"case label does not reduce to an integer constant")
DIAG(err_typecheck_illegal_vla, ERROR,
- "variable length array declared outside of any function")
+ "arrays with static storage duration must have constant integer length")
DIAG(err_typecheck_negative_array_size, ERROR,
"array size is negative")
DIAG(warn_typecheck_function_qualifiers, WARNING,
diff --git a/test/Parser/builtin_classify_type.c b/test/Parser/builtin_classify_type.c
index 6bed9ec666..7cf3d5cd92 100644
--- a/test/Parser/builtin_classify_type.c
+++ b/test/Parser/builtin_classify_type.c
@@ -9,8 +9,8 @@ int main() {
struct foo s;
static int ary[__builtin_classify_type(a)];
- static int ary2[(__builtin_classify_type)(a)]; // expected-error{{variable length array declared outside of any function}}
- static int ary3[(*__builtin_classify_type)(a)]; // expected-error{{variable length array declared outside of any function}}
+ static int ary2[(__builtin_classify_type)(a)]; // expected-error{{arrays with static storage duration must have constant integer length}}
+ static int ary3[(*__builtin_classify_type)(a)]; // expected-error{{arrays with static storage duration must have constant integer length}}
int result;
diff --git a/test/Sema/array-constraint.c b/test/Sema/array-constraint.c
index 3ed5215acc..8fa216d46a 100644
--- a/test/Sema/array-constraint.c
+++ b/test/Sema/array-constraint.c
@@ -41,7 +41,7 @@ void check_size() {
}
static int I;
-typedef int TA[I]; // expected-error {{variable length array declared outside of any function}}
+typedef int TA[I]; // expected-error {{arrays with static storage duration must have constant integer length}}
void strFunc(char *);
const char staticAry[] = "test";
diff --git a/test/Sema/typedef-variable-type.c b/test/Sema/typedef-variable-type.c
index 3abca4314e..4ced926264 100644
--- a/test/Sema/typedef-variable-type.c
+++ b/test/Sema/typedef-variable-type.c
@@ -1,3 +1,3 @@
// RUN: clang %s -verify -fsyntax-only -pedantic
-typedef int (*a)[!.0]; // expected-error{{variable length array declared outside of any function}}
+typedef int (*a)[!.0]; // expected-error{{arrays with static storage duration must have constant integer length}}