================ @@ -36,6 +36,18 @@ class ScalarExprEmitter : public StmtVisitor<ScalarExprEmitter, mlir::Value> { bool ira = false) : cgf(cgf), builder(builder), ignoreResultAssign(ira) {} + //===--------------------------------------------------------------------===// + // Utilities + //===--------------------------------------------------------------------===// + + bool TestAndClearIgnoreResultAssign() { ---------------- andykaylor wrote:
So, maybe replace calls to this with `std::exchange(ignoreResultAssign, false)`? That's just as long, but maybe a bit clearer. I notice there are several places (in the incubator and the classic codegen) that call this function and then don't use the result. I'm not sure why they're doing that rather than just `ignoreResultAssign = false;`. https://github.com/llvm/llvm-project/pull/130690 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits