[clang-tidy] Partly rewrite readability-simplify-boolean-expr using RAV
authorAlexander Kornienko <alexfh@google.com>
Mon, 15 May 2017 17:06:51 +0000 (17:06 +0000)
committerAlexander Kornienko <alexfh@google.com>
Mon, 15 May 2017 17:06:51 +0000 (17:06 +0000)
commit7009d6571494f5f4e6590ae8b71772186a905214
treea3c13b8c01a45fbada654068f36e2a4748ffa892
parentd369455bcff77d5b442db16ddb4a1261438d8b71
[clang-tidy] Partly rewrite readability-simplify-boolean-expr using RAV

The check was using AST matchers in a very inefficient manner. By rewriting the
BinaryOperator-related parts using RAV, the check was sped up by a factor of
up to 10000 on some files (mostly, generated code using binary operators in
tables), but also significantly sped up for regular large files.
As a side effect, the code became clearer and more readable.

llvm-svn: 303081
clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.cpp
clang-tools-extra/clang-tidy/readability/SimplifyBooleanExprCheck.h