1 // RUN: %clang_cc1 -emit-llvm %s -o %t 2 // PR1824 3 foo(int x,short y)4int foo(int x, short y) { 5 return x ?: y; 6 } 7 test(float x,int Y)8float test(float x, int Y) { 9 return Y != 0 ? : x; 10 } 11 12 extern void abort(void); test1(void)13void test1 (void) { 14 char x[1]; 15 char *y = x ? : 0; 16 17 if (x != y) 18 abort(); 19 } 20 getComplex(_Complex int val)21_Complex int getComplex(_Complex int val) { 22 static int count; 23 if (count++) 24 abort(); 25 return val; 26 } 27 complx(void)28_Complex int complx(void) { 29 _Complex int cond; 30 _Complex int rhs; 31 32 return getComplex(1+2i) ? : rhs; 33 } 34