[compiler-rt] [clang] [clang][UBSan] Add implicit conversion check for bitfields (PR #75481)

Axel Lundberg via cfe-commits cfe-commits at lists.llvm.org
Tue Jan 2 13:25:31 PST 2024


Zonotora wrote:

> Please add test coverage for compound assignment and increment/decrement.
> 
> This seems like a reasonable extension of the existing integer truncation checks, but we might want to consider giving it a unique name. Otherwise, people using integer truncation checks will have trouble upgrading their compiler.

Sure 👍 Fair enough, what name do you suggest? Replace "integer" with "bitfield" as in `implicit-unsigned-bitfield-truncation`, `implicit-signed-bitfield-truncation` and `implicit-bitfield-sign-change`? Or just have a single flag `implicit-bitfield-conversion` for now?

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


More information about the cfe-commits mailing list