[cfe-commits] r51574 - in /cfe/trunk: include/clang/Basic/DiagnosticKinds.def test/Parser/builtin_classify_type.c test/Sema/array-constraint.c test/Sema/typedef-variable-type.c
Eli Friedman
eli.friedman at gmail.com
Mon May 26 19:01:51 PDT 2008
Author: efriedma
Date: Mon May 26 21:01:50 2008
New Revision: 51574
URL: http://llvm.org/viewvc/llvm-project?rev=51574&view=rev
Log:
Change diagnostic per suggestion, to make it a bit clearer what is
happening.
Modified:
cfe/trunk/include/clang/Basic/DiagnosticKinds.def
cfe/trunk/test/Parser/builtin_classify_type.c
cfe/trunk/test/Sema/array-constraint.c
cfe/trunk/test/Sema/typedef-variable-type.c
Modified: cfe/trunk/include/clang/Basic/DiagnosticKinds.def
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/DiagnosticKinds.def?rev=51574&r1=51573&r2=51574&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/DiagnosticKinds.def (original)
+++ cfe/trunk/include/clang/Basic/DiagnosticKinds.def Mon May 26 21:01:50 2008
@@ -712,7 +712,7 @@
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,
Modified: cfe/trunk/test/Parser/builtin_classify_type.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Parser/builtin_classify_type.c?rev=51574&r1=51573&r2=51574&view=diff
==============================================================================
--- cfe/trunk/test/Parser/builtin_classify_type.c (original)
+++ cfe/trunk/test/Parser/builtin_classify_type.c Mon May 26 21:01:50 2008
@@ -9,8 +9,8 @@
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;
Modified: cfe/trunk/test/Sema/array-constraint.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/array-constraint.c?rev=51574&r1=51573&r2=51574&view=diff
==============================================================================
--- cfe/trunk/test/Sema/array-constraint.c (original)
+++ cfe/trunk/test/Sema/array-constraint.c Mon May 26 21:01:50 2008
@@ -41,7 +41,7 @@
}
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";
Modified: cfe/trunk/test/Sema/typedef-variable-type.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Sema/typedef-variable-type.c?rev=51574&r1=51573&r2=51574&view=diff
==============================================================================
--- cfe/trunk/test/Sema/typedef-variable-type.c (original)
+++ cfe/trunk/test/Sema/typedef-variable-type.c Mon May 26 21:01:50 2008
@@ -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}}
More information about the cfe-commits
mailing list