Add support for ignored bitfield conditional codegen.
authorErich Keane <erich.keane@intel.com>
Wed, 13 Apr 2022 13:46:42 +0000 (06:46 -0700)
committerErich Keane <erich.keane@intel.com>
Wed, 13 Apr 2022 17:33:55 +0000 (10:33 -0700)
commit6f20744b7ff875bb5eb735d1e7636ad6a66d4526
tree8ed3563f2a140a733d0b503823b1b53d1d31d108
parent5a236e69f20b1f47459e4df9e3726ccf23b850f7
Add support for ignored bitfield conditional codegen.

Currently we emit an error in just about every case of conditionals
with a 'non simple' branch if treated as an LValue.  This patch adds
support for the special case where this is an 'ignored' lvalue, which
permits the side effects from happening.

It also splits up the emit for conditional LValue in a way that should
be usable to handle simple assignment expressions in similar situations.

Differential Revision: https://reviews.llvm.org/D123680
clang/lib/CodeGen/CGExpr.cpp
clang/lib/CodeGen/CodeGenFunction.h
clang/test/CodeGenCXX/ignored-bitfield-conditional.cpp [new file with mode: 0644]