[PATCH] Add readability-simplify-boolean-expr check to clang-tidy
Alexander Kornienko
alexfh at google.com
Thu Mar 19 18:53:13 PDT 2015
Another couple of nits. Otherwise looks good!
Please fix the issues and have someone submit this for you. I won't be able to submit the patch in the next few days.
================
Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.cpp:244
@@ +243,3 @@
+ replaceWithExpression(Result, NegatedRightRemoved, true, true);
+ } else if (auto TrueConditionRemoved =
+ getBoolLiteral(Result, ConditionThenStmtId)) {
----------------
I had to look up what `auto` is here. Let's use `const CXXBoolLiteralExpr *`.
================
Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.cpp:250
@@ +249,3 @@
+ replaceWithElseStatement(Result, FalseConditionRemoved);
+ } else if (auto *Ternary =
+ Result.Nodes.getNodeAs<ConditionalOperator>(TernaryId)) {
----------------
`const auto *`, please.
http://reviews.llvm.org/D7648
EMAIL PREFERENCES
http://reviews.llvm.org/settings/panel/emailpreferences/
More information about the cfe-commits
mailing list