From: Chris Lattner Date: Fri, 13 Jul 2007 20:18:44 +0000 (+0000) Subject: Check in these testcases. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=8da1cb633967a8b0b235854508638f42197d4acb;p=clang Check in these testcases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39829 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/test/CodeGen/conditional.c b/test/CodeGen/conditional.c new file mode 100644 index 0000000000..ef3283d1d4 --- /dev/null +++ b/test/CodeGen/conditional.c @@ -0,0 +1,12 @@ +// RUN: clang -emit-llvm %s + +float test1(int cond, float a, float b) +{ + return cond ? a : b; +} +/* this will fail for now... +double test2(int cond, float a, double b) +{ + return cond ? a : b; +} +*/ diff --git a/test/CodeGen/int-to-pointer.c b/test/CodeGen/int-to-pointer.c new file mode 100644 index 0000000000..fdb6188228 --- /dev/null +++ b/test/CodeGen/int-to-pointer.c @@ -0,0 +1,6 @@ +// RUN: clang -emit-llvm %s + +void *test(int i) +{ + return (void *)i; +}