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 Add a makefile for clang-query. Patch by Alex Horn! 2014-02-18 19:46:01 +00:00
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 Add a .clang-format to avoid reflow of test RUN lines 2013-12-01 05:08:00 +00:00
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 Make the clang-tidy-diff.py test conditional on the presence of Python 2.7. Use the python binary from the configuration. 2014-06-26 16:32:26 +00:00
lit.site.cfg.in Make the clang-tidy-diff.py test conditional on the presence of Python 2.7. Use the python binary from the configuration. 2014-06-26 16:32:26 +00:00