[clang] [libcxx] [clang] Warn about memset/memcpy to NonTriviallyCopyable types (PR #111434)
Aaron Ballman via cfe-commits
cfe-commits at lists.llvm.org
Mon Oct 28 07:07:27 PDT 2024
================
@@ -795,6 +795,10 @@ def warn_cstruct_memaccess : Warning<
"%1 call is a pointer to record %2 that is not trivial to "
"%select{primitive-default-initialize|primitive-copy}3">,
InGroup<NonTrivialMemaccess>;
+def warn_cxxstruct_memaccess : Warning<
+ "%select{destination for|source of|first operand of|second operand of}0 call to "
----------------
AaronBallman wrote:
We should probably remove the first `%select` entirely as none of the other parts of that are being used (we don't want someone reading the .td file to be confused as to when the diagnostic triggers).
I also sympathize with @carlosgalvezp on use of "destination for call to" being a bit awkward. How about: `first argument in call to...` ?
https://github.com/llvm/llvm-project/pull/111434
More information about the cfe-commits
mailing list