[clang-tools-extra] [clang-tidy] Create bugprone-bit-cast-pointers check (PR #108083)

Julian Schmidt via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 26 16:04:27 PDT 2024


https://github.com/5chmidti commented:

> It now comes to mind that we probably also want to check `memcpy(ptr, ptr)`, which is equivalent to `bit_cast`. In that case I wonder if the check name still holds or it should be named something else?

Yeah, with the addition of `memcpy`, the `bit` part of the name makes a less sense.
Maybe
- `bugprone-pointer-cast[ing]`
- `bugprone-cast[ing]-between-pointers`

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


More information about the cfe-commits mailing list