Emit the correct diagnostics when we constant fold an array size to a negative value.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@65023 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/const-eval.c b/test/Sema/const-eval.c
index 4fd2a55..af785e4 100644
--- a/test/Sema/const-eval.c
+++ b/test/Sema/const-eval.c
@@ -34,3 +34,7 @@
int g17[(3?:1) - 2];
EVAL_EXPR(18, ((int)((void*)10 + 10)) == 20 ? 1 : -1);
+
+struct s {
+ int a[(int)-1.0f]; // expected-error {{array size is negative}}
+};