forked from OSchip/llvm-project
ec87e17c84
Redundant Expression Checker is updated to be able to detect expressions that contain macros. Also, other small details are modified to improve the current implementation. The improvements in detail are as follows: * Binary and ternary operator expressions containing two constants, with at least one of them from a macro, are detected and tested for redundancy. Macro expressions are treated somewhat differently from other expressions, because the particular values of macros can vary across builds. They can be considered correct and intentional, even if macro values equal, produce ranges that exclude each other or fully overlap, etc. * The code structure is slightly modified: typos are corrected, comments are added and some functions are renamed to improve comprehensibility, both in the checker and the test file. A few test cases are moved to another function. * The checker is now able to detect redundant CXXFunctionalCastExprs as well. A corresponding test case is added. Patch by: Lilla Barancsuk! Differential Revision: https://reviews.llvm.org/D38688 llvm-svn: 317570 |
||
---|---|---|
.. | ||
android | ||
boost | ||
bugprone | ||
cert | ||
cppcoreguidelines | ||
hicpp | ||
llvm | ||
misc | ||
modernize | ||
mpi | ||
objc | ||
performance | ||
plugin | ||
readability | ||
tool | ||
utils | ||
CMakeLists.txt | ||
ClangTidy.cpp | ||
ClangTidy.h | ||
ClangTidyDiagnosticConsumer.cpp | ||
ClangTidyDiagnosticConsumer.h | ||
ClangTidyModule.cpp | ||
ClangTidyModule.h | ||
ClangTidyModuleRegistry.h | ||
ClangTidyOptions.cpp | ||
ClangTidyOptions.h | ||
add_new_check.py | ||
rename_check.py |