]> granicus.if.org Git - clang/commitdiff
Some const initializer tests for stuff I just committed.
authorEli Friedman <eli.friedman@gmail.com>
Thu, 21 Feb 2008 18:07:36 +0000 (18:07 +0000)
committerEli Friedman <eli.friedman@gmail.com>
Thu, 21 Feb 2008 18:07:36 +0000 (18:07 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47442 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/const-init.c [new file with mode: 0644]

diff --git a/test/CodeGen/const-init.c b/test/CodeGen/const-init.c
new file mode 100644 (file)
index 0000000..e3f110d
--- /dev/null
@@ -0,0 +1,13 @@
+// RUN: clang -emit-llvm %s
+
+#include <stdint.h>
+
+// Brace-enclosed string array initializers
+char a[] = { "asdf" };
+
+// Double-implicit-conversions of array/functions (not legal C, but
+// clang accepts it for gcc compat).
+intptr_t b = a;
+int c();
+void *d = c;
+intptr_t e = c;