Fix sema support for the gnu ?: expression with a 
missing middle expression, and fix a codegen bug where
we didn't correctly promote the condition to the right 
result type.  This fixes PR1824.


git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@44322 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/test/CodeGen/conditional-gnu-ext.c b/test/CodeGen/conditional-gnu-ext.c
new file mode 100644
index 0000000..5b2eb3f
--- /dev/null
+++ b/test/CodeGen/conditional-gnu-ext.c
@@ -0,0 +1,6 @@
+// RUN: clang -emit-llvm %s
+// PR1824
+
+int foo(int x, short y) {
+  return x ?: y;
+}