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-*,\
-modernize-raw-string-literal,\
-modernize-return-braced-init-list,\
-modernize-use-auto,\
-modernize-use-equals-default,\
-modernize-use-equals-delete,\
-modernize-use-noexcept,\
-modernize-use-transparent-functors,\
......
......@@ -21,9 +21,7 @@ cmCPackIFWGenerator::cmCPackIFWGenerator()
this->Generator = this;
}
cmCPackIFWGenerator::~cmCPackIFWGenerator()
{
}
cmCPackIFWGenerator::~cmCPackIFWGenerator() = default;
int cmCPackIFWGenerator::PackageFiles()
{
......
......@@ -16,9 +16,7 @@
#include <stddef.h>
#include <utility>
cmCPackIFWInstaller::cmCPackIFWInstaller()
{
}
cmCPackIFWInstaller::cmCPackIFWInstaller() = default;
void cmCPackIFWInstaller::printSkippedOptionWarning(
const std::string& optionName, const std::string& optionValue)
......
......@@ -24,9 +24,7 @@ cmCPackIFWPackage::CompareStruct::CompareStruct()
}
//------------------------------------------------------- DependenceStruct ---
cmCPackIFWPackage::DependenceStruct::DependenceStruct()
{
}
cmCPackIFWPackage::DependenceStruct::DependenceStruct() = default;
cmCPackIFWPackage::DependenceStruct::DependenceStruct(
const std::string& dependence)
......
......@@ -10,6 +10,4 @@ cmCPack7zGenerator::cmCPack7zGenerator()
{
}
cmCPack7zGenerator::~cmCPack7zGenerator()
{
}
cmCPack7zGenerator::~cmCPack7zGenerator() = default;
......@@ -22,9 +22,7 @@ cmCPackArchiveGenerator::cmCPackArchiveGenerator(cmArchiveWrite::Compress t,
this->ArchiveFormat = format;
}
cmCPackArchiveGenerator::~cmCPackArchiveGenerator()
{
}
cmCPackArchiveGenerator::~cmCPackArchiveGenerator() = default;
std::string cmCPackArchiveGenerator::GetArchiveComponentFileName(
const std::string& component, bool isGroupName)
......
......@@ -8,13 +8,9 @@
#include "cmCPackLog.h"
#include "cmSystemTools.h"
cmCPackBundleGenerator::cmCPackBundleGenerator()
{
}
cmCPackBundleGenerator::cmCPackBundleGenerator() = default;
cmCPackBundleGenerator::~cmCPackBundleGenerator()
{
}
cmCPackBundleGenerator::~cmCPackBundleGenerator() = default;
int cmCPackBundleGenerator::InitializeInternal()
{
......
......@@ -432,13 +432,9 @@ bool DebGenerator::generateDeb() const
} // end anonymous namespace
cmCPackDebGenerator::cmCPackDebGenerator()
{
}
cmCPackDebGenerator::cmCPackDebGenerator() = default;
cmCPackDebGenerator::~cmCPackDebGenerator()
{
}
cmCPackDebGenerator::~cmCPackDebGenerator() = default;
int cmCPackDebGenerator::InitializeInternal()
{
......
......@@ -62,9 +62,7 @@ cmCPackDragNDropGenerator::cmCPackDragNDropGenerator()
this->componentPackageMethod = ONE_PACKAGE;
}
cmCPackDragNDropGenerator::~cmCPackDragNDropGenerator()
{
}
cmCPackDragNDropGenerator::~cmCPackDragNDropGenerator() = default;
int cmCPackDragNDropGenerator::InitializeInternal()
{
......
......@@ -31,9 +31,7 @@ int cmCPackFreeBSDGenerator::InitializeInternal()
return this->Superclass::InitializeInternal();
}
cmCPackFreeBSDGenerator::~cmCPackFreeBSDGenerator()
{
}
cmCPackFreeBSDGenerator::~cmCPackFreeBSDGenerator() = default;
// This is a wrapper, for use only in stream-based output,
// that will output a string in UCL escaped fashion (in particular,
......@@ -103,7 +101,7 @@ public:
{
}
virtual ~ManifestKey() {}
virtual ~ManifestKey() = default;
// Output the value associated with this key to the stream @p s.
// Format is to be decided by subclasses.
......
......@@ -30,9 +30,7 @@ cmCPackNSISGenerator::cmCPackNSISGenerator(bool nsis64)
Nsis64 = nsis64;
}
cmCPackNSISGenerator::~cmCPackNSISGenerator()
{
}
cmCPackNSISGenerator::~cmCPackNSISGenerator() = default;
int cmCPackNSISGenerator::PackageFiles()
{
......
......@@ -11,13 +11,9 @@
#include "cmSystemTools.h"
#include "cm_sys_stat.h"
cmCPackOSXX11Generator::cmCPackOSXX11Generator()
{
}
cmCPackOSXX11Generator::cmCPackOSXX11Generator() = default;
cmCPackOSXX11Generator::~cmCPackOSXX11Generator()
{
}
cmCPackOSXX11Generator::~cmCPackOSXX11Generator() = default;
int cmCPackOSXX11Generator::PackageFiles()
{
......
......@@ -15,9 +15,7 @@ cmCPackPKGGenerator::cmCPackPKGGenerator()
this->componentPackageMethod = ONE_PACKAGE;
}
cmCPackPKGGenerator::~cmCPackPKGGenerator()
{
}
cmCPackPKGGenerator::~cmCPackPKGGenerator() = default;
bool cmCPackPKGGenerator::SupportsComponentInstallation() const
{
......
......@@ -30,9 +30,7 @@ cmCPackPackageMakerGenerator::cmCPackPackageMakerGenerator()
this->PackageCompatibilityVersion = getVersion(10, 4);
}
cmCPackPackageMakerGenerator::~cmCPackPackageMakerGenerator()
{
}
cmCPackPackageMakerGenerator::~cmCPackPackageMakerGenerator() = default;
bool cmCPackPackageMakerGenerator::SupportsComponentInstallation() const
{
......
......@@ -17,9 +17,7 @@ cmCPackProductBuildGenerator::cmCPackProductBuildGenerator()
this->componentPackageMethod = ONE_PACKAGE;
}
cmCPackProductBuildGenerator::~cmCPackProductBuildGenerator()
{
}
cmCPackProductBuildGenerator::~cmCPackProductBuildGenerator() = default;
int cmCPackProductBuildGenerator::PackageFiles()
{
......
......@@ -14,13 +14,9 @@
#include "cmCPackLog.h"
#include "cmSystemTools.h"
cmCPackRPMGenerator::cmCPackRPMGenerator()
{
}
cmCPackRPMGenerator::cmCPackRPMGenerator() = default;
cmCPackRPMGenerator::~cmCPackRPMGenerator()
{
}
cmCPackRPMGenerator::~cmCPackRPMGenerator() = default;
int cmCPackRPMGenerator::InitializeInternal()
{
......
......@@ -13,13 +13,9 @@
#include "cmSystemTools.h"
#include "cm_sys_stat.h"
cmCPackSTGZGenerator::cmCPackSTGZGenerator()
{
}
cmCPackSTGZGenerator::cmCPackSTGZGenerator() = default;
cmCPackSTGZGenerator::~cmCPackSTGZGenerator()
{
}
cmCPackSTGZGenerator::~cmCPackSTGZGenerator() = default;
int cmCPackSTGZGenerator::InitializeInternal()
{
......
......@@ -10,6 +10,4 @@ cmCPackTGZGenerator::cmCPackTGZGenerator()
{
}
cmCPackTGZGenerator::~cmCPackTGZGenerator()
{
}
cmCPackTGZGenerator::~cmCPackTGZGenerator() = default;
......@@ -10,6 +10,4 @@ cmCPackTXZGenerator::cmCPackTXZGenerator()
{
}
cmCPackTXZGenerator::~cmCPackTXZGenerator()
{
}
cmCPackTXZGenerator::~cmCPackTXZGenerator() = default;
......@@ -10,6 +10,4 @@ cmCPackTarBZip2Generator::cmCPackTarBZip2Generator()
{
}
cmCPackTarBZip2Generator::~cmCPackTarBZip2Generator()
{
}
cmCPackTarBZip2Generator::~cmCPackTarBZip2Generator() = default;
......@@ -10,6 +10,4 @@ cmCPackTarCompressGenerator::cmCPackTarCompressGenerator()
{
}
cmCPackTarCompressGenerator::~cmCPackTarCompressGenerator()
{
}
cmCPackTarCompressGenerator::~cmCPackTarCompressGenerator() = default;
......@@ -10,6 +10,4 @@ cmCPackZIPGenerator::cmCPackZIPGenerator()
{
}
cmCPackZIPGenerator::~cmCPackZIPGenerator()
{
}
cmCPackZIPGenerator::~cmCPackZIPGenerator() = default;
......@@ -77,9 +77,7 @@ cmCTestBZR::cmCTestBZR(cmCTest* ct, std::ostream& log)
cmSystemTools::PutEnv("BZR_PROGRESS_BAR=none");
}
cmCTestBZR::~cmCTestBZR()
{
}
cmCTestBZR::~cmCTestBZR() = default;
class cmCTestBZR::InfoParser : public cmCTestVC::LineParser
{
......
......@@ -507,7 +507,7 @@ public:
: FTC(ftc)
{
}
FragmentCompare() {}
FragmentCompare() = default;
bool operator()(std::string const& l, std::string const& r) const
{
// Order files by modification time. Use lexicographic order
......
......@@ -16,9 +16,7 @@ cmCTestCVS::cmCTestCVS(cmCTest* ct, std::ostream& log)
{
}
cmCTestCVS::~cmCTestCVS()
{
}
cmCTestCVS::~cmCTestCVS() = default;
class cmCTestCVS::UpdateParser : public cmCTestVC::LineParser
{
......
......@@ -11,9 +11,7 @@
#include <ostream>
#include <string>
cmCTestConfigureHandler::cmCTestConfigureHandler()
{
}
cmCTestConfigureHandler::cmCTestConfigureHandler() = default;
void cmCTestConfigureHandler::Initialize()
{
......
......@@ -112,9 +112,7 @@ private:
cmDuration TimeOut;
};
cmCTestCoverageHandler::cmCTestCoverageHandler()
{
}
cmCTestCoverageHandler::cmCTestCoverageHandler() = default;
void cmCTestCoverageHandler::Initialize()
{
......
......@@ -31,9 +31,7 @@ cmCTestGIT::cmCTestGIT(cmCTest* ct, std::ostream& log)
this->CurrentGitVersion = 0;
}
cmCTestGIT::~cmCTestGIT()
{
}
cmCTestGIT::~cmCTestGIT() = default;
class cmCTestGIT::OneLineParser : public cmCTestVC::LineParser
{
......@@ -477,7 +475,7 @@ private:
std::string EMail;
unsigned long Time = 0;
long TimeZone = 0;
Person() {}
Person() = default;
};
void ParsePerson(const char* str, Person& person)
......
......@@ -18,9 +18,7 @@ cmCTestGenericHandler::cmCTestGenericHandler()
this->TestLoad = 0;
}
cmCTestGenericHandler::~cmCTestGenericHandler()
{
}
cmCTestGenericHandler::~cmCTestGenericHandler() = default;
void cmCTestGenericHandler::SetOption(const std::string& op, const char* value)
{
......
......@@ -15,9 +15,7 @@ cmCTestGlobalVC::cmCTestGlobalVC(cmCTest* ct, std::ostream& log)
this->PriorRev = this->Unknown;
}
cmCTestGlobalVC::~cmCTestGlobalVC()
{
}
cmCTestGlobalVC::~cmCTestGlobalVC() = default;
const char* cmCTestGlobalVC::LocalPath(std::string const& path)
{
......
......@@ -18,9 +18,7 @@ cmCTestHG::cmCTestHG(cmCTest* ct, std::ostream& log)
this->PriorRev = this->Unknown;
}
cmCTestHG::~cmCTestHG()
{
}
cmCTestHG::~cmCTestHG() = default;
class cmCTestHG::IdentifyParser : public cmCTestVC::LineParser
{
......
......@@ -44,7 +44,7 @@ public:
: Handler(handler)
{
}
~TestComparator() {}
~TestComparator() = default;
// Sorts tests in descending order of cost
bool operator()(int index1, int index2) const
......@@ -70,9 +70,7 @@ cmCTestMultiProcessHandler::cmCTestMultiProcessHandler()
this->SerialTestRunning = false;
}
cmCTestMultiProcessHandler::~cmCTestMultiProcessHandler()
{
}
cmCTestMultiProcessHandler::~cmCTestMultiProcessHandler() = default;
// Set the tests
void cmCTestMultiProcessHandler::SetTests(TestMap& tests,
......
......@@ -19,9 +19,7 @@ cmCTestP4::cmCTestP4(cmCTest* ct, std::ostream& log)
this->PriorRev = this->Unknown;
}
cmCTestP4::~cmCTestP4()
{
}
cmCTestP4::~cmCTestP4() = default;
class cmCTestP4::IdentifyParser : public cmCTestVC::LineParser
{
......
......@@ -26,9 +26,7 @@ cmCTestSVN::cmCTestSVN(cmCTest* ct, std::ostream& log)
this->PriorRev = this->Unknown;
}
cmCTestSVN::~cmCTestSVN()
{
}
cmCTestSVN::~cmCTestSVN() = default;
void cmCTestSVN::CleanupImpl()
{
......
......@@ -53,8 +53,8 @@ struct cmListFileFunction;
class cmCTestScriptFunctionBlocker : public cmFunctionBlocker
{
public:
cmCTestScriptFunctionBlocker() {}
~cmCTestScriptFunctionBlocker() override {}
cmCTestScriptFunctionBlocker() = default;
~cmCTestScriptFunctionBlocker() override = default;
bool IsFunctionBlocked(const cmListFileFunction& lff, cmMakefile& mf,
cmExecutionStatus& /*status*/) override;
// virtual bool ShouldRemove(const cmListFileFunction& lff, cmMakefile &mf);
......
......@@ -31,7 +31,7 @@ class cmCTestSubmitHandler::ResponseParser : public cmXMLParser
{
public:
ResponseParser() { this->Status = STATUS_OK; }
~ResponseParser() override {}
~ResponseParser() override = default;
public:
enum StatusType
......
......@@ -34,9 +34,7 @@ static const char* cmCTestUpdateHandlerUpdateToString(int type)
return cmCTestUpdateHandlerUpdateStrings[type];
}
cmCTestUpdateHandler::cmCTestUpdateHandler()
{
}
cmCTestUpdateHandler::cmCTestUpdateHandler() = default;
void cmCTestUpdateHandler::Initialize()
{
......
......@@ -24,9 +24,7 @@ cmCTestVC::cmCTestVC(cmCTest* ct, std::ostream& log)
this->Unknown.Rev = "Unknown";
}
cmCTestVC::~cmCTestVC()
{
}
cmCTestVC::~cmCTestVC() = default;
void cmCTestVC::SetCommandLineTool(std::string const& tool)
{
......
......@@ -20,7 +20,7 @@ public:
{
}
virtual ~JSONParser() {}
virtual ~JSONParser() = default;
std::string getValue(std::string const& line, int type)
{
......
......@@ -24,7 +24,7 @@ public:
this->CurFileName.clear();
}
~XMLParser() override {}
~XMLParser() override = default;
protected:
void EndElement(const std::string& name) override
......
......@@ -20,7 +20,7 @@ public:
{
}
virtual ~HTMLParser() {}
virtual ~HTMLParser() = default;
bool initializeDelphiFile(
std::string const& filename,
......
......@@ -23,7 +23,7 @@ public:
this->PackageName.clear();
}
~XMLParser() override {}
~XMLParser() override = default;
protected:
void EndElement(const std::string& /*name*/) override {}
......
......@@ -18,9 +18,7 @@ cmParseMumpsCoverage::cmParseMumpsCoverage(
{
}
cmParseMumpsCoverage::~cmParseMumpsCoverage()
{
}
cmParseMumpsCoverage::~cmParseMumpsCoverage() = default;
bool cmParseMumpsCoverage::ReadCoverageFile(const char* file)
{
......
......@@ -69,9 +69,7 @@ cmProcess::cmProcess(cmCTestRunTest& runner)
this->StartTime = std::chrono::steady_clock::time_point();
}
cmProcess::~cmProcess()
{
}
cmProcess::~cmProcess() = default;
void cmProcess::SetCommand(const char* command)
{
......
......@@ -14,9 +14,7 @@ cmCursesLabelWidget::cmCursesLabelWidget(int width, int height, int left,
this->SetValue(name);
}
cmCursesLabelWidget::~cmCursesLabelWidget()
{
}
cmCursesLabelWidget::~cmCursesLabelWidget() = default;
bool cmCursesLabelWidget::HandleInput(int& /*key*/, cmCursesMainForm* /*fm*/,
WINDOW* /*w*/)
......
......@@ -86,9 +86,7 @@ QFrame* StartCompilerSetup::CreatePlatformWidgets()
return frame;
}
StartCompilerSetup::~StartCompilerSetup()
{
}
StartCompilerSetup::~StartCompilerSetup() = default;
void StartCompilerSetup::setGenerators(
std::vector<cmake::GeneratorInfo> const& gens)
......@@ -237,9 +235,7 @@ NativeCompilerSetup::NativeCompilerSetup(QWidget* p)
this->setupUi(c);
}
NativeCompilerSetup::~NativeCompilerSetup()
{
}
NativeCompilerSetup::~NativeCompilerSetup() = default;
QString NativeCompilerSetup::getCCompiler() const
{
......@@ -301,9 +297,7 @@ CrossCompilerSetup::CrossCompilerSetup(QWidget* p)
this->registerField("systemName*", this->systemName);
}
CrossCompilerSetup::~CrossCompilerSetup()
{
}
CrossCompilerSetup::~CrossCompilerSetup() = default;
QString CrossCompilerSetup::getCCompiler() const
{
......@@ -414,9 +408,7 @@ ToolchainCompilerSetup::ToolchainCompilerSetup(QWidget* p)
l->addWidget(this->ToolchainFile);
}
ToolchainCompilerSetup::~ToolchainCompilerSetup()
{
}
ToolchainCompilerSetup::~ToolchainCompilerSetup() = default;
QString ToolchainCompilerSetup::toolchainFile() const
{
......@@ -446,9 +438,7 @@ FirstConfigure::FirstConfigure()
this->setPage(ToolchainSetup, this->mToolchainCompilerSetupPage);
}
FirstConfigure::~FirstConfigure()
{
}
FirstConfigure::~FirstConfigure() = default;
void FirstConfigure::setGenerators(
std::vector<cmake::GeneratorInfo> const& gens)
......
......@@ -186,9 +186,7 @@ QCMakeCacheModel::QCMakeCacheModel(QObject* p)
this->setHorizontalHeaderLabels(labels);
}
QCMakeCacheModel::~QCMakeCacheModel()
{
}
QCMakeCacheModel::~QCMakeCacheModel() = default;
static uint qHash(const QCMakeProperty& p)
{
......
......@@ -34,13 +34,9 @@ void Base32Encode5(const unsigned char src[5], char dst[8])
// -- Class methods
cmBase32Encoder::cmBase32Encoder()
{
}
cmBase32Encoder::cmBase32Encoder() = default;
cmBase32Encoder::~cmBase32Encoder()
{
}
cmBase32Encoder::~cmBase32Encoder() = default;
std::string cmBase32Encoder::encodeString(const unsigned char* input,
size_t len, bool padding)
......
......@@ -474,7 +474,7 @@ int CCONV cmGetTotalArgumentSize(int argc, char** argv)
// API for source files.
struct cmCPluginAPISourceFile
{
cmCPluginAPISourceFile() {}
cmCPluginAPISourceFile() = default;
cmSourceFile* RealSourceFile = nullptr;
std::string SourceName;
std::string SourceExtension;
......
......@@ -57,7 +57,7 @@ public:
/** Representation of one part. */
struct PartInfo
{
PartInfo() {}
PartInfo() = default;
void SetName(const std::string& name) { this->Name = name; }
const std::string& GetName() const { return this->Name; }
......
......@@ -42,7 +42,7 @@ private:
void AppendProperty(const std::string& property, const char* value,
bool asString = false);
bool Initialized = false;
CacheEntry() {}
CacheEntry() = default;
};
public:
......
......@@ -30,12 +30,12 @@ public:
/**
* Construct the command. By default it has no makefile.
*/
cmCommand() {}
cmCommand() = default;
/**
* Need virtual destructor to destroy real command type.
*/
virtual ~cmCommand() {}
virtual ~cmCommand() = default;
/**
* Specify the makefile.
......
......@@ -39,7 +39,7 @@ class cmCommandArgument
public:
cmCommandArgument(cmCommandArgumentsHelper* args, const char* key,
cmCommandArgumentGroup* group = nullptr);
virtual ~cmCommandArgument() {}
virtual ~cmCommandArgument() = default;