]> granicus.if.org Git - clang/commitdiff
Change diagnostic per suggestion, to make it a bit clearer what is
authorEli Friedman <eli.friedman@gmail.com>
Tue, 27 May 2008 02:01:50 +0000 (02:01 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Tue, 27 May 2008 02:01:50 +0000 (02:01 +0000)
happening.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@51574 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/DiagnosticKinds.def
test/Parser/builtin_classify_type.c
test/Sema/array-constraint.c
test/Sema/typedef-variable-type.c

index ce41cfdcf6d60fcf2a8582f769cc881f4f31e8f0..f1a015c39a0658e7deaf888e56a491411d92b56b 100644 (file)
@@ -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,
index 6bed9ec666ba3a42d23b712badbc6fb22738eba0..7cf3d5cd922d3e93d3be8130be2dc50d276ebbd3 100644 (file)
@@ -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;
 
index 3ed5215accb1621cc71123b100e06339be490d04..8fa216d46a1bbd13f530ac2ba582c1711601bf26 100644 (file)
@@ -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";
index 3abca4314e84dbfa890e5d0d725d4ab0622a4e38..4ced92626433be71f952f3057dcd59bb992c1e90 100644 (file)
@@ -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}}