[Mlir-commits] [mlir] 745415d - [MLIR] Apply clang-tidy fixes for llvm-else-after-return in IRAttributes.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Tue Aug 26 04:51:01 PDT 2025


Author: Mehdi Amini
Date: 2025-08-26T04:48:57-07:00
New Revision: 745415d655609cedc69a6d35f758882b12c9864f

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

LOG: [MLIR] Apply clang-tidy fixes for llvm-else-after-return in IRAttributes.cpp (NFC)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Bindings/Python/IRAttributes.cpp b/mlir/lib/Bindings/Python/IRAttributes.cpp
index db84ee1fcbce9..3711cc32775ea 100644
--- a/mlir/lib/Bindings/Python/IRAttributes.cpp
+++ b/mlir/lib/Bindings/Python/IRAttributes.cpp
@@ -1092,11 +1092,10 @@ class PyDenseElementsAttribute
                                     "when the type is not a shaped type.");
       }
       return *bulkLoadElementType;
-    } else {
-      MlirAttribute encodingAttr = mlirAttributeGetNull();
-      return mlirRankedTensorTypeGet(shape.size(), shape.data(),
-                                     *bulkLoadElementType, encodingAttr);
     }
+    MlirAttribute encodingAttr = mlirAttributeGetNull();
+    return mlirRankedTensorTypeGet(shape.size(), shape.data(),
+                                   *bulkLoadElementType, encodingAttr);
   }
 
   static MlirAttribute getAttributeFromBuffer(


        


More information about the Mlir-commits mailing list