Skip to content

Commit

Permalink
[mlir] Apply ClangTidy fix.
Browse files Browse the repository at this point in the history
Prefer to use .empty() instead of checking size().
  • Loading branch information
akuegel committed Jan 2, 2024
1 parent b238a0d commit baf8a39
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion mlir/lib/Dialect/OpenACC/IR/OpenACC.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -628,7 +628,7 @@ template <typename Op>
static LogicalResult verifyDeviceTypeCountMatch(Op op, OperandRange operands,
ArrayAttr deviceTypes,
llvm::StringRef keyword) {
if (operands.size() > 0 && deviceTypes.getValue().size() != operands.size())
if (!operands.empty() && deviceTypes.getValue().size() != operands.size())
return op.emitOpError() << keyword << " operands count must match "
<< keyword << " device_type count";
return success();
Expand Down

0 comments on commit baf8a39

Please sign in to comment.