[Mlir-commits] [mlir] 63f2bf4 - [MLIR] Apply clang-tidy fixes for performance-unnecessary-value-param in DialectSparseTensor.cpp (NFC)

Mehdi Amini llvmlistbot at llvm.org
Sat Aug 23 13:51:42 PDT 2025


Author: Mehdi Amini
Date: 2025-08-23T13:47:50-07:00
New Revision: 63f2bf4748115226a5877865d6afece25f7e1e5d

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

LOG: [MLIR] Apply clang-tidy fixes for performance-unnecessary-value-param in DialectSparseTensor.cpp (NFC)

Added: 
    

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

Removed: 
    


################################################################################
diff  --git a/mlir/lib/Bindings/Python/DialectSparseTensor.cpp b/mlir/lib/Bindings/Python/DialectSparseTensor.cpp
index 27b731b5bdfaf..9d7dc110764fb 100644
--- a/mlir/lib/Bindings/Python/DialectSparseTensor.cpp
+++ b/mlir/lib/Bindings/Python/DialectSparseTensor.cpp
@@ -38,7 +38,8 @@ static void populateDialectSparseTensorSubmodule(const nb::module_ &m) {
                           mlirAttributeIsASparseTensorEncodingAttr)
       .def_classmethod(
           "get",
-          [](nb::object cls, std::vector<MlirSparseTensorLevelType> lvlTypes,
+          [](const nb::object &cls,
+             std::vector<MlirSparseTensorLevelType> lvlTypes,
              std::optional<MlirAffineMap> dimToLvl,
              std::optional<MlirAffineMap> lvlToDim, int posWidth, int crdWidth,
              std::optional<MlirAttribute> explicitVal,
@@ -58,7 +59,7 @@ static void populateDialectSparseTensorSubmodule(const nb::module_ &m) {
           "Gets a sparse_tensor.encoding from parameters.")
       .def_classmethod(
           "build_level_type",
-          [](nb::object cls, MlirSparseTensorLevelFormat lvlFmt,
+          [](const nb::object &cls, MlirSparseTensorLevelFormat lvlFmt,
              const std::vector<MlirSparseTensorLevelPropertyNondefault>
                  &properties,
              unsigned n, unsigned m) {


        


More information about the Mlir-commits mailing list