================
@@ -1099,7 +1099,9 @@ class ScalarExprEmitter : public
StmtVisitor<ScalarExprEmitter, mlir::Value> {
CIRGenFunction::LexicalScope lexScope{cgf, loc,
b.getInsertionBlock()};
cgf.curLexScope->setAsTernary();
- b.create<cir::YieldOp>(loc, cgf.evaluateExprAsBool(e->getRHS()));
+ mlir::Value res = cgf.evaluateExprAsBool(e->getRHS());
+ lexScope.forceCleanup();
+ b.create<cir::YieldOp>(loc, res);
----------------
xlauko wrote:
```suggestion
cir::YieldOp::create(b, loc, res);
```
https://github.com/llvm/llvm-project/pull/161922
_______________________________________________
cfe-commits mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits