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.
ternary.patch (788 Bytes)