Make sure we don't give the wrong warning, and make sure not to set
hadError (suppressing future diagnostics) if we didn't print an
error.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@72588 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c
index dfaaa87..50148a8 100644
--- a/test/Sema/array-init.c
+++ b/test/Sema/array-init.c
@@ -261,3 +261,5 @@
13.0f, 14.0f, 15.0f, 16.0f
};
}
+
+char badchararray[1] = { badchararray[0], "asdf" }; // expected-warning {{excess elements in array initializer}} expected-error {{initializer element is not a compile-time constant}}