[clang-tools-extra] [clang-tidy] Add check 'bugprone-cast-to-struct' (PR #153428)
Balázs Kéri via cfe-commits
cfe-commits at lists.llvm.org
Thu Aug 14 02:33:49 PDT 2025
balazske wrote:
> > This new check does nearly the same thing
>
> I feel a bit at unease reading this. Why can't we improve the existing check, instead of duplicating it?
The reason was that this check is not path-sensitive and these should be put into `clang-tidy`. Really the original check could be improved to handle dynamic types or type of memory region (but not the syntax-based check), then both may have valid use cases.
https://github.com/llvm/llvm-project/pull/153428
More information about the cfe-commits
mailing list