diff options
author | Alexander Kornienko <alexfh@google.com> | 2015-07-01 12:39:40 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2015-07-01 12:39:40 +0000 |
commit | 6ae400d12256de0547c1b06919d126f664c78d7e (patch) | |
tree | 2c16f7333e11b0f4c9bb2ee046f8b7a89ffd6b94 /llvm/tools/llvm-objdump/llvm-objdump.cpp | |
parent | def554db451cafb36b71d95823eaf65538b0a3b7 (diff) | |
download | bcm5719-llvm-6ae400d12256de0547c1b06919d126f664c78d7e.tar.gz bcm5719-llvm-6ae400d12256de0547c1b06919d126f664c78d7e.zip |
[clang-tidy] Enhance clang-tidy readability-simplify-boolean-expr...
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
Diffstat (limited to 'llvm/tools/llvm-objdump/llvm-objdump.cpp')
0 files changed, 0 insertions, 0 deletions