[PATCH] D35051: [clang-tidy] Add bugprone-undefined-memory-manipulation check.

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jul 12 09:01:54 PDT 2017


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

LG



================
Comment at: clang-tidy/bugprone/UndefinedMemoryManipulationCheck.cpp:39
+  // Check whether source object is not TriviallyCopyable.
+  // Only applicable to memcpy() and memmove().
+  Finder->addMatcher(
----------------
rnkovacs wrote:
> alexfh wrote:
> > What about `memset`?
> `memset` has a bit different signature than the other two. It has a fill value as its second argument instead of a source object.
Ah, now I get it. We're inspecting the second argument here.


https://reviews.llvm.org/D35051





More information about the cfe-commits mailing list