[Mlir-commits] [mlir] b77f845 - [MLIR] Apply clang-tidy fixes for performance-unnecessary-value-param in DialectPDL.cpp (NFC)
Mehdi Amini
llvmlistbot at llvm.org
Sat Aug 23 12:56:34 PDT 2025
Author: Mehdi Amini
Date: 2025-08-23T12:53:28-07:00
New Revision: b77f845552c3fb4267d4dd864d3ad5f8bf5e174e
URL: https://github.com/llvm/llvm-project/commit/b77f845552c3fb4267d4dd864d3ad5f8bf5e174e
DIFF: https://github.com/llvm/llvm-project/commit/b77f845552c3fb4267d4dd864d3ad5f8bf5e174e.diff
LOG: [MLIR] Apply clang-tidy fixes for performance-unnecessary-value-param in DialectPDL.cpp (NFC)
Added:
Modified:
mlir/lib/Bindings/Python/DialectPDL.cpp
Removed:
################################################################################
diff --git a/mlir/lib/Bindings/Python/DialectPDL.cpp b/mlir/lib/Bindings/Python/DialectPDL.cpp
index ac09a15e17af2..2acedbc26b072 100644
--- a/mlir/lib/Bindings/Python/DialectPDL.cpp
+++ b/mlir/lib/Bindings/Python/DialectPDL.cpp
@@ -32,7 +32,7 @@ static void populateDialectPDLSubmodule(const nanobind::module_ &m) {
mlir_type_subclass(m, "AttributeType", mlirTypeIsAPDLAttributeType);
attributeType.def_classmethod(
"get",
- [](nb::object cls, MlirContext ctx) {
+ [](const nb::object &cls, MlirContext ctx) {
return cls(mlirPDLAttributeTypeGet(ctx));
},
"Get an instance of AttributeType in given context.", nb::arg("cls"),
@@ -46,7 +46,7 @@ static void populateDialectPDLSubmodule(const nanobind::module_ &m) {
mlir_type_subclass(m, "OperationType", mlirTypeIsAPDLOperationType);
operationType.def_classmethod(
"get",
- [](nb::object cls, MlirContext ctx) {
+ [](const nb::object &cls, MlirContext ctx) {
return cls(mlirPDLOperationTypeGet(ctx));
},
"Get an instance of OperationType in given context.", nb::arg("cls"),
@@ -59,7 +59,7 @@ static void populateDialectPDLSubmodule(const nanobind::module_ &m) {
auto rangeType = mlir_type_subclass(m, "RangeType", mlirTypeIsAPDLRangeType);
rangeType.def_classmethod(
"get",
- [](nb::object cls, MlirType elementType) {
+ [](const nb::object &cls, MlirType elementType) {
return cls(mlirPDLRangeTypeGet(elementType));
},
"Gets an instance of RangeType in the same context as the provided "
@@ -77,7 +77,7 @@ static void populateDialectPDLSubmodule(const nanobind::module_ &m) {
auto typeType = mlir_type_subclass(m, "TypeType", mlirTypeIsAPDLTypeType);
typeType.def_classmethod(
"get",
- [](nb::object cls, MlirContext ctx) {
+ [](const nb::object &cls, MlirContext ctx) {
return cls(mlirPDLTypeTypeGet(ctx));
},
"Get an instance of TypeType in given context.", nb::arg("cls"),
@@ -90,7 +90,7 @@ static void populateDialectPDLSubmodule(const nanobind::module_ &m) {
auto valueType = mlir_type_subclass(m, "ValueType", mlirTypeIsAPDLValueType);
valueType.def_classmethod(
"get",
- [](nb::object cls, MlirContext ctx) {
+ [](const nb::object &cls, MlirContext ctx) {
return cls(mlirPDLValueTypeGet(ctx));
},
"Get an instance of TypeType in given context.", nb::arg("cls"),
More information about the Mlir-commits
mailing list