aaron.ballman accepted this revision. aaron.ballman added a comment. This revision is now accepted and ready to land.
LGTM, though please wait a bit for @njames93 to speak up if they still have concerns. ================ Comment at: clang-tools-extra/clang-tidy/readability/UseAnyOfAllOfCheck.cpp:61 + hasBody(allOf(hasDescendant(returns(true)), + unless(anyOf(hasDescendant(breakStmt()), + hasDescendant(returnsButNotTrue)))))) ---------------- mgehre wrote: > aaron.ballman wrote: > > Should we reject other ways to break out of the loop, like `goto` or > > `throw`? > I think throw statements still can be transformed. We cannot transform > `break` because the loop is gone and we cannot transform `goto` because we > cannot jump from the lambda into its caller. > But we can keep `throw` statements because exceptions can propagate from the > lambda through the algorithm back into the original caller. If we could not > allow `throw` statements, we would also have to disallow any other kind of > call statements. Ah, good point on `throw`, thank you! Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77572/new/ https://reviews.llvm.org/D77572 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits