Apply clang-tidy fixes for performance-for-range-copy in SCF.cpp (NFC)

This commit is contained in:
Mehdi Amini 2022-04-03 23:19:13 +00:00
parent 6c93e1d329
commit 2d06420879
1 changed files with 1 additions and 1 deletions

View File

@ -1769,7 +1769,7 @@ struct CombineNestedIfs : public OpRewritePattern<IfOp> {
// Note that the array access to elseYield will not go out of bounds
// since it must have the same length as thenYield, since they both
// come from the same scf.if.
for (auto tup : llvm::enumerate(thenYield)) {
for (const auto &tup : llvm::enumerate(thenYield)) {
if (tup.value().getDefiningOp() == nestedIf) {
auto nestedIdx = tup.value().cast<OpResult>().getResultNumber();
if (nestedIf.elseYield().getOperand(nestedIdx) !=