[clang] [clang] warn_{cstruct, cxxstruct}_memaccess are too agressive about initializers (PR #170577)
via cfe-commits
cfe-commits at lists.llvm.org
Wed Dec 3 23:48:36 PST 2025
serge-sans-paille wrote:
Thanks for the patch
!
> We could restrict this to just those targeting this inside a constructor, but I've also found cases where constructors memset/bzero subobjects?
Having a look at https://godbolt.org/z/7KThvxKx5 I'd feel better if we could capture the idiom in `ValidFoo` while still warning about `InvalidFoo`.
The scope of your patch is much larger, and it would miss several cases where it should legitimately warn.
https://github.com/llvm/llvm-project/pull/170577
More information about the cfe-commits
mailing list