[Mlir-commits] [mlir] a09bb6d - Replace dyn_cast<>() with isa<>() when the result isn't used (NFC)

Mehdi Amini llvmlistbot at llvm.org
Tue Jun 2 20:10:20 PDT 2020


Author: Mehdi Amini
Date: 2020-06-03T03:09:45Z
New Revision: a09bb6d77b39d3f87c76b525b355e158245a63cd

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

LOG: Replace dyn_cast<>() with isa<>() when the result isn't used (NFC)

Fixed warning reported by some GCC version.

Added: 
    

Modified: 
    mlir/lib/TableGen/Operator.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/TableGen/Operator.cpp b/mlir/lib/TableGen/Operator.cpp
index f575fedc1f24..1c001681ef4d 100644
--- a/mlir/lib/TableGen/Operator.cpp
+++ b/mlir/lib/TableGen/Operator.cpp
@@ -315,7 +315,7 @@ void tblgen::Operator::populateTypeInferenceInfo(
         continue;
       }
 
-      if (auto *attr = getArg(*mi).dyn_cast<NamedAttribute *>()) {
+      if (getArg(*mi).isa<NamedAttribute *>()) {
         // TODO: Handle attributes.
         continue;
       } else {


        


More information about the Mlir-commits mailing list