[Mlir-commits] [mlir] [MLIR] Fix dangling llvm::function_ref references (PR #114950)

Haojian Wu llvmlistbot at llvm.org
Tue Nov 5 08:30:47 PST 2024


================
@@ -1084,13 +1084,12 @@ struct ForOpTensorCastFolder : public OpRewritePattern<ForOp> {
         continue;
 
       // Create a new ForOp with that iter operand replaced.
-      ValueTypeCastFnTy castFn = [](OpBuilder &b, Location loc, Type type,
----------------
hokein wrote:

Yes, using `auto` would also work. Since this is a one-line lambda, I think it is fine to inline it.

https://github.com/llvm/llvm-project/pull/114950


More information about the Mlir-commits mailing list