summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAngel Garcia Gomez <angelgarcia@google.com>2015-10-20 12:56:27 +0000
committerAngel Garcia Gomez <angelgarcia@google.com>2015-10-20 12:56:27 +0000
commitdec2fa63a95c13b6177006fed249d0bddc98473e (patch)
tree2c749a8a7c49c9ff70c0053c7033a9f333ab3924
parented971c0759e8a5145b699e12ca24dfad79a5e19a (diff)
Apply modernize-use-default to clang-tools-extra.
Summary: Replace empty bodies of default constructors and destructors with '= default'. Reviewers: klimek Subscribers: alexfh, cfe-commits Differential Revision: http://reviews.llvm.org/D13889 git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@250824 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--clang-modernize/Core/IncludeDirectives.cpp2
-rw-r--r--clang-modernize/Core/Transform.cpp4
-rw-r--r--clang-query/Query.cpp2
-rw-r--r--clang-tidy/ClangTidyModule.h2
-rw-r--r--clang-tidy/ClangTidyOptions.h2
-rw-r--r--clang-tidy/utils/IncludeInserter.cpp2
-rw-r--r--modularize/CoverageChecker.cpp2
-rw-r--r--modularize/PreprocessorTracker.cpp6
-rw-r--r--pp-trace/PPCallbacksTracker.cpp2
-rw-r--r--unittests/clang-tidy/IncludeInserterTest.cpp2
10 files changed, 13 insertions, 13 deletions
diff --git a/clang-modernize/Core/IncludeDirectives.cpp b/clang-modernize/Core/IncludeDirectives.cpp
index 3ceb604b..1ca9d4fb 100644
--- a/clang-modernize/Core/IncludeDirectives.cpp
+++ b/clang-modernize/Core/IncludeDirectives.cpp
@@ -60,7 +60,7 @@ class IncludeDirectivesPPCallback : public clang::PPCallbacks {
public:
IncludeDirectivesPPCallback(IncludeDirectives *Self)
: Self(Self), Guard(nullptr) {}
- ~IncludeDirectivesPPCallback() override {}
+ ~IncludeDirectivesPPCallback() override = default;
private:
void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok,
diff --git a/clang-modernize/Core/Transform.cpp b/clang-modernize/Core/Transform.cpp
index baae3329..9e58b7a0 100644
--- a/clang-modernize/Core/Transform.cpp
+++ b/clang-modernize/Core/Transform.cpp
@@ -82,7 +82,7 @@ Transform::Transform(llvm::StringRef Name, const TransformOptions &Options)
Reset();
}
-Transform::~Transform() {}
+Transform::~Transform() = default;
bool Transform::isFileModifiable(const SourceManager &SM,
SourceLocation Loc) const {
@@ -150,7 +150,7 @@ Version Version::getFromString(llvm::StringRef VersionStr) {
return V;
}
-TransformFactory::~TransformFactory() {}
+TransformFactory::~TransformFactory() = default;
namespace {
bool versionSupported(Version Required, Version AvailableSince) {
diff --git a/clang-query/Query.cpp b/clang-query/Query.cpp
index 74eb6ea4..594c7429 100644
--- a/clang-query/Query.cpp
+++ b/clang-query/Query.cpp
@@ -20,7 +20,7 @@ using namespace clang::ast_matchers::dynamic;
namespace clang {
namespace query {
-Query::~Query() {}
+Query::~Query() = default;
bool InvalidQuery::run(llvm::raw_ostream &OS, QuerySession &QS) const {
OS << ErrStr << "\n";
diff --git a/clang-tidy/ClangTidyModule.h b/clang-tidy/ClangTidyModule.h
index 58e833c0..ac478f77 100644
--- a/clang-tidy/ClangTidyModule.h
+++ b/clang-tidy/ClangTidyModule.h
@@ -82,7 +82,7 @@ private:
/// them a prefixed name.
class ClangTidyModule {
public:
- virtual ~ClangTidyModule() {}
+ virtual ~ClangTidyModule() = default;
/// \brief Implement this function in order to register all \c CheckFactories
/// belonging to this module.
diff --git a/clang-tidy/ClangTidyOptions.h b/clang-tidy/ClangTidyOptions.h
index a92a405e..c92660cf 100644
--- a/clang-tidy/ClangTidyOptions.h
+++ b/clang-tidy/ClangTidyOptions.h
@@ -88,7 +88,7 @@ struct ClangTidyOptions {
/// \brief Abstract interface for retrieving various ClangTidy options.
class ClangTidyOptionsProvider {
public:
- virtual ~ClangTidyOptionsProvider() {}
+ virtual ~ClangTidyOptionsProvider() = default;
/// \brief Returns global options, which are independent of the file.
virtual const ClangTidyGlobalOptions &getGlobalOptions() = 0;
diff --git a/clang-tidy/utils/IncludeInserter.cpp b/clang-tidy/utils/IncludeInserter.cpp
index 8f4bee6a..f093aa97 100644
--- a/clang-tidy/utils/IncludeInserter.cpp
+++ b/clang-tidy/utils/IncludeInserter.cpp
@@ -38,7 +38,7 @@ IncludeInserter::IncludeInserter(const SourceManager &SourceMgr,
IncludeSorter::IncludeStyle Style)
: SourceMgr(SourceMgr), LangOpts(LangOpts), Style(Style) {}
-IncludeInserter::~IncludeInserter() {}
+IncludeInserter::~IncludeInserter() = default;
std::unique_ptr<PPCallbacks> IncludeInserter::CreatePPCallbacks() {
return llvm::make_unique<IncludeInserterCallback>(this);
diff --git a/modularize/CoverageChecker.cpp b/modularize/CoverageChecker.cpp
index b3c4227b..a0a979e5 100644
--- a/modularize/CoverageChecker.cpp
+++ b/modularize/CoverageChecker.cpp
@@ -83,7 +83,7 @@ namespace sys = llvm::sys;
class CoverageCheckerCallbacks : public PPCallbacks {
public:
CoverageCheckerCallbacks(CoverageChecker &Checker) : Checker(Checker) {}
- ~CoverageCheckerCallbacks() override {}
+ ~CoverageCheckerCallbacks() override = default;
// Include directive callback.
void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok,
diff --git a/modularize/PreprocessorTracker.cpp b/modularize/PreprocessorTracker.cpp
index 551bb3ce..d7640480 100644
--- a/modularize/PreprocessorTracker.cpp
+++ b/modularize/PreprocessorTracker.cpp
@@ -746,7 +746,7 @@ public:
PreprocessorCallbacks(PreprocessorTrackerImpl &ppTracker,
clang::Preprocessor &PP, llvm::StringRef rootHeaderFile)
: PPTracker(ppTracker), PP(PP), RootHeaderFile(rootHeaderFile) {}
- ~PreprocessorCallbacks() override {}
+ ~PreprocessorCallbacks() override = default;
// Overridden handlers.
void InclusionDirective(clang::SourceLocation HashLoc,
@@ -812,7 +812,7 @@ public:
}
}
- ~PreprocessorTrackerImpl() override {}
+ ~PreprocessorTrackerImpl() override = default;
// Handle entering a preprocessing session.
void handlePreprocessorEntry(clang::Preprocessor &PP,
@@ -1288,7 +1288,7 @@ private:
// PreprocessorTracker functions.
// PreprocessorTracker desctructor.
-PreprocessorTracker::~PreprocessorTracker() {}
+PreprocessorTracker::~PreprocessorTracker() = default;
// Create instance of PreprocessorTracker.
PreprocessorTracker *PreprocessorTracker::create(
diff --git a/pp-trace/PPCallbacksTracker.cpp b/pp-trace/PPCallbacksTracker.cpp
index e0d23dd8..caa819ee 100644
--- a/pp-trace/PPCallbacksTracker.cpp
+++ b/pp-trace/PPCallbacksTracker.cpp
@@ -96,7 +96,7 @@ PPCallbacksTracker::PPCallbacksTracker(llvm::SmallSet<std::string, 4> &Ignore,
clang::Preprocessor &PP)
: CallbackCalls(CallbackCalls), Ignore(Ignore), PP(PP) {}
-PPCallbacksTracker::~PPCallbacksTracker() {}
+PPCallbacksTracker::~PPCallbacksTracker() = default;
// Callback functions.
diff --git a/unittests/clang-tidy/IncludeInserterTest.cpp b/unittests/clang-tidy/IncludeInserterTest.cpp
index bad80435..2a5196b7 100644
--- a/unittests/clang-tidy/IncludeInserterTest.cpp
+++ b/unittests/clang-tidy/IncludeInserterTest.cpp
@@ -98,7 +98,7 @@ class CXXSystemIncludeInserterCheck : public IncludeInserterCheckBase {
public:
CXXSystemIncludeInserterCheck(StringRef CheckName, ClangTidyContext *Context)
: IncludeInserterCheckBase(CheckName, Context) {}
- virtual ~CXXSystemIncludeInserterCheck() {}
+ virtual ~CXXSystemIncludeInserterCheck() = default;
std::vector<StringRef> HeadersToInclude() const override { return {"set"}; }
bool IsAngledInclude() const override { return true; }