From: Eli Friedman Date: Thu, 21 Feb 2008 18:07:36 +0000 (+0000) Subject: Some const initializer tests for stuff I just committed. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=cca196b553bf3261d8db635a40ca4a78c32b2569;p=clang Some const initializer tests for stuff I just committed. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@47442 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/const-init.c b/test/CodeGen/const-init.c new file mode 100644 index 0000000000..e3f110d64e --- /dev/null +++ b/test/CodeGen/const-init.c @@ -0,0 +1,13 @@ +// RUN: clang -emit-llvm %s + +#include + +// 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;