aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/trunc-array-initializer.c
diff options
context:
space:
mode:
authorChristopher Lamb <christopher.lamb@gmail.com>2007-12-02 08:49:54 +0000
committerChristopher Lamb <christopher.lamb@gmail.com>2007-12-02 08:49:54 +0000
commitce39faa836d0fe2f3be9ff11865c6433f734b2c6 (patch)
treefb48b7d58ca89ac9600c97358a8918bdcfc60552 /test/CodeGen/trunc-array-initializer.c
parent8b1be778399741088cd6257964b8cdab8b37e53d (diff)
Treat discarding array initializer elements as an extwarn (so -pedantic-errors flags it). Allow CodeGen to truncate the initializer if needed.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44518 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/trunc-array-initializer.c')
-rw-r--r--test/CodeGen/trunc-array-initializer.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/test/CodeGen/trunc-array-initializer.c b/test/CodeGen/trunc-array-initializer.c
new file mode 100644
index 0000000000..6f4caf4588
--- /dev/null
+++ b/test/CodeGen/trunc-array-initializer.c
@@ -0,0 +1,3 @@
+// RUN: clang -emit-llvm %s
+
+int ary[2] = { 1, 2, 3 };