[PATCH] [clang-tidy] Add a checker for zero-length memset.

Benjamin Kramer benny.kra at gmail.com
Wed Jul 16 07:14:39 PDT 2014


- Make the checker more aggressive by also looking at values that always evaluate to zero.
- Remove the restriction on literals in the middle argument. cpplint did this to reduce false positives from testing code, I don't buy that excuse.
- Cosmetic cleanup.

http://reviews.llvm.org/D4535

Files:
  clang-tidy/google/CMakeLists.txt
  clang-tidy/google/GoogleTidyModule.cpp
  clang-tidy/google/MemsetZeroLengthCheck.cpp
  clang-tidy/google/MemsetZeroLengthCheck.h
  test/clang-tidy/google-memset-zero-length.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4535.11506.patch
Type: text/x-patch
Size: 8209 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140716/b435358c/attachment.bin>


More information about the cfe-commits mailing list