mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2025-01-07 08:34:59 +00:00
Change diagnostic per suggestion, to make it a bit clearer what is
happening. llvm-svn: 51574
This commit is contained in:
parent
3ebe82b57a
commit
1c2d5f56f8
@ -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,
|
||||
|
@ -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;
|
||||
|
||||
|
@ -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";
|
||||
|
@ -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}}
|
||||
|
Loading…
Reference in New Issue
Block a user