[Mlir-commits] [mlir] 3b6462c - [mlir] Apply ClangTidy fixes
Adrian Kuegel
llvmlistbot at llvm.org
Mon Jun 24 01:56:20 PDT 2024
Author: Adrian Kuegel
Date: 2024-06-24T08:56:08Z
New Revision: 3b6462c5b5b38c2f329a2bf97734196610cb4a35
URL: https://github.com/llvm/llvm-project/commit/3b6462c5b5b38c2f329a2bf97734196610cb4a35
DIFF: https://github.com/llvm/llvm-project/commit/3b6462c5b5b38c2f329a2bf97734196610cb4a35.diff
LOG: [mlir] Apply ClangTidy fixes
Prefer to check .empty() instead of .size() == 0
Added:
Modified:
mlir/lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp b/mlir/lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp
index 54fc91cb26427..a2338476397a8 100644
--- a/mlir/lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp
+++ b/mlir/lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp
@@ -166,12 +166,12 @@ LogicalResult mesh::ShardingInterface::verifyShardingInterfaceImpl() {
// check loop types
SmallVector<utils::IteratorType> loopTypes = getLoopIteratorTypes();
- if (loopTypes.size() == 0)
+ if (loopTypes.empty())
return failure();
// check maps
SmallVector<AffineMap> maps = getIndexingMaps();
- if (maps.size() == 0)
+ if (maps.empty())
return failure();
unsigned numOperands = op->getNumOperands();
unsigned numResults = op->getNumResults();
More information about the Mlir-commits
mailing list