================
@@ -737,7 +722,21 @@ void AggExprEmitter::VisitLambdaExpr(LambdaExpr *e) {
void AggExprEmitter::VisitExprWithCleanups(ExprWithCleanups *e) {
CIRGenFunction::RunCleanupsScope cleanups(cgf);
- Visit(e->getSubExpr());
+ auto &builder = cgf.getBuilder();
+ auto scopeLoc = cgf.getLoc(e->getSourceRange());
+ mlir::OpBuilder::InsertPoint scopeBegin;
+ cir::ScopeOp::create(builder, scopeLoc, /*scopeBuilder=*/
+ [&](mlir::OpBuilder &b, mlir::Location loc) {
+ scopeBegin = b.saveInsertionPoint();
+ });
+
+ {
+ mlir::OpBuilder::InsertionGuard guard(builder);
+ builder.restoreInsertionPoint(scopeBegin);
+ CIRGenFunction::LexicalScope lexScope{cgf, scopeLoc,
----------------
Andres-Salamanca wrote:
Done
https://github.com/llvm/llvm-project/pull/173174
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits