diff --git a/mlir/include/mlir/IR/Builders.h b/mlir/include/mlir/IR/Builders.h --- a/mlir/include/mlir/IR/Builders.h +++ b/mlir/include/mlir/IR/Builders.h @@ -451,7 +451,7 @@ createOrFold(Location location, Args &&...args) { auto op = create(location, std::forward(args)...); SmallVector unused; - tryFold(op.getOperation(), unused); + (void)tryFold(op.getOperation(), unused); // Folding cannot remove a zero-result operation, so for convenience we // continue to return it.