Skip to content

Commit 438ecc9

Browse files
committed
Use range for loop
1 parent 148d84a commit 438ecc9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3092,8 +3092,8 @@ void OpEmitter::buildParamList(SmallVectorImpl<MethodParameter> &paramList,
30923092
// Check if parameters besides default valued one are enough to distinguish
30933093
// between builders with wrapped and unwrapped arguments.
30943094
bool hasBuilderAmbiguity = true;
3095-
for (int i = 0; i < op.getNumArgs(); ++i) {
3096-
auto *namedAttr = dyn_cast<NamedAttribute *>(op.getArg(i));
3095+
for (const auto &arg : op.getArgs()) {
3096+
auto *namedAttr = dyn_cast<NamedAttribute *>(arg);
30973097
if (!namedAttr)
30983098
continue;
30993099
Attribute attr = namedAttr->attr;

0 commit comments

Comments
 (0)