[PATCH] D125936: [Sema] Relax an assertion in BuildStmtExpr
Richard Smith - zygoloid via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu May 26 17:29:59 PDT 2022
rsmith added inline comments.
================
Comment at: clang/lib/Sema/SemaExpr.cpp:15746
ExprResult Sema::BuildStmtExpr(SourceLocation LPLoc, Stmt *SubStmt,
SourceLocation RPLoc, unsigned TemplateDepth) {
assert(SubStmt && isa<CompoundStmt>(SubStmt) && "Invalid action invocation!");
----------------
Is it possible to pass a flag into here to indicate if we're really building an `asm` statement? I don't think we want to remove the assert for a user-written statement expression that happens to begin with an `asm` statement.
It's ironic that we're building a statement expression to wrap an `asm` statement in order to make sure that cleanups are handled properly, and the `StmtExpr` is asserting because it doesn't expect to need to handle cleanups...
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D125936/new/
https://reviews.llvm.org/D125936
More information about the cfe-commits
mailing list