[PATCH] D49112: [Sema] Implement -Wmemset-transposed-args

Nico Weber via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 11 08:27:13 PDT 2018


thakis accepted this revision.
thakis added a comment.
This revision is now accepted and ready to land.

lgtm assuming you ran this on some large code base to make sure it doesn't have false positives.



================
Comment at: clang/include/clang/Basic/DiagnosticSemaKinds.td:659
+def warn_suspicious_sizeof_memset : Warning<
+  "%select{'size' argument to memset is '0'|setting buffer to a 'sizeof' expression}0; did you mean to transpose the last two arguments?">,
+  InGroup<MemsetTransposedArgs>;
----------------
nit: stay below 80 columns


https://reviews.llvm.org/D49112





More information about the cfe-commits mailing list