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

llvm-svn: 250824
This commit is contained in:
Angel Garcia Gomez 2015-10-20 12:56:27 +00:00
parent ea61047c6f
commit 3ca34bc870
10 changed files with 13 additions and 13 deletions

View File

@ -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,

View File

@ -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) {

View File

@ -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";

View File

@ -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.

View File

@ -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;

View File

@ -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);

View File

@ -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,

View File

@ -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(

View File

@ -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.

View File

@ -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; }