[mlir] Apply ClangTidy readability finding.

Use empty() instead of checking for size 0.
This commit is contained in:
Adrian Kuegel
2022-12-19 09:50:43 +01:00
parent 8aa86ac3c4
commit 0fe37a75a5

View File

@@ -385,7 +385,7 @@ void AbstractSparseBackwardDataFlowAnalysis::visitOperation(Operation *op) {
for (auto [index, block] : llvm::enumerate(op->getSuccessors())) {
SuccessorOperands successorOperands = branch.getSuccessorOperands(index);
OperandRange forwarded = successorOperands.getForwardedOperands();
if (forwarded.size()) {
if (!forwarded.empty()) {
MutableArrayRef<OpOperand> operands = op->getOpOperands().slice(
forwarded.getBeginOperandIndex(), forwarded.size());
for (OpOperand &operand : operands) {