Chris Lattner | 8da1cb6 | 2007-07-13 20:18:44 +0000 | [diff] [blame] | 1 | // RUN: clang -emit-llvm %s |
2 | |||||
3 | float test1(int cond, float a, float b) | ||||
4 | { | ||||
5 | return cond ? a : b; | ||||
6 | } | ||||
Chris Lattner | 8da1cb6 | 2007-07-13 20:18:44 +0000 | [diff] [blame] | 7 | double test2(int cond, float a, double b) |
8 | { | ||||
9 | return cond ? a : b; | ||||
10 | } | ||||
Chris Lattner | 2202bce | 2007-11-30 17:56:23 +0000 | [diff] [blame^] | 11 | |
12 | void f(); | ||||
13 | |||||
14 | void test3(){ | ||||
15 | 1 ? f() : (void)0; | ||||
16 | } | ||||
17 |