[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 08:28:15 PDT 2017
alexfh requested changes to this revision.
alexfh added inline comments.
This revision now requires changes to proceed.
================
Comment at: clang-tidy/bugprone/UndefinedMemoryManipulationCheck.cpp:22
+AST_MATCHER(CXXRecordDecl, isNotTriviallyCopyable) {
+ return !(Node.isTriviallyCopyable());
+}
----------------
nit: No need for the parentheses.
================
Comment at: clang-tidy/bugprone/UndefinedMemoryManipulationCheck.cpp:39
+ // Check whether source object is not TriviallyCopyable.
+ // Only applicable to memcpy() and memmove().
+ Finder->addMatcher(
----------------
What about `memset`?
================
Comment at: test/clang-tidy/bugprone-undefined-memory-manipulation.cpp:34
+struct Destruct {
+ ~Destruct() {};
+};
----------------
Remove stray semicolons after closing braces of function bodies.
https://reviews.llvm.org/D35051
More information about the cfe-commits
mailing list