hanchenye-llvm-project/clang-tools-extra/test
Alexander Kornienko f5e72b0448 [clang-tidy] Add readability-simplify-boolean-expr check to clang-tidy
This check looks for comparisons between boolean expressions and boolean
constants and simplifies them to just use the appropriate boolean expression
directly.

if (b == true) becomes if (b)
if (b == false) becomes if (!b)
if (b && true) becomes if (b)
if (b && false) becomes if (false)
if (b || true) becomes if (true)
if (b || false) becomes if (b)
e ? true : false becomes e
e ? false : true becomes !e
if (true) t(); else f(); becomes t();
if (false) t(); else f(); becomes f();
if (e) return true; else return false; becomes return (e);
if (e) return false; else return true; becomes return !(e);
if (e) b = true; else b = false; becomes b = e;
if (e) b = false; else b = true; becomes b = !(e);

http://reviews.llvm.org/D7648

Patch by Richard Thomson!

llvm-svn: 234626
2015-04-10 19:26:43 +00:00
..
Unit Also run extra tools unit tests in shared library builds. 2014-08-13 12:54:50 +00:00
clang-apply-replacements Handle newlines on Windows correctly. 2014-12-09 02:57:56 +00:00
clang-modernize Make LoopConvert work with containers that are used like arrays. 2015-01-12 13:17:56 +00:00
clang-query
clang-rename Revert rL215947: "[clang-rename] revert r215839" 2014-08-20 01:39:05 +00:00
clang-tidy [clang-tidy] Add readability-simplify-boolean-expr check to clang-tidy 2015-04-10 19:26:43 +00:00
modularize Added module map coverage support, extracted from module-map-checker. 2015-02-19 16:47:27 +00:00
pp-trace Revert "Add a missing target requirement." 2015-02-25 02:46:29 +00:00
.clang-format
CMakeLists.txt Move remove-cstr-calls from a standalone executable to a clang-tidy check readability-redundant-string-cstr 2015-03-16 00:32:25 +00:00
Makefile Try to unbreak the Makefile build. 2014-08-13 13:20:04 +00:00
lit.cfg
lit.site.cfg.in