[clang] [clang] Added warn-assignment-bool-context (PR #115234)

Philipp Rados via cfe-commits cfe-commits at lists.llvm.org
Tue Feb 25 09:52:53 PST 2025


PhilippRados wrote:

I applied the mentioned changes from above and merged the two diagnostics into a single one. I also added the field IsInsideCondition to the `Expr` class and everything works. However I’m not sure whether or not this single diagnostic warrants the extra field in the class.

I also saw that enum/boolean fields in `Expr` are represented using the `ExprBits` bitfield so if this were a valid approach then adding it to the bitfield would probably be more space efficient.

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


More information about the cfe-commits mailing list