[clang] [Clang] Fix integer promotion of bit-fields in statement expressions (PR #225597)

Shafik Yaghmour via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 23 10:56:52 PDT 2026


https://github.com/shafik commented:

@AaronBallman So this fix is interesting b/c I see that we are using `getSourceBitfield()` in two ways, sometimes it looks like we are using it speculatively and sometimes we know we have a bit-field i.e. in once place we check `E->refersToBitField()`.

I am left wondering why we should not have an assert at the end of `getSourceBitField()` checking that that `refersToBitField()` is not `true`?

Also why we use it speculatively at all since `refersToBitField()` should be a sufficient check, right?

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


More information about the cfe-commits mailing list