diff options
author | Chris Lattner <sabre@nondot.org> | 2007-11-26 01:40:58 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-11-26 01:40:58 +0000 |
commit | 2ab40a6207d3a522a81beb300a5cb560eef81299 (patch) | |
tree | 983ae40e8dd089b0e7825155ddf0da221d09cb8a /clang/test/CodeGen/conditional-gnu-ext.c | |
parent | a3ee6fa84ff01d0c72182cab8e87749bdda68d7b (diff) | |
download | bcm5719-llvm-2ab40a6207d3a522a81beb300a5cb560eef81299.tar.gz bcm5719-llvm-2ab40a6207d3a522a81beb300a5cb560eef81299.zip |
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.
llvm-svn: 44322
Diffstat (limited to 'clang/test/CodeGen/conditional-gnu-ext.c')
-rw-r--r-- | clang/test/CodeGen/conditional-gnu-ext.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/test/CodeGen/conditional-gnu-ext.c b/clang/test/CodeGen/conditional-gnu-ext.c new file mode 100644 index 00000000000..5b2eb3f3d5e --- /dev/null +++ b/clang/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; +} |