[clang] [CIR] Upstream new SetBitfieldOp for handling C and C++ struct bitfields (PR #147609)

Erich Keane via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 9 05:58:55 PDT 2025


================
@@ -1063,10 +1078,10 @@ LValue CIRGenFunction::emitBinaryOperatorLValue(const BinaryOperator *e) {
 
     SourceLocRAIIObject loc{*this, getLoc(e->getSourceRange())};
     if (lv.isBitField()) {
-      cgm.errorNYI(e->getSourceRange(), "bitfields");
-      return {};
+      emitStoreThroughBitfieldLValue(rv, lv);
+    } else {
----------------
erichkeane wrote:

don't use curleys on single-line if/else.

https://github.com/llvm/llvm-project/pull/147609


More information about the cfe-commits mailing list