clang-tidy: Enable cppcoreguidelines-special-member-functions
This check finds classes where some but not all of the special
member functions are defined.
Change-Id: Ic677e32df810c07eb5e4cc0fd14a03c4d6c376bb
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/.clang-tidy b/.clang-tidy
index 5919093..086b9aa 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -204,7 +204,8 @@
cppcoreguidelines-pro-type-cstyle-cast,
cppcoreguidelines-pro-type-static-cast-downcast,
cppcoreguidelines-pro-type-union-access,
-cppcoreguidelines-slicing'
+cppcoreguidelines-slicing,
+cppcoreguidelines-special-member-functions'
WarningsAsErrors: '*'
HeaderFilterRegex: '.*'
diff --git a/activation.hpp b/activation.hpp
index f813886..8552e88 100644
--- a/activation.hpp
+++ b/activation.hpp
@@ -140,6 +140,13 @@
disableRebootGuard();
}
+ ActivationBlocksTransition(const ActivationBlocksTransition&) = delete;
+ ActivationBlocksTransition&
+ operator=(const ActivationBlocksTransition&) = delete;
+ ActivationBlocksTransition(ActivationBlocksTransition&&) = delete;
+ ActivationBlocksTransition&
+ operator=(ActivationBlocksTransition&&) = delete;
+
private:
sdbusplus::bus_t& bus;
diff --git a/flash.hpp b/flash.hpp
index 0da94de..9d1dc43 100644
--- a/flash.hpp
+++ b/flash.hpp
@@ -18,6 +18,12 @@
class Flash
{
public:
+ Flash() = default;
+ Flash(const Flash&) = delete;
+ Flash& operator=(const Flash&) = delete;
+ Flash(Flash&&) = default;
+ Flash& operator=(Flash&&) = delete;
+
/* Destructor */
virtual ~Flash() = default;
diff --git a/image_manager.cpp b/image_manager.cpp
index 385fee4..8e32e3f 100644
--- a/image_manager.cpp
+++ b/image_manager.cpp
@@ -54,6 +54,11 @@
fs::remove_all(path, ec);
}
}
+
+ RemovablePath(const RemovablePath& other) = delete;
+ RemovablePath& operator=(const RemovablePath& other) = delete;
+ RemovablePath(RemovablePath&&) = delete;
+ RemovablePath& operator=(RemovablePath&&) = delete;
};
namespace // anonymous
diff --git a/item_updater_helper.hpp b/item_updater_helper.hpp
index 728af96..c0584a2 100644
--- a/item_updater_helper.hpp
+++ b/item_updater_helper.hpp
@@ -19,6 +19,7 @@
Helper& operator=(const Helper&) = delete;
Helper(Helper&&) = default;
Helper& operator=(Helper&&) = delete;
+ ~Helper() = default;
/** @brief Constructor
*