carlosgalvezp wrote: > > 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`
Hmm, I think "pointer cast" is too ambiguous, it could warn about _any_ type of pointer cast via e.g. `reinterpret_cast`, `const_cast`, etc. I want to put emphasis on the act of _copying the bytes_ of the pointer into another pointer to perform such a cast. In that sense I think "bit_cast" is still a more accurate name. https://github.com/llvm/llvm-project/pull/108083 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits