[clang-tools-extra] r250824 - Apply modernize-use-default to clang-tools-extra.
Alexander Kornienko via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 2 12:03:54 PST 2015
On Tue, Oct 20, 2015 at 5:56 AM, Angel Garcia Gomez via cfe-commits <
cfe-commits at lists.llvm.org> wrote:
> Author: angelgarcia
> Date: Tue Oct 20 07:56:27 2015
> New Revision: 250824
>
> URL: http://llvm.org/viewvc/llvm-project?rev=250824&view=rev
> Log:
> 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
>
> Modified:
> clang-tools-extra/trunk/clang-modernize/Core/IncludeDirectives.cpp
> clang-tools-extra/trunk/clang-modernize/Core/Transform.cpp
> clang-tools-extra/trunk/clang-query/Query.cpp
> clang-tools-extra/trunk/clang-tidy/ClangTidyModule.h
> clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.h
> clang-tools-extra/trunk/clang-tidy/utils/IncludeInserter.cpp
> clang-tools-extra/trunk/modularize/CoverageChecker.cpp
> clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp
> clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp
> clang-tools-extra/trunk/unittests/clang-tidy/IncludeInserterTest.cpp
>
> Modified:
> clang-tools-extra/trunk/clang-modernize/Core/IncludeDirectives.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-modernize/Core/IncludeDirectives.cpp?rev=250824&r1=250823&r2=250824&view=diff
>
> ==============================================================================
> --- clang-tools-extra/trunk/clang-modernize/Core/IncludeDirectives.cpp
> (original)
> +++ clang-tools-extra/trunk/clang-modernize/Core/IncludeDirectives.cpp Tue
> Oct 20 07:56:27 2015
> @@ -60,7 +60,7 @@ class IncludeDirectivesPPCallback : publ
> public:
> IncludeDirectivesPPCallback(IncludeDirectives *Self)
> : Self(Self), Guard(nullptr) {}
> - ~IncludeDirectivesPPCallback() override {}
> + ~IncludeDirectivesPPCallback() override = default;
>
> private:
> void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok,
>
> Modified: clang-tools-extra/trunk/clang-modernize/Core/Transform.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-modernize/Core/Transform.cpp?rev=250824&r1=250823&r2=250824&view=diff
>
> ==============================================================================
> --- clang-tools-extra/trunk/clang-modernize/Core/Transform.cpp (original)
> +++ clang-tools-extra/trunk/clang-modernize/Core/Transform.cpp Tue Oct 20
> 07:56:27 2015
> @@ -82,7 +82,7 @@ Transform::Transform(llvm::StringRef Nam
> Reset();
> }
>
> -Transform::~Transform() {}
> +Transform::~Transform() = default;
>
> bool Transform::isFileModifiable(const SourceManager &SM,
> SourceLocation Loc) const {
> @@ -150,7 +150,7 @@ Version Version::getFromString(llvm::Str
> return V;
> }
>
> -TransformFactory::~TransformFactory() {}
> +TransformFactory::~TransformFactory() = default;
>
> namespace {
> bool versionSupported(Version Required, Version AvailableSince) {
>
> Modified: clang-tools-extra/trunk/clang-query/Query.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-query/Query.cpp?rev=250824&r1=250823&r2=250824&view=diff
>
> ==============================================================================
> --- clang-tools-extra/trunk/clang-query/Query.cpp (original)
> +++ clang-tools-extra/trunk/clang-query/Query.cpp Tue Oct 20 07:56:27 2015
> @@ -20,7 +20,7 @@ using namespace clang::ast_matchers::dyn
> namespace clang {
> namespace query {
>
> -Query::~Query() {}
> +Query::~Query() = default;
>
> bool InvalidQuery::run(llvm::raw_ostream &OS, QuerySession &QS) const {
> OS << ErrStr << "\n";
>
> Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyModule.h
> URL:
> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidyModule.h?rev=250824&r1=250823&r2=250824&view=diff
>
> ==============================================================================
> --- clang-tools-extra/trunk/clang-tidy/ClangTidyModule.h (original)
> +++ clang-tools-extra/trunk/clang-tidy/ClangTidyModule.h Tue Oct 20
> 07:56:27 2015
> @@ -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.
>
> Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.h
> URL:
> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.h?rev=250824&r1=250823&r2=250824&view=diff
>
> ==============================================================================
> --- clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.h (original)
> +++ clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.h Tue Oct 20
> 07:56:27 2015
> @@ -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;
>
> Modified: clang-tools-extra/trunk/clang-tidy/utils/IncludeInserter.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/utils/IncludeInserter.cpp?rev=250824&r1=250823&r2=250824&view=diff
>
> ==============================================================================
> --- clang-tools-extra/trunk/clang-tidy/utils/IncludeInserter.cpp (original)
> +++ clang-tools-extra/trunk/clang-tidy/utils/IncludeInserter.cpp Tue Oct
> 20 07:56:27 2015
> @@ -38,7 +38,7 @@ IncludeInserter::IncludeInserter(const S
> 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);
>
> Modified: clang-tools-extra/trunk/modularize/CoverageChecker.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/CoverageChecker.cpp?rev=250824&r1=250823&r2=250824&view=diff
>
> ==============================================================================
> --- clang-tools-extra/trunk/modularize/CoverageChecker.cpp (original)
> +++ clang-tools-extra/trunk/modularize/CoverageChecker.cpp Tue Oct 20
> 07:56:27 2015
> @@ -83,7 +83,7 @@ namespace sys = llvm::sys;
> class CoverageCheckerCallbacks : public PPCallbacks {
> public:
> CoverageCheckerCallbacks(CoverageChecker &Checker) : Checker(Checker) {}
> - ~CoverageCheckerCallbacks() override {}
> + ~CoverageCheckerCallbacks() override = default;
>
I wonder whether the check has to delete all the inline overridden
destructors with an empty body.
>
> // Include directive callback.
> void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok,
>
> Modified: clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp?rev=250824&r1=250823&r2=250824&view=diff
>
> ==============================================================================
> --- clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp (original)
> +++ clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp Tue Oct 20
> 07:56:27 2015
> @@ -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(
>
> Modified: clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp?rev=250824&r1=250823&r2=250824&view=diff
>
> ==============================================================================
> --- clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp (original)
> +++ clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp Tue Oct 20
> 07:56:27 2015
> @@ -96,7 +96,7 @@ PPCallbacksTracker::PPCallbacksTracker(l
> clang::Preprocessor &PP)
> : CallbackCalls(CallbackCalls), Ignore(Ignore), PP(PP) {}
>
> -PPCallbacksTracker::~PPCallbacksTracker() {}
> +PPCallbacksTracker::~PPCallbacksTracker() = default;
>
> // Callback functions.
>
>
> Modified:
> clang-tools-extra/trunk/unittests/clang-tidy/IncludeInserterTest.cpp
> URL:
> http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clang-tidy/IncludeInserterTest.cpp?rev=250824&r1=250823&r2=250824&view=diff
>
> ==============================================================================
> --- clang-tools-extra/trunk/unittests/clang-tidy/IncludeInserterTest.cpp
> (original)
> +++ clang-tools-extra/trunk/unittests/clang-tidy/IncludeInserterTest.cpp
> Tue Oct 20 07:56:27 2015
> @@ -98,7 +98,7 @@ class CXXSystemIncludeInserterCheck : pu
> 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; }
>
>
> _______________________________________________
> cfe-commits mailing list
> cfe-commits at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20151102/23ef9929/attachment-0001.html>
More information about the cfe-commits
mailing list