Skip to content

Commit

Permalink
Enable noexcept-move-ctor check
Browse files Browse the repository at this point in the history
  • Loading branch information
afuller-TT committed Dec 13, 2024
1 parent 660d249 commit 56371f1
Showing 5 changed files with 6 additions and 9 deletions.
3 changes: 0 additions & 3 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -50,7 +50,6 @@ Checks: >
-cppcoreguidelines-macro-usage,
-cppcoreguidelines-narrowing-conversions,
-cppcoreguidelines-no-malloc,
-cppcoreguidelines-noexcept-move-operations,
-cppcoreguidelines-noexcept-swap,
-cppcoreguidelines-non-private-member-variables-in-classes,
-cppcoreguidelines-owning-memory,
@@ -96,7 +95,6 @@ Checks: >
-hicpp-named-parameter,
-hicpp-no-array-decay,
-hicpp-no-malloc,
-hicpp-noexcept-move,
-hicpp-signed-bitwise,
-hicpp-special-member-functions,
-hicpp-uppercase-literal-suffix,
@@ -151,7 +149,6 @@ Checks: >
-performance-move-const-arg,
-performance-move-constructor-init,
-performance-no-int-to-ptr,
-performance-noexcept-move-constructor,
-performance-noexcept-swap,
-performance-unnecessary-copy-initialization,
-readability-avoid-const-params-in-decls,
2 changes: 1 addition & 1 deletion tt_metal/impl/allocator/allocator.cpp
Original file line number Diff line number Diff line change
@@ -169,7 +169,7 @@ BankManager::~BankManager() {
this->allocator_.reset(nullptr);
}

BankManager&& BankManager::operator=(BankManager&& that) {
BankManager&& BankManager::operator=(BankManager&& that) noexcept {
buffer_type_ = that.buffer_type_;
allocated_buffers_ = that.allocated_buffers_;
bank_id_to_bank_offset_ = that.bank_id_to_bank_offset_;
2 changes: 1 addition & 1 deletion tt_metal/impl/allocator/allocator.hpp
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@ class BankManager {
uint32_t alignment_bytes,
DeviceAddr alloc_offset = 0,
bool disable_interleaved = false);
BankManager&& operator=(BankManager&& that);
BankManager&& operator=(BankManager&& that) noexcept;
~BankManager();
uint32_t num_banks() const;

4 changes: 2 additions & 2 deletions tt_metal/impl/buffers/semaphore.cpp
Original file line number Diff line number Diff line change
@@ -30,13 +30,13 @@ Semaphore& Semaphore::operator=(const Semaphore& other) {
return *this;
}

Semaphore::Semaphore(Semaphore&& other) :
Semaphore::Semaphore(Semaphore&& other) noexcept :
core_range_set_(other.core_range_set_),
id_(other.id_),
initial_value_(other.initial_value_),
core_type_(other.core_type_) {}

Semaphore& Semaphore::operator=(Semaphore&& other) {
Semaphore& Semaphore::operator=(Semaphore&& other) noexcept {
if (this != &other) {
this->core_range_set_ = other.core_range_set_;
this->id_ = other.id_;
4 changes: 2 additions & 2 deletions tt_metal/impl/buffers/semaphore.hpp
Original file line number Diff line number Diff line change
@@ -24,9 +24,9 @@ class Semaphore {

Semaphore& operator=(const Semaphore& other);

Semaphore(Semaphore&& other);
Semaphore(Semaphore&& other) noexcept;

Semaphore& operator=(Semaphore&& other);
Semaphore& operator=(Semaphore&& other) noexcept;

uint32_t id() const { return id_; }

0 comments on commit 56371f1

Please sign in to comment.