[Mlir-commits] [mlir] be03b14 - Apply clang-tidy fixes for llvm-else-after-return in IRCore.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Sat Nov 18 15:38:34 PST 2023


Author: Mehdi Amini
Date: 2023-11-18T15:38:21-08:00
New Revision: be03b14d3c7f073cf45600dd28cc5b532d68a95c

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

LOG: Apply clang-tidy fixes for llvm-else-after-return in IRCore.cpp (NFC)

Added: 
    

Modified: 
    mlir/lib/Bindings/Python/IRCore.cpp

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Bindings/Python/IRCore.cpp b/mlir/lib/Bindings/Python/IRCore.cpp
index 3ddb750bbcabc78..fb02b73a79f4824 100644
--- a/mlir/lib/Bindings/Python/IRCore.cpp
+++ b/mlir/lib/Bindings/Python/IRCore.cpp
@@ -981,8 +981,7 @@ MlirDialect PyDialects::getDialectForKey(const std::string &key,
     std::string msg = (Twine("Dialect '") + key + "' not found").str();
     if (attrError)
       throw py::attribute_error(msg);
-    else
-      throw py::index_error(msg);
+    throw py::index_error(msg);
   }
   return dialect;
 }


        


More information about the Mlir-commits mailing list