llvm/clang-tools-extra/clang-tidy
Gabor Bencze 3373e84539 [clang-tidy] Add bugprone-suspicious-memory-comparison check
The check warns on suspicious calls to `memcmp`.
It currently checks for comparing types that do not have
unique object representations or are non-standard-layout.
Based on
  https://wiki.sei.cmu.edu/confluence/display/c/EXP42-C.+Do+not+compare+padding+data
  https://wiki.sei.cmu.edu/confluence/display/c/FLP37-C.+Do+not+use+object+representations+to+compare+floating-point+values
and part of
  https://wiki.sei.cmu.edu/confluence/display/cplusplus/OOP57-CPP.+Prefer+special+member+functions+and+overloaded+operators+to+C+Standard+Library+functions
Add alias `cert-exp42-c` and `cert-flp37-c`.

Some tests are currently failing at head, the check depends on D89649.
Originally started in D71973

Reviewed By: aaron.ballman

Differential Revision: https://reviews.llvm.org/D89651
2021-08-26 09:23:37 +02:00
..
abseil abseil-string-find-str-contains should not propose an edit for the three-parameter version of find(). 2021-08-10 16:39:17 +00:00
altera
android
boost
bugprone [clang-tidy] Add bugprone-suspicious-memory-comparison check 2021-08-26 09:23:37 +02:00
cert [clang-tidy] Add bugprone-suspicious-memory-comparison check 2021-08-26 09:23:37 +02:00
concurrency
cppcoreguidelines [clang-tidy] fix duplicate '{}' in cppcoreguidelines-pro-type-member-init 2021-08-14 10:48:04 +08:00
darwin
fuchsia
google
hicpp
linuxkernel
llvm
llvmlibc
misc [clang-tidy] Don't suggest "inline" fix for main function in 2021-07-20 14:24:38 +02:00
modernize [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
mpi
objc [llvm][clang][NFC] updates inline licence info 2021-08-11 02:48:53 +00:00
openmp
performance [clang-tidy] performance-unnecessary-copy-initialization: Create option to exclude container types from triggering the check. 2021-07-22 16:20:20 -04:00
plugin
portability
readability [clang-tidy] [PR50069] readability-braces-around-statements doesn't work well with [[likely]] [[unlikely]] 2021-08-14 12:05:21 +01:00
tool [clang-tidy] ensure run-clang-tidy reports children killed by signals 2021-07-19 14:18:26 +02:00
utils
zircon
add_new_check.py [clang-tidy] Always open files using UTF-8 encoding 2021-08-02 11:36:04 +02:00
clang-tidy-config.h.cmake
ClangTidy.cpp
ClangTidy.h
ClangTidyCheck.cpp [clang-tidy] Add new case type to check variables with Hungarian notation 2021-08-01 15:22:17 -07:00
ClangTidyCheck.h [clang-tidy] Add new case type to check variables with Hungarian notation 2021-08-01 15:22:17 -07:00
ClangTidyDiagnosticConsumer.cpp
ClangTidyDiagnosticConsumer.h
ClangTidyForceLinker.h
ClangTidyModule.cpp
ClangTidyModule.h
ClangTidyModuleRegistry.h
ClangTidyOptions.cpp
ClangTidyOptions.h
ClangTidyProfiling.cpp
ClangTidyProfiling.h
CMakeLists.txt
ExpandModularHeadersPPCallbacks.cpp
ExpandModularHeadersPPCallbacks.h
GlobList.cpp
GlobList.h
rename_check.py [clang-tidy] Always open files using UTF-8 encoding 2021-08-02 11:36:04 +02:00