alexfh requested changes to this revision.
This revision now requires changes to proceed.

================
Comment at: clang-tidy/readability/ElseAfterReturnCheck.cpp:25
@@ +24,3 @@
+          forEach(ifStmt(hasThen(stmt(anyOf(
+                             returnStmt().bind("return"),
+                             compoundStmt(has(returnStmt().bind("return"))),
----------------
Let's structure this differently to reduce code duplication:

  auto returnLikeStmt = stmt(anyOf(returnStmt().bind("return"), 
continueStmt().bind("continue"), ...));
  Finder->addMatcher(stmt(forEach(ifStmt(hasThen(anyOf(returnLikeStmt, 
compoundStmt(has(returnLikeStmt)))), hasElse(...


https://reviews.llvm.org/D23265



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to