From 8da1cb633967a8b0b235854508638f42197d4acb Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Fri, 13 Jul 2007 20:18:44 +0000 Subject: [PATCH] Check in these testcases. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@39829 91177308-0d34-0410-b5e6-96231b3b80d8 --- test/CodeGen/conditional.c | 12 ++++++++++++ test/CodeGen/int-to-pointer.c | 6 ++++++ 2 files changed, 18 insertions(+) create mode 100644 test/CodeGen/conditional.c create mode 100644 test/CodeGen/int-to-pointer.c 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; +} -- 2.50.1