[Mlir-commits] [mlir] 18f0da5 - Apply clang-tidy fixes for llvm-prefer-isa-or-dyn-cast-in-conditionals in OpFormatGen.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Tue Feb 20 14:15:09 PST 2024


Author: Mehdi Amini
Date: 2024-02-20T14:14:38-08:00
New Revision: 18f0da5b9bbe8ebf63eb17bfa5deff94bd602f64

URL: https://github.com/llvm/llvm-project/commit/18f0da5b9bbe8ebf63eb17bfa5deff94bd602f64
DIFF: https://github.com/llvm/llvm-project/commit/18f0da5b9bbe8ebf63eb17bfa5deff94bd602f64.diff

LOG: Apply clang-tidy fixes for llvm-prefer-isa-or-dyn-cast-in-conditionals in OpFormatGen.cpp (NFC)

Added: 
    

Modified: 
    mlir/tools/mlir-tblgen/OpFormatGen.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/tools/mlir-tblgen/OpFormatGen.cpp b/mlir/tools/mlir-tblgen/OpFormatGen.cpp
index 31ceb05ad1dbfd..eb8c0aba1d33b6 100644
--- a/mlir/tools/mlir-tblgen/OpFormatGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpFormatGen.cpp
@@ -1414,7 +1414,7 @@ void OperationFormat::genElementParser(FormatElement *element, MethodBody &body,
     }
     body.unindent() << "}\n";
     body.unindent();
-  } else if (dyn_cast<PropDictDirective>(element)) {
+  } else if (isa<PropDictDirective>(element)) {
     body << "  if (parseProperties(parser, result))\n"
          << "    return ::mlir::failure();\n";
   } else if (auto *customDir = dyn_cast<CustomDirective>(element)) {
@@ -2239,7 +2239,7 @@ void OperationFormat::genElementPrinter(FormatElement *element,
   }
 
   // Emit the attribute dictionary.
-  if (dyn_cast<PropDictDirective>(element)) {
+  if (isa<PropDictDirective>(element)) {
     genPropDictPrinter(*this, op, body);
     lastWasPunctuation = false;
     return;


        


More information about the Mlir-commits mailing list