forked from OSchip/llvm-project
14dd073782
Checking the same condition again in a nested `if` usually make no sense, except if the value of the expression could have been changed between the two checks. Although compilers may optimize this out, such code is suspicious: the programmer may have meant to check something else. Therefore it is worth to find such places in the code and notify the user about the problem. This patch implements a basic check for this problem. Currently it only detects redundant conditions where the condition is a variable of integral type. It also detects the possible bug if the variable is in an //or// or //and// logical expression in the inner if and/or the variable is in an //and// logical expression in the outer if statement. Negated cases are not handled yet. Differential Revision: https://reviews.llvm.org/D81272 |
||
---|---|---|
.. | ||
_static | ||
_templates | ||
clang-tidy | ||
clangd | ||
CMakeLists.txt | ||
ModularizeUsage.rst | ||
README.txt | ||
ReleaseNotes.rst | ||
clang-doc.rst | ||
clang-include-fixer.rst | ||
clang-modernize.rst | ||
clang-rename.rst | ||
clang-tidy.rst | ||
clangd.rst | ||
conf.py | ||
cpp11-migrate.rst | ||
doxygen-mainpage.dox | ||
doxygen.cfg.in | ||
index.rst | ||
make.bat | ||
modularize.rst | ||
pp-trace.rst |
README.txt
---------------------------------- Documentation in clang-tools-extra ---------------------------------- To generate documentation in HTML format from files in clang-tools-extra/docs, build the docs-clang-tools-html target. To generate documentation from the source code using Doxygen, build the doxygen-clang-tools target.