[cfe-dev] Possible fix for codegen bug with cond ? func1 : func2

Chris Lattner clattner at apple.com
Fri May 16 12:18:14 PDT 2008


On May 15, 2008, at 2:57 PM, Eli Friedman wrote:

> Potential patch attached.
>
> Testcase (currently crashes with clang -emit-llvm):
> int a();
> int b(int);
> int c() {return 1 ? a : b;}
>
> Anyone have any better suggestions for how to fix this?

Should sema be inserting an implicit cast to the common type?

-Chris



More information about the cfe-dev mailing list