aboutsummaryrefslogtreecommitdiff
path: root/test/CodeGen/conditional-gnu-ext.c
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-11-26 01:40:58 +0000
committerChris Lattner <sabre@nondot.org>2007-11-26 01:40:58 +0000
commita21ddb30e56026967d58e26c5212744e1831305b (patch)
tree51d4a01a7dbdea82e7448fe68e8e3772ee7336a1 /test/CodeGen/conditional-gnu-ext.c
parent09376fd7f7ea9b4a4846c3d9cd1bfade17e5ac8d (diff)
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
Diffstat (limited to 'test/CodeGen/conditional-gnu-ext.c')
-rw-r--r--test/CodeGen/conditional-gnu-ext.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CodeGen/conditional-gnu-ext.c b/test/CodeGen/conditional-gnu-ext.c
new file mode 100644
index 0000000000..5b2eb3f3d5
--- /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;
+}