Skip to content

Commit d9cd6ed

Browse files
committed
[MLIR] Apply clang-tidy fixes for performance-unnecessary-value-param in DialectTransform.cpp (NFC)
1 parent 4e4f7a5 commit d9cd6ed

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

mlir/lib/Bindings/Python/DialectTransform.cpp

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ static void populateDialectTransformSubmodule(const nb::module_ &m) {
2929
mlirTransformAnyOpTypeGetTypeID);
3030
anyOpType.def_classmethod(
3131
"get",
32-
[](nb::object cls, MlirContext ctx) {
32+
[](const nb::object &cls, MlirContext ctx) {
3333
return cls(mlirTransformAnyOpTypeGet(ctx));
3434
},
3535
"Get an instance of AnyOpType in the given context.", nb::arg("cls"),
@@ -44,7 +44,7 @@ static void populateDialectTransformSubmodule(const nb::module_ &m) {
4444
mlirTransformAnyParamTypeGetTypeID);
4545
anyParamType.def_classmethod(
4646
"get",
47-
[](nb::object cls, MlirContext ctx) {
47+
[](const nb::object &cls, MlirContext ctx) {
4848
return cls(mlirTransformAnyParamTypeGet(ctx));
4949
},
5050
"Get an instance of AnyParamType in the given context.", nb::arg("cls"),
@@ -59,7 +59,7 @@ static void populateDialectTransformSubmodule(const nb::module_ &m) {
5959
mlirTransformAnyValueTypeGetTypeID);
6060
anyValueType.def_classmethod(
6161
"get",
62-
[](nb::object cls, MlirContext ctx) {
62+
[](const nb::object &cls, MlirContext ctx) {
6363
return cls(mlirTransformAnyValueTypeGet(ctx));
6464
},
6565
"Get an instance of AnyValueType in the given context.", nb::arg("cls"),
@@ -74,7 +74,8 @@ static void populateDialectTransformSubmodule(const nb::module_ &m) {
7474
mlirTransformOperationTypeGetTypeID);
7575
operationType.def_classmethod(
7676
"get",
77-
[](nb::object cls, const std::string &operationName, MlirContext ctx) {
77+
[](const nb::object &cls, const std::string &operationName,
78+
MlirContext ctx) {
7879
MlirStringRef cOperationName =
7980
mlirStringRefCreate(operationName.data(), operationName.size());
8081
return cls(mlirTransformOperationTypeGet(ctx, cOperationName));
@@ -101,7 +102,7 @@ static void populateDialectTransformSubmodule(const nb::module_ &m) {
101102
mlirTransformParamTypeGetTypeID);
102103
paramType.def_classmethod(
103104
"get",
104-
[](nb::object cls, MlirType type, MlirContext ctx) {
105+
[](const nb::object &cls, MlirType type, MlirContext ctx) {
105106
return cls(mlirTransformParamTypeGet(ctx, type));
106107
},
107108
"Get an instance of ParamType for the given type in the given context.",

0 commit comments

Comments
 (0)