forked from OSchip/llvm-project
6ae400d122
Enhance clang-tidy readability-simplify-boolean-expr to handle 'if (e) return true; return false;' and improve replacement expressions. This changeset extends the simplify boolean expression check in clang-tidy to simplify if (e) return true; return false; to return e; (note the lack of an else clause on the if statement.) By default, chained conditional assignment is left unchanged, unless a configuration parameter is set to non-zero to override this behavior. It also improves the handling of replacement expressions to apply static_cast<bool>(expr) when expr is not of type bool. http://reviews.llvm.org/D9810 Patch by Richard Thomson! llvm-svn: 241155 |
||
---|---|---|
.. | ||
llvm | ||
misc | ||
readability | ||
tool | ||
utils | ||
CMakeLists.txt | ||
ClangTidy.cpp | ||
ClangTidy.h | ||
ClangTidyDiagnosticConsumer.cpp | ||
ClangTidyDiagnosticConsumer.h | ||
ClangTidyModule.cpp | ||
ClangTidyModule.h | ||
ClangTidyModuleRegistry.h | ||
ClangTidyOptions.cpp | ||
ClangTidyOptions.h | ||
Makefile | ||
add_new_check.py |