Skip to content

Commit 3b6462c

Browse files
committed
[mlir] Apply ClangTidy fixes
Prefer to check .empty() instead of .size() == 0
1 parent 2232881 commit 3b6462c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/Dialect/Mesh/Interfaces/ShardingInterface.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,12 @@ LogicalResult mesh::ShardingInterface::verifyShardingInterfaceImpl() {
166166

167167
// check loop types
168168
SmallVector<utils::IteratorType> loopTypes = getLoopIteratorTypes();
169-
if (loopTypes.size() == 0)
169+
if (loopTypes.empty())
170170
return failure();
171171

172172
// check maps
173173
SmallVector<AffineMap> maps = getIndexingMaps();
174-
if (maps.size() == 0)
174+
if (maps.empty())
175175
return failure();
176176
unsigned numOperands = op->getNumOperands();
177177
unsigned numResults = op->getNumResults();

0 commit comments

Comments
 (0)