Skip to content

Commit 18f0da5

Browse files
committed
Apply clang-tidy fixes for llvm-prefer-isa-or-dyn-cast-in-conditionals in OpFormatGen.cpp (NFC)
1 parent adf838d commit 18f0da5

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/tools/mlir-tblgen/OpFormatGen.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1414,7 +1414,7 @@ void OperationFormat::genElementParser(FormatElement *element, MethodBody &body,
14141414
}
14151415
body.unindent() << "}\n";
14161416
body.unindent();
1417-
} else if (dyn_cast<PropDictDirective>(element)) {
1417+
} else if (isa<PropDictDirective>(element)) {
14181418
body << " if (parseProperties(parser, result))\n"
14191419
<< " return ::mlir::failure();\n";
14201420
} else if (auto *customDir = dyn_cast<CustomDirective>(element)) {
@@ -2239,7 +2239,7 @@ void OperationFormat::genElementPrinter(FormatElement *element,
22392239
}
22402240

22412241
// Emit the attribute dictionary.
2242-
if (dyn_cast<PropDictDirective>(element)) {
2242+
if (isa<PropDictDirective>(element)) {
22432243
genPropDictPrinter(*this, op, body);
22442244
lastWasPunctuation = false;
22452245
return;

0 commit comments

Comments
 (0)