[cfe-dev] [PATCH]Assert in codegen when compiling ternary operator without LHS in C++

Jean-Daniel Dupas devlists at shadowlab.org
Thu Aug 19 02:35:06 PDT 2010


Hello,

Actually clang does not support codegen for ternary operator without LHS in C++ (see bug #7726 ).

But in many cases it silently produces invalid code instead of raising an error. In other cases it calls EmitUnsupportedLValue().

To prevent this kind of issue, this patch add a EmitUnsupportedLValue() call that is unconditionally invoked as soon as clang try to generate code for this construct in C++ mode.





-- Jean-Daniel




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100819/008d6ee9/attachment.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ternary.patch
Type: application/octet-stream
Size: 788 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100819/008d6ee9/attachment.obj>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20100819/008d6ee9/attachment-0001.html>


More information about the cfe-dev mailing list