[Mlir-commits] [mlir] 468581f - [mlir] Fix unused variable waraning in OpDocGen

Jacques Pienaar llvmlistbot at llvm.org
Wed Nov 10 18:19:19 PST 2021


Author: Jacques Pienaar
Date: 2021-11-10T18:19:09-08:00
New Revision: 468581f16bff35302e90c0dfb9e8978ceb8ea273

URL: https://github.com/llvm/llvm-project/commit/468581f16bff35302e90c0dfb9e8978ceb8ea273
DIFF: https://github.com/llvm/llvm-project/commit/468581f16bff35302e90c0dfb9e8978ceb8ea273.diff

LOG: [mlir] Fix unused variable waraning in OpDocGen

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/tools/mlir-tblgen/OpDocGen.cpp b/mlir/tools/mlir-tblgen/OpDocGen.cpp
index db73bbb6e6e2..52d2feb0d6cd 100644
--- a/mlir/tools/mlir-tblgen/OpDocGen.cpp
+++ b/mlir/tools/mlir-tblgen/OpDocGen.cpp
@@ -94,7 +94,7 @@ static void emitOpTraitsDoc(Operator op, raw_ostream &os) {
   // Collect using set to sort effects, interfaces & traits.
   std::set<std::string> effects, interfaces, traits;
   for (auto &trait : op.getTraits()) {
-    if (auto *nt = dyn_cast<PredTrait>(&trait))
+    if (isa<PredTrait>(&trait))
       continue;
 
     std::string name = trait.getDef().getName().str();
@@ -104,7 +104,7 @@ static void emitOpTraitsDoc(Operator op, raw_ostream &os) {
     traitName.consume_back("::Impl");
     if (ref.startswith("anonymous_"))
       name = traitName.str();
-    if (auto *nt = dyn_cast<InterfaceTrait>(&trait)) {
+    if (isa<InterfaceTrait>(&trait)) {
       if (trait.getDef().isSubClassOf("SideEffectsTraitBase")) {
         auto effectName = trait.getDef().getValueAsString("baseEffectName");
         effectName.consume_front("::");


        


More information about the Mlir-commits mailing list