[clang] [codegen] Emit missing cleanups for stmt-expr and coro suspensions [take-2] (PR #85398)
Richard Smith via cfe-commits
cfe-commits at lists.llvm.org
Tue Mar 26 11:23:33 PDT 2024
================
@@ -2503,6 +2506,29 @@ Stmt *BlockExpr::getBody() {
// Generic Expression Routines
//===----------------------------------------------------------------------===//
+bool Expr::mayBranchOut() const {
----------------
zygoloid wrote:
Computing this seems a little expensive in general. I wonder if we could track a bit on `FunctionDecl` that indicates whether it contains any branches out of statement expressions, and skip calling this if the enclosing function is not a coroutine and does not contain branches out of statement expressions.
https://github.com/llvm/llvm-project/pull/85398
More information about the cfe-commits
mailing list