Commit 55671b41 authored by wahikihiki's avatar wahikihiki Committed by Brad King

clang-tidy: Use `= default`

Suppress some cases in `Source/cmGeneratorExpressionNode.cxx` and
`Source/cmUVHandlePtr.h` where a few older compilers require a
user-defined default constructor (with `{}`).
parent a7f5cd45
...@@ -14,7 +14,6 @@ modernize-*,\ ...@@ -14,7 +14,6 @@ modernize-*,\
-modernize-raw-string-literal,\ -modernize-raw-string-literal,\
-modernize-return-braced-init-list,\ -modernize-return-braced-init-list,\
-modernize-use-auto,\ -modernize-use-auto,\
-modernize-use-equals-default,\
-modernize-use-equals-delete,\ -modernize-use-equals-delete,\
-modernize-use-noexcept,\ -modernize-use-noexcept,\
-modernize-use-transparent-functors,\ -modernize-use-transparent-functors,\
......
...@@ -21,9 +21,7 @@ cmCPackIFWGenerator::cmCPackIFWGenerator() ...@@ -21,9 +21,7 @@ cmCPackIFWGenerator::cmCPackIFWGenerator()
this->Generator = this; this->Generator = this;
} }
cmCPackIFWGenerator::~cmCPackIFWGenerator() cmCPackIFWGenerator::~cmCPackIFWGenerator() = default;
{
}
int cmCPackIFWGenerator::PackageFiles() int cmCPackIFWGenerator::PackageFiles()
{ {
......
...@@ -16,9 +16,7 @@ ...@@ -16,9 +16,7 @@
#include <stddef.h> #include <stddef.h>
#include <utility> #include <utility>
cmCPackIFWInstaller::cmCPackIFWInstaller() cmCPackIFWInstaller::cmCPackIFWInstaller() = default;
{
}
void cmCPackIFWInstaller::printSkippedOptionWarning( void cmCPackIFWInstaller::printSkippedOptionWarning(
const std::string& optionName, const std::string& optionValue) const std::string& optionName, const std::string& optionValue)
......
...@@ -24,9 +24,7 @@ cmCPackIFWPackage::CompareStruct::CompareStruct() ...@@ -24,9 +24,7 @@ cmCPackIFWPackage::CompareStruct::CompareStruct()
} }
//------------------------------------------------------- DependenceStruct --- //------------------------------------------------------- DependenceStruct ---
cmCPackIFWPackage::DependenceStruct::DependenceStruct() cmCPackIFWPackage::DependenceStruct::DependenceStruct() = default;
{
}
cmCPackIFWPackage::DependenceStruct::DependenceStruct( cmCPackIFWPackage::DependenceStruct::DependenceStruct(
const std::string& dependence) const std::string& dependence)
......
...@@ -10,6 +10,4 @@ cmCPack7zGenerator::cmCPack7zGenerator() ...@@ -10,6 +10,4 @@ cmCPack7zGenerator::cmCPack7zGenerator()
{ {
} }
cmCPack7zGenerator::~cmCPack7zGenerator() cmCPack7zGenerator::~cmCPack7zGenerator() = default;
{
}
...@@ -22,9 +22,7 @@ cmCPackArchiveGenerator::cmCPackArchiveGenerator(cmArchiveWrite::Compress t, ...@@ -22,9 +22,7 @@ cmCPackArchiveGenerator::cmCPackArchiveGenerator(cmArchiveWrite::Compress t,
this->ArchiveFormat = format; this->ArchiveFormat = format;
} }
cmCPackArchiveGenerator::~cmCPackArchiveGenerator() cmCPackArchiveGenerator::~cmCPackArchiveGenerator() = default;
{
}
std::string cmCPackArchiveGenerator::GetArchiveComponentFileName( std::string cmCPackArchiveGenerator::GetArchiveComponentFileName(
const std::string& component, bool isGroupName) const std::string& component, bool isGroupName)
......
...@@ -8,13 +8,9 @@ ...@@ -8,13 +8,9 @@
#include "cmCPackLog.h" #include "cmCPackLog.h"
#include "cmSystemTools.h" #include "cmSystemTools.h"
cmCPackBundleGenerator::cmCPackBundleGenerator() cmCPackBundleGenerator::cmCPackBundleGenerator() = default;
{
}
cmCPackBundleGenerator::~cmCPackBundleGenerator() cmCPackBundleGenerator::~cmCPackBundleGenerator() = default;
{
}
int cmCPackBundleGenerator::InitializeInternal() int cmCPackBundleGenerator::InitializeInternal()
{ {
......
...@@ -432,13 +432,9 @@ bool DebGenerator::generateDeb() const ...@@ -432,13 +432,9 @@ bool DebGenerator::generateDeb() const
} // end anonymous namespace } // end anonymous namespace
cmCPackDebGenerator::cmCPackDebGenerator() cmCPackDebGenerator::cmCPackDebGenerator() = default;
{
}
cmCPackDebGenerator::~cmCPackDebGenerator() cmCPackDebGenerator::~cmCPackDebGenerator() = default;
{
}
int cmCPackDebGenerator::InitializeInternal() int cmCPackDebGenerator::InitializeInternal()
{ {
......
...@@ -62,9 +62,7 @@ cmCPackDragNDropGenerator::cmCPackDragNDropGenerator() ...@@ -62,9 +62,7 @@ cmCPackDragNDropGenerator::cmCPackDragNDropGenerator()
this->componentPackageMethod = ONE_PACKAGE; this->componentPackageMethod = ONE_PACKAGE;
} }
cmCPackDragNDropGenerator::~cmCPackDragNDropGenerator() cmCPackDragNDropGenerator::~cmCPackDragNDropGenerator() = default;
{
}
int cmCPackDragNDropGenerator::InitializeInternal() int cmCPackDragNDropGenerator::InitializeInternal()
{ {
......
...@@ -31,9 +31,7 @@ int cmCPackFreeBSDGenerator::InitializeInternal() ...@@ -31,9 +31,7 @@ int cmCPackFreeBSDGenerator::InitializeInternal()
return this->Superclass::InitializeInternal(); return this->Superclass::InitializeInternal();
} }
cmCPackFreeBSDGenerator::~cmCPackFreeBSDGenerator() cmCPackFreeBSDGenerator::~cmCPackFreeBSDGenerator() = default;
{
}
// This is a wrapper, for use only in stream-based output, // This is a wrapper, for use only in stream-based output,
// that will output a string in UCL escaped fashion (in particular, // that will output a string in UCL escaped fashion (in particular,
...@@ -103,7 +101,7 @@ public: ...@@ -103,7 +101,7 @@ public:
{ {
} }
virtual ~ManifestKey() {} virtual ~ManifestKey() = default;
// Output the value associated with this key to the stream @p s. // Output the value associated with this key to the stream @p s.
// Format is to be decided by subclasses. // Format is to be decided by subclasses.
......
...@@ -30,9 +30,7 @@ cmCPackNSISGenerator::cmCPackNSISGenerator(bool nsis64) ...@@ -30,9 +30,7 @@ cmCPackNSISGenerator::cmCPackNSISGenerator(bool nsis64)
Nsis64 = nsis64; Nsis64 = nsis64;
} }
cmCPackNSISGenerator::~cmCPackNSISGenerator() cmCPackNSISGenerator::~cmCPackNSISGenerator() = default;
{
}
int cmCPackNSISGenerator::PackageFiles() int cmCPackNSISGenerator::PackageFiles()
{ {
......
...@@ -11,13 +11,9 @@ ...@@ -11,13 +11,9 @@
#include "cmSystemTools.h" #include "cmSystemTools.h"
#include "cm_sys_stat.h" #include "cm_sys_stat.h"
cmCPackOSXX11Generator::cmCPackOSXX11Generator() cmCPackOSXX11Generator::cmCPackOSXX11Generator() = default;
{
}
cmCPackOSXX11Generator::~cmCPackOSXX11Generator() cmCPackOSXX11Generator::~cmCPackOSXX11Generator() = default;
{
}
int cmCPackOSXX11Generator::PackageFiles() int cmCPackOSXX11Generator::PackageFiles()
{ {
......
...@@ -15,9 +15,7 @@ cmCPackPKGGenerator::cmCPackPKGGenerator() ...@@ -15,9 +15,7 @@ cmCPackPKGGenerator::cmCPackPKGGenerator()
this->componentPackageMethod = ONE_PACKAGE; this->componentPackageMethod = ONE_PACKAGE;
} }
cmCPackPKGGenerator::~cmCPackPKGGenerator() cmCPackPKGGenerator::~cmCPackPKGGenerator() = default;
{
}
bool cmCPackPKGGenerator::SupportsComponentInstallation() const bool cmCPackPKGGenerator::SupportsComponentInstallation() const
{ {
......
...@@ -30,9 +30,7 @@ cmCPackPackageMakerGenerator::cmCPackPackageMakerGenerator() ...@@ -30,9 +30,7 @@ cmCPackPackageMakerGenerator::cmCPackPackageMakerGenerator()
this->PackageCompatibilityVersion = getVersion(10, 4); this->PackageCompatibilityVersion = getVersion(10, 4);
} }
cmCPackPackageMakerGenerator::~cmCPackPackageMakerGenerator() cmCPackPackageMakerGenerator::~cmCPackPackageMakerGenerator() = default;
{
}
bool cmCPackPackageMakerGenerator::SupportsComponentInstallation() const bool cmCPackPackageMakerGenerator::SupportsComponentInstallation() const
{ {
......
...@@ -17,9 +17,7 @@ cmCPackProductBuildGenerator::cmCPackProductBuildGenerator() ...@@ -17,9 +17,7 @@ cmCPackProductBuildGenerator::cmCPackProductBuildGenerator()
this->componentPackageMethod = ONE_PACKAGE; this->componentPackageMethod = ONE_PACKAGE;
} }
cmCPackProductBuildGenerator::~cmCPackProductBuildGenerator() cmCPackProductBuildGenerator::~cmCPackProductBuildGenerator() = default;
{
}
int cmCPackProductBuildGenerator::PackageFiles() int cmCPackProductBuildGenerator::PackageFiles()
{ {
......
...@@ -14,13 +14,9 @@ ...@@ -14,13 +14,9 @@
#include "cmCPackLog.h" #include "cmCPackLog.h"
#include "cmSystemTools.h" #include "cmSystemTools.h"
cmCPackRPMGenerator::cmCPackRPMGenerator() cmCPackRPMGenerator::cmCPackRPMGenerator() = default;
{
}
cmCPackRPMGenerator::~cmCPackRPMGenerator() cmCPackRPMGenerator::~cmCPackRPMGenerator() = default;
{
}
int cmCPackRPMGenerator::InitializeInternal() int cmCPackRPMGenerator::InitializeInternal()
{ {
......
...@@ -13,13 +13,9 @@ ...@@ -13,13 +13,9 @@
#include "cmSystemTools.h" #include "cmSystemTools.h"
#include "cm_sys_stat.h" #include "cm_sys_stat.h"
cmCPackSTGZGenerator::cmCPackSTGZGenerator() cmCPackSTGZGenerator::cmCPackSTGZGenerator() = default;
{
}
cmCPackSTGZGenerator::~cmCPackSTGZGenerator() cmCPackSTGZGenerator::~cmCPackSTGZGenerator() = default;
{
}
int cmCPackSTGZGenerator::InitializeInternal() int cmCPackSTGZGenerator::InitializeInternal()
{ {
......
...@@ -10,6 +10,4 @@ cmCPackTGZGenerator::cmCPackTGZGenerator() ...@@ -10,6 +10,4 @@ cmCPackTGZGenerator::cmCPackTGZGenerator()
{ {
} }
cmCPackTGZGenerator::~cmCPackTGZGenerator() cmCPackTGZGenerator::~cmCPackTGZGenerator() = default;
{
}
...@@ -10,6 +10,4 @@ cmCPackTXZGenerator::cmCPackTXZGenerator() ...@@ -10,6 +10,4 @@ cmCPackTXZGenerator::cmCPackTXZGenerator()
{ {
} }
cmCPackTXZGenerator::~cmCPackTXZGenerator() cmCPackTXZGenerator::~cmCPackTXZGenerator() = default;
{
}
...@@ -10,6 +10,4 @@ cmCPackTarBZip2Generator::cmCPackTarBZip2Generator() ...@@ -10,6 +10,4 @@ cmCPackTarBZip2Generator::cmCPackTarBZip2Generator()
{ {
} }
cmCPackTarBZip2Generator::~cmCPackTarBZip2Generator() cmCPackTarBZip2Generator::~cmCPackTarBZip2Generator() = default;
{
}
...@@ -10,6 +10,4 @@ cmCPackTarCompressGenerator::cmCPackTarCompressGenerator() ...@@ -10,6 +10,4 @@ cmCPackTarCompressGenerator::cmCPackTarCompressGenerator()
{ {
} }
cmCPackTarCompressGenerator::~cmCPackTarCompressGenerator() cmCPackTarCompressGenerator::~cmCPackTarCompressGenerator() = default;
{
}
...@@ -10,6 +10,4 @@ cmCPackZIPGenerator::cmCPackZIPGenerator() ...@@ -10,6 +10,4 @@ cmCPackZIPGenerator::cmCPackZIPGenerator()
{ {
} }
cmCPackZIPGenerator::~cmCPackZIPGenerator() cmCPackZIPGenerator::~cmCPackZIPGenerator() = default;
{
}
...@@ -77,9 +77,7 @@ cmCTestBZR::cmCTestBZR(cmCTest* ct, std::ostream& log) ...@@ -77,9 +77,7 @@ cmCTestBZR::cmCTestBZR(cmCTest* ct, std::ostream& log)
cmSystemTools::PutEnv("BZR_PROGRESS_BAR=none"); cmSystemTools::PutEnv("BZR_PROGRESS_BAR=none");
} }
cmCTestBZR::~cmCTestBZR() cmCTestBZR::~cmCTestBZR() = default;
{
}
class cmCTestBZR::InfoParser : public cmCTestVC::LineParser class cmCTestBZR::InfoParser : public cmCTestVC::LineParser
{ {
......
...@@ -507,7 +507,7 @@ public: ...@@ -507,7 +507,7 @@ public:
: FTC(ftc) : FTC(ftc)
{ {
} }
FragmentCompare() {} FragmentCompare() = default;
bool operator()(std::string const& l, std::string const& r) const bool operator()(std::string const& l, std::string const& r) const
{ {
// Order files by modification time. Use lexicographic order // Order files by modification time. Use lexicographic order
......
...@@ -16,9 +16,7 @@ cmCTestCVS::cmCTestCVS(cmCTest* ct, std::ostream& log) ...@@ -16,9 +16,7 @@ cmCTestCVS::cmCTestCVS(cmCTest* ct, std::ostream& log)
{ {
} }
cmCTestCVS::~cmCTestCVS() cmCTestCVS::~cmCTestCVS() = default;
{
}
class cmCTestCVS::UpdateParser : public cmCTestVC::LineParser class cmCTestCVS::UpdateParser : public cmCTestVC::LineParser
{ {
......
...@@ -11,9 +11,7 @@ ...@@ -11,9 +11,7 @@
#include <ostream> #include <ostream>
#include <string> #include <string>
cmCTestConfigureHandler::cmCTestConfigureHandler() cmCTestConfigureHandler::cmCTestConfigureHandler() = default;
{
}
void cmCTestConfigureHandler::Initialize() void cmCTestConfigureHandler::Initialize()
{ {
......
...@@ -112,9 +112,7 @@ private: ...@@ -112,9 +112,7 @@ private:
cmDuration TimeOut; cmDuration TimeOut;
}; };
cmCTestCoverageHandler::cmCTestCoverageHandler() cmCTestCoverageHandler::cmCTestCoverageHandler() = default;
{
}
void cmCTestCoverageHandler::Initialize() void cmCTestCoverageHandler::Initialize()
{ {
......
...@@ -31,9 +31,7 @@ cmCTestGIT::cmCTestGIT(cmCTest* ct, std::ostream& log) ...@@ -31,9 +31,7 @@ cmCTestGIT::cmCTestGIT(cmCTest* ct, std::ostream& log)
this->CurrentGitVersion = 0; this->CurrentGitVersion = 0;
} }
cmCTestGIT::~cmCTestGIT() cmCTestGIT::~cmCTestGIT() = default;
{
}
class cmCTestGIT::OneLineParser : public cmCTestVC::LineParser class cmCTestGIT::OneLineParser : public cmCTestVC::LineParser
{ {
...@@ -477,7 +475,7 @@ private: ...@@ -477,7 +475,7 @@ private:
std::string EMail; std::string EMail;
unsigned long Time = 0; unsigned long Time = 0;
long TimeZone = 0; long TimeZone = 0;
Person() {} Person() = default;
}; };
void ParsePerson(const char* str, Person& person) void ParsePerson(const char* str, Person& person)
......
...@@ -18,9 +18,7 @@ cmCTestGenericHandler::cmCTestGenericHandler() ...@@ -18,9 +18,7 @@ cmCTestGenericHandler::cmCTestGenericHandler()
this->TestLoad = 0; this->TestLoad = 0;
} }
cmCTestGenericHandler::~cmCTestGenericHandler() cmCTestGenericHandler::~cmCTestGenericHandler() = default;
{
}
void cmCTestGenericHandler::SetOption(const std::string& op, const char* value) void cmCTestGenericHandler::SetOption(const std::string& op, const char* value)
{ {
......
...@@ -15,9 +15,7 @@ cmCTestGlobalVC::cmCTestGlobalVC(cmCTest* ct, std::ostream& log) ...@@ -15,9 +15,7 @@ cmCTestGlobalVC::cmCTestGlobalVC(cmCTest* ct, std::ostream& log)
this->PriorRev = this->Unknown; this->PriorRev = this->Unknown;
} }
cmCTestGlobalVC::~cmCTestGlobalVC() cmCTestGlobalVC::~cmCTestGlobalVC() = default;
{
}
const char* cmCTestGlobalVC::LocalPath(std::string const& path) const char* cmCTestGlobalVC::LocalPath(std::string const& path)
{ {
......
...@@ -18,9 +18,7 @@ cmCTestHG::cmCTestHG(cmCTest* ct, std::ostream& log) ...@@ -18,9 +18,7 @@ cmCTestHG::cmCTestHG(cmCTest* ct, std::ostream& log)
this->PriorRev = this->Unknown; this->PriorRev = this->Unknown;
} }
cmCTestHG::~cmCTestHG() cmCTestHG::~cmCTestHG() = default;
{
}
class cmCTestHG::IdentifyParser : public cmCTestVC::LineParser class cmCTestHG::IdentifyParser : public cmCTestVC::LineParser
{ {
......
...@@ -44,7 +44,7 @@ public: ...@@ -44,7 +44,7 @@ public:
: Handler(handler) : Handler(handler)
{ {
} }
~TestComparator() {} ~TestComparator() = default;
// Sorts tests in descending order of cost // Sorts tests in descending order of cost
bool operator()(int index1, int index2) const bool operator()(int index1, int index2) const
...@@ -70,9 +70,7 @@ cmCTestMultiProcessHandler::cmCTestMultiProcessHandler() ...@@ -70,9 +70,7 @@ cmCTestMultiProcessHandler::cmCTestMultiProcessHandler()
this->SerialTestRunning = false; this->SerialTestRunning = false;
} }
cmCTestMultiProcessHandler::~cmCTestMultiProcessHandler() cmCTestMultiProcessHandler::~cmCTestMultiProcessHandler() = default;
{
}
// Set the tests // Set the tests
void cmCTestMultiProcessHandler::SetTests(TestMap& tests, void cmCTestMultiProcessHandler::SetTests(TestMap& tests,
......
...@@ -19,9 +19,7 @@ cmCTestP4::cmCTestP4(cmCTest* ct, std::ostream& log) ...@@ -19,9 +19,7 @@ cmCTestP4::cmCTestP4(cmCTest* ct, std::ostream& log)
this->PriorRev = this->Unknown; this->PriorRev = this->Unknown;
} }
cmCTestP4::~cmCTestP4() cmCTestP4::~cmCTestP4() = default;
{
}
class cmCTestP4::IdentifyParser : public cmCTestVC::LineParser class cmCTestP4::IdentifyParser : public cmCTestVC::LineParser
{ {
......
...@@ -26,9 +26,7 @@ cmCTestSVN::cmCTestSVN(cmCTest* ct, std::ostream& log) ...@@ -26,9 +26,7 @@ cmCTestSVN::cmCTestSVN(cmCTest* ct, std::ostream& log)
this->PriorRev = this->Unknown; this->PriorRev = this->Unknown;
} }
cmCTestSVN::~cmCTestSVN() cmCTestSVN::~cmCTestSVN() = default;
{
}
void cmCTestSVN::CleanupImpl() void cmCTestSVN::CleanupImpl()
{ {
......
...@@ -53,8 +53,8 @@ struct cmListFileFunction; ...@@ -53,8 +53,8 @@ struct cmListFileFunction;
class cmCTestScriptFunctionBlocker : public cmFunctionBlocker class cmCTestScriptFunctionBlocker : public cmFunctionBlocker
{ {
public: public:
cmCTestScriptFunctionBlocker() {} cmCTestScriptFunctionBlocker() = default;
~cmCTestScriptFunctionBlocker() override {} ~cmCTestScriptFunctionBlocker() override = default;
bool IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile& mf, bool IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile& mf,
cmExecutionStatus& /*status*/) override; cmExecutionStatus& /*status*/) override;
// virtual bool ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf); // virtual bool ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf);
......
...@@ -31,7 +31,7 @@ class cmCTestSubmitHandler::ResponseParser : public cmXMLParser ...@@ -31,7 +31,7 @@ class cmCTestSubmitHandler::ResponseParser : public cmXMLParser
{ {
public: public:
ResponseParser() { this->Status = STATUS_OK; } ResponseParser() { this->Status = STATUS_OK; }
~ResponseParser() override {} ~ResponseParser() override = default;
public: public:
enum StatusType enum StatusType
......
...@@ -34,9 +34,7 @@ static const char* cmCTestUpdateHandlerUpdateToString(int type) ...@@ -34,9 +34,7 @@ static const char* cmCTestUpdateHandlerUpdateToString(int type)
return cmCTestUpdateHandlerUpdateStrings[type]; return cmCTestUpdateHandlerUpdateStrings[type];
} }
cmCTestUpdateHandler::cmCTestUpdateHandler() cmCTestUpdateHandler::cmCTestUpdateHandler() = default;
{
}
void cmCTestUpdateHandler::Initialize() void cmCTestUpdateHandler::Initialize()
{ {
......
...@@ -24,9 +24,7 @@ cmCTestVC::cmCTestVC(cmCTest* ct, std::ostream& log) ...@@ -24,9 +24,7 @@ cmCTestVC::cmCTestVC(cmCTest* ct, std::ostream& log)
this->Unknown.Rev = "Unknown"; this->Unknown.Rev = "Unknown";
} }
cmCTestVC::~cmCTestVC() cmCTestVC::~cmCTestVC() = default;
{
}
void cmCTestVC::SetCommandLineTool(std::string const& tool) void cmCTestVC::SetCommandLineTool(std::string const& tool)
{ {
......
...@@ -20,7 +20,7 @@ public: ...@@ -20,7 +20,7 @@ public:
{ {
} }
virtual ~JSONParser() {} virtual ~JSONParser() = default;
std::string getValue(std::string const& line, int type) std::string getValue(std::string const& line, int type)
{ {
......
...@@ -24,7 +24,7 @@ public: ...@@ -24,7 +24,7 @@ public:
this->CurFileName.clear(); this->CurFileName.clear();
} }
~XMLParser() override {} ~XMLParser() override = default;
protected: protected:
void EndElement(const std::string& name)