blob: 5e5801af93c795583df5750a58990b0e873d4b0d [file] [log] [blame]
Daniel Dunbar8fbe78f2009-12-15 20:14:24 +00001// RUN: %clang_cc1 -emit-llvm %s -o %t
Chris Lattner2ab40a62007-11-26 01:40:58 +00002// PR1824
3
4int foo(int x, short y) {
5 return x ?: y;
6}
Chris Lattnercd7bc142009-02-13 23:35:32 +00007
8// rdar://6586493
9float test(float x, int Y) {
10 return Y != 0 ? : x;
11}
12
Fariborz Jahanian2b1d88a2010-09-18 19:38:38 +000013// rdar://8446940
14extern void abort();
15void test1 () {
16 char x[1];
17 char *y = x ? : 0;
18
19 if (x != y)
20 abort();
21}