aboutsummaryrefslogtreecommitdiff
path: root/test/Sema/array-init.c
diff options
context:
space:
mode:
authorEli Friedman <eli.friedman@gmail.com>2009-05-29 20:20:05 +0000
committerEli Friedman <eli.friedman@gmail.com>2009-05-29 20:20:05 +0000
commite540858b289b23653bcb23646f135729203635cb (patch)
tree274b8a85a07cc4811f9d3f765fd97dd9ac21dda1 /test/Sema/array-init.c
parent587cbdfd95f4b0aaccc14b31f5debe85d5daf7ed (diff)
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
Diffstat (limited to 'test/Sema/array-init.c')
-rw-r--r--test/Sema/array-init.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/test/Sema/array-init.c b/test/Sema/array-init.c
index dfaaa87ef5..50148a83ae 100644
--- a/test/Sema/array-init.c
+++ b/test/Sema/array-init.c
@@ -261,3 +261,5 @@ void test_matrix() {
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}}