[PATCH] D123680: Add support for ignored bitfield conditional codegen.

Erich Keane via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 13 06:54:46 PDT 2022


erichkeane created this revision.
erichkeane added reviewers: eli.friedman, aaron.ballman, tahonermann.
Herald added a project: All.
erichkeane requested review of this revision.

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.


https://reviews.llvm.org/D123680

Files:
  clang/lib/CodeGen/CGExpr.cpp
  clang/lib/CodeGen/CodeGenFunction.h
  clang/test/CodeGenCXX/ignored-bitfield-conditional.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D123680.422506.patch
Type: text/x-patch
Size: 12806 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220413/285143e4/attachment.bin>


More information about the cfe-commits mailing list