[PATCH] D71973: [clang-tidy] Add bugprone-suspicious-memory-comparison check
Gabor Bencze via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Sun Jan 12 03:00:07 PST 2020
gbencze updated this revision to Diff 237529.
gbencze added a comment.
Address (most of the) comments by @aaron.ballman
- remove top-level `const` on locals
- move declaration into `if`
- pass `TagDecl` to diag
- added test for `operator void *`
- fixed `[[no_unique_address]]`
- remove assertion that checks for overlapping fields
- in `hasPaddingBetweenFields`: only do recursive call and add field size to `TotalSize` if not `isZeroSize`
- + added tests
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71973/new/
https://reviews.llvm.org/D71973
Files:
clang-tools-extra/clang-tidy/bugprone/BugproneTidyModule.cpp
clang-tools-extra/clang-tidy/bugprone/CMakeLists.txt
clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.cpp
clang-tools-extra/clang-tidy/bugprone/SuspiciousMemoryComparisonCheck.h
clang-tools-extra/clang-tidy/cert/CERTTidyModule.cpp
clang-tools-extra/docs/ReleaseNotes.rst
clang-tools-extra/docs/clang-tidy/checks/bugprone-suspicious-memory-comparison.rst
clang-tools-extra/docs/clang-tidy/checks/cert-exp42-c.rst
clang-tools-extra/docs/clang-tidy/checks/list.rst
clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-memory-comparison-32bits.cpp
clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-memory-comparison.c
clang-tools-extra/test/clang-tidy/checkers/bugprone-suspicious-memory-comparison.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D71973.237529.patch
Type: text/x-patch
Size: 28021 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200112/70c03960/attachment-0001.bin>
More information about the cfe-commits
mailing list