From 7d646ea5aff35fde5d42b718e617108c268b7e00 Mon Sep 17 00:00:00 2001 From: Leon Hielscher Date: Tue, 9 Jul 2024 19:56:17 +0200 Subject: [PATCH] clang-tidy --- lib/Dialect/Sim/Transforms/ProceduralizeSim.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/Dialect/Sim/Transforms/ProceduralizeSim.cpp b/lib/Dialect/Sim/Transforms/ProceduralizeSim.cpp index 1bf01048513e..dc159788db64 100644 --- a/lib/Dialect/Sim/Transforms/ProceduralizeSim.cpp +++ b/lib/Dialect/Sim/Transforms/ProceduralizeSim.cpp @@ -63,7 +63,7 @@ ProceduralizeSimPass::getPrintTokens(PrintFormattedOp op) { SmallMapVector concatStack; SmallVector tokens; - auto defOp = op.getInput().getDefiningOp(); + auto *defOp = op.getInput().getDefiningOp(); if (!defOp) { op.emitError("Format string token must not be a block argument."); @@ -85,7 +85,7 @@ ProceduralizeSimPass::getPrintTokens(PrintFormattedOp op) { // Iterate over concatenated operands while (operandIndex < currentConcat.getNumOperands()) { - auto nextDefOp = currentConcat.getOperand(operandIndex).getDefiningOp(); + auto *nextDefOp = currentConcat.getOperand(operandIndex).getDefiningOp(); if (!nextDefOp) { currentConcat.emitError( "Format string token must not be a block argument."); @@ -211,7 +211,7 @@ LogicalResult ProceduralizeSimPass::proceduralizePrintOps( auto tokens = tokenMap[printOp]; SmallVector clonedOperands; builder.setInsertionPointToStart(trigOp.getBodyBlock()); - for (auto token : tokens) { + for (auto *token : tokens) { auto &fmtCloned = cloneMap[token]; if (!fmtCloned) fmtCloned = builder.clone(*token, argumentMapper); @@ -221,7 +221,7 @@ LogicalResult ProceduralizeSimPass::proceduralizePrintOps( // Check if we can reuse the previous conditional block. if (condArg != prevCondition.first) prevCondition.second = nullptr; - auto condBlock = prevCondition.second; + auto *condBlock = prevCondition.second; // If not, create a new scf::IfOp for the condition. if (!condBlock) { @@ -262,7 +262,7 @@ void ProceduralizeSimPass::cleanup() { noChange = true; } - auto opToErase = cleanupList.pop_back_val(); + auto *opToErase = cleanupList.pop_back_val(); if (erasedOps.contains(opToErase)) continue;