diff options
author | Adrian Kuegel <akuegel@google.com> | 2023-12-11 09:43:08 +0000 |
---|---|---|
committer | Adrian Kuegel <akuegel@google.com> | 2023-12-11 09:43:08 +0000 |
commit | ea2e83af55e76540d69f9efcc341d321b4c0fd06 (patch) | |
tree | 8dd34bc2c6c438f235d6ce177296130f6efc005e /mlir/lib/Bindings/Python/IRModule.h | |
parent | 13c648f6bda9a4b6c9cd1ee5f0c21c72acec1320 (diff) | |
download | llvm-ea2e83af55e76540d69f9efcc341d321b4c0fd06.zip llvm-ea2e83af55e76540d69f9efcc341d321b4c0fd06.tar.gz llvm-ea2e83af55e76540d69f9efcc341d321b4c0fd06.tar.bz2 |
[mlir][Python] Apply ClangTidy findings.
move constructors should be marked noexcept
Diffstat (limited to 'mlir/lib/Bindings/Python/IRModule.h')
-rw-r--r-- | mlir/lib/Bindings/Python/IRModule.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mlir/lib/Bindings/Python/IRModule.h b/mlir/lib/Bindings/Python/IRModule.h index d99b87d..79b7e0c 100644 --- a/mlir/lib/Bindings/Python/IRModule.h +++ b/mlir/lib/Bindings/Python/IRModule.h @@ -4,6 +4,7 @@ // See https://llvm.org/LICENSE.txt for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // +// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception //===----------------------------------------------------------------------===// #ifndef MLIR_BINDINGS_PYTHON_IRMODULES_H @@ -53,7 +54,7 @@ public: "cannot construct PyObjectRef with null referrent"); assert(this->object && "cannot construct PyObjectRef with null object"); } - PyObjectRef(PyObjectRef &&other) + PyObjectRef(PyObjectRef &&other) noexcept : referrent(other.referrent), object(std::move(other.object)) { other.referrent = nullptr; assert(!other.object); @@ -484,7 +485,8 @@ public: mlirDialectRegistryDestroy(registry); } PyDialectRegistry(PyDialectRegistry &) = delete; - PyDialectRegistry(PyDialectRegistry &&other) : registry(other.registry) { + PyDialectRegistry(PyDialectRegistry &&other) noexcept + : registry(other.registry) { other.registry = {nullptr}; } |