[PATCH] D56303: [clang-tidy] Handle case/default statements when simplifying boolean expressions

Alexander Kornienko via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 23 04:56:21 PST 2019


alexfh added inline comments.


================
Comment at: clang-tidy/readability/SimplifyBooleanExprCheck.cpp:517
+          has(compoundStmt(
+                  has(caseStmt(hasDescendant(ifStmt(hasThen(returnsBool(Value)),
+                                                    unless(hasElse(stmt())))
----------------
Please put the more expensive matcher (`hasDescendant` may be *really* expensive) last. Same below.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D56303/new/

https://reviews.llvm.org/D56303





More information about the cfe-commits mailing list