[clang] [clang] Move warning about memset/memcpy to NonTriviallyCopyable type… (PR #117387)

Aaron Ballman via cfe-commits cfe-commits at lists.llvm.org
Tue Nov 26 10:48:58 PST 2024


================
@@ -683,11 +683,13 @@ def SizeofArrayDecay : DiagGroup<"sizeof-array-decay">;
 def SizeofPointerMemaccess : DiagGroup<"sizeof-pointer-memaccess">;
 def MemsetTransposedArgs : DiagGroup<"memset-transposed-args">;
 def DynamicClassMemaccess : DiagGroup<"dynamic-class-memaccess">;
-def NonTrivialMemaccess : DiagGroup<"nontrivial-memaccess">;
+def NonTrivialMemcall : DiagGroup<"nontrivial-memcall">;
+def NonTrivialMemaccess : DiagGroup<"nontrivial-memaccess", [NonTrivialMemcall]>;
 def SuspiciousBzero : DiagGroup<"suspicious-bzero">;
 def SuspiciousMemaccess : DiagGroup<"suspicious-memaccess",
   [SizeofPointerMemaccess, DynamicClassMemaccess,
-   NonTrivialMemaccess, MemsetTransposedArgs, SuspiciousBzero]>;
+   NonTrivialMemaccess, NonTrivialMemcall, MemsetTransposedArgs,
----------------
AaronBallman wrote:

It should be transitively included, I believe. (Test coverage would tell us for sure though!)

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


More information about the cfe-commits mailing list