<div dir="ltr"><br><div class="gmail_extra"><br><div class="gmail_quote">On Tue, Oct 20, 2015 at 5:56 AM, Angel Garcia Gomez via cfe-commits <span dir="ltr"><<a href="mailto:cfe-commits@lists.llvm.org" target="_blank">cfe-commits@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Author: angelgarcia<br>
Date: Tue Oct 20 07:56:27 2015<br>
New Revision: 250824<br>
<br>
URL: <a href="http://llvm.org/viewvc/llvm-project?rev=250824&view=rev" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project?rev=250824&view=rev</a><br>
Log:<br>
Apply modernize-use-default to clang-tools-extra.<br>
<br>
Summary: Replace empty bodies of default constructors and destructors with '= default'.<br>
<br>
Reviewers: klimek<br>
<br>
Subscribers: alexfh, cfe-commits<br>
<br>
Differential Revision: <a href="http://reviews.llvm.org/D13889" rel="noreferrer" target="_blank">http://reviews.llvm.org/D13889</a><br>
<br>
Modified:<br>
clang-tools-extra/trunk/clang-modernize/Core/IncludeDirectives.cpp<br>
clang-tools-extra/trunk/clang-modernize/Core/Transform.cpp<br>
clang-tools-extra/trunk/clang-query/Query.cpp<br>
clang-tools-extra/trunk/clang-tidy/ClangTidyModule.h<br>
clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.h<br>
clang-tools-extra/trunk/clang-tidy/utils/IncludeInserter.cpp<br>
clang-tools-extra/trunk/modularize/CoverageChecker.cpp<br>
clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp<br>
clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp<br>
clang-tools-extra/trunk/unittests/clang-tidy/IncludeInserterTest.cpp<br>
<br>
Modified: clang-tools-extra/trunk/clang-modernize/Core/IncludeDirectives.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-modernize/Core/IncludeDirectives.cpp?rev=250824&r1=250823&r2=250824&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-modernize/Core/IncludeDirectives.cpp?rev=250824&r1=250823&r2=250824&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/clang-modernize/Core/IncludeDirectives.cpp (original)<br>
+++ clang-tools-extra/trunk/clang-modernize/Core/IncludeDirectives.cpp Tue Oct 20 07:56:27 2015<br>
@@ -60,7 +60,7 @@ class IncludeDirectivesPPCallback : publ<br>
public:<br>
IncludeDirectivesPPCallback(IncludeDirectives *Self)<br>
: Self(Self), Guard(nullptr) {}<br>
- ~IncludeDirectivesPPCallback() override {}<br>
+ ~IncludeDirectivesPPCallback() override = default;<br>
<br>
private:<br>
void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok,<br>
<br>
Modified: clang-tools-extra/trunk/clang-modernize/Core/Transform.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-modernize/Core/Transform.cpp?rev=250824&r1=250823&r2=250824&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-modernize/Core/Transform.cpp?rev=250824&r1=250823&r2=250824&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/clang-modernize/Core/Transform.cpp (original)<br>
+++ clang-tools-extra/trunk/clang-modernize/Core/Transform.cpp Tue Oct 20 07:56:27 2015<br>
@@ -82,7 +82,7 @@ Transform::Transform(llvm::StringRef Nam<br>
Reset();<br>
}<br>
<br>
-Transform::~Transform() {}<br>
+Transform::~Transform() = default;<br>
<br>
bool Transform::isFileModifiable(const SourceManager &SM,<br>
SourceLocation Loc) const {<br>
@@ -150,7 +150,7 @@ Version Version::getFromString(llvm::Str<br>
return V;<br>
}<br>
<br>
-TransformFactory::~TransformFactory() {}<br>
+TransformFactory::~TransformFactory() = default;<br>
<br>
namespace {<br>
bool versionSupported(Version Required, Version AvailableSince) {<br>
<br>
Modified: clang-tools-extra/trunk/clang-query/Query.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-query/Query.cpp?rev=250824&r1=250823&r2=250824&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-query/Query.cpp?rev=250824&r1=250823&r2=250824&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/clang-query/Query.cpp (original)<br>
+++ clang-tools-extra/trunk/clang-query/Query.cpp Tue Oct 20 07:56:27 2015<br>
@@ -20,7 +20,7 @@ using namespace clang::ast_matchers::dyn<br>
namespace clang {<br>
namespace query {<br>
<br>
-Query::~Query() {}<br>
+Query::~Query() = default;<br>
<br>
bool InvalidQuery::run(llvm::raw_ostream &OS, QuerySession &QS) const {<br>
OS << ErrStr << "\n";<br>
<br>
Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyModule.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidyModule.h?rev=250824&r1=250823&r2=250824&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidyModule.h?rev=250824&r1=250823&r2=250824&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/clang-tidy/ClangTidyModule.h (original)<br>
+++ clang-tools-extra/trunk/clang-tidy/ClangTidyModule.h Tue Oct 20 07:56:27 2015<br>
@@ -82,7 +82,7 @@ private:<br>
/// them a prefixed name.<br>
class ClangTidyModule {<br>
public:<br>
- virtual ~ClangTidyModule() {}<br>
+ virtual ~ClangTidyModule() = default;<br>
<br>
/// \brief Implement this function in order to register all \c CheckFactories<br>
/// belonging to this module.<br>
<br>
Modified: clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.h<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.h?rev=250824&r1=250823&r2=250824&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.h?rev=250824&r1=250823&r2=250824&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.h (original)<br>
+++ clang-tools-extra/trunk/clang-tidy/ClangTidyOptions.h Tue Oct 20 07:56:27 2015<br>
@@ -88,7 +88,7 @@ struct ClangTidyOptions {<br>
/// \brief Abstract interface for retrieving various ClangTidy options.<br>
class ClangTidyOptionsProvider {<br>
public:<br>
- virtual ~ClangTidyOptionsProvider() {}<br>
+ virtual ~ClangTidyOptionsProvider() = default;<br>
<br>
/// \brief Returns global options, which are independent of the file.<br>
virtual const ClangTidyGlobalOptions &getGlobalOptions() = 0;<br>
<br>
Modified: clang-tools-extra/trunk/clang-tidy/utils/IncludeInserter.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/utils/IncludeInserter.cpp?rev=250824&r1=250823&r2=250824&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/clang-tidy/utils/IncludeInserter.cpp?rev=250824&r1=250823&r2=250824&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/clang-tidy/utils/IncludeInserter.cpp (original)<br>
+++ clang-tools-extra/trunk/clang-tidy/utils/IncludeInserter.cpp Tue Oct 20 07:56:27 2015<br>
@@ -38,7 +38,7 @@ IncludeInserter::IncludeInserter(const S<br>
IncludeSorter::IncludeStyle Style)<br>
: SourceMgr(SourceMgr), LangOpts(LangOpts), Style(Style) {}<br>
<br>
-IncludeInserter::~IncludeInserter() {}<br>
+IncludeInserter::~IncludeInserter() = default;<br>
<br>
std::unique_ptr<PPCallbacks> IncludeInserter::CreatePPCallbacks() {<br>
return llvm::make_unique<IncludeInserterCallback>(this);<br>
<br>
Modified: clang-tools-extra/trunk/modularize/CoverageChecker.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/CoverageChecker.cpp?rev=250824&r1=250823&r2=250824&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/CoverageChecker.cpp?rev=250824&r1=250823&r2=250824&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/modularize/CoverageChecker.cpp (original)<br>
+++ clang-tools-extra/trunk/modularize/CoverageChecker.cpp Tue Oct 20 07:56:27 2015<br>
@@ -83,7 +83,7 @@ namespace sys = llvm::sys;<br>
class CoverageCheckerCallbacks : public PPCallbacks {<br>
public:<br>
CoverageCheckerCallbacks(CoverageChecker &Checker) : Checker(Checker) {}<br>
- ~CoverageCheckerCallbacks() override {}<br>
+ ~CoverageCheckerCallbacks() override = default;<br></blockquote><div><br></div><div>I wonder whether the check has to delete all the inline overridden destructors with an empty body.</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
// Include directive callback.<br>
void InclusionDirective(SourceLocation HashLoc, const Token &IncludeTok,<br>
<br>
Modified: clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp?rev=250824&r1=250823&r2=250824&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp?rev=250824&r1=250823&r2=250824&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp (original)<br>
+++ clang-tools-extra/trunk/modularize/PreprocessorTracker.cpp Tue Oct 20 07:56:27 2015<br>
@@ -746,7 +746,7 @@ public:<br>
PreprocessorCallbacks(PreprocessorTrackerImpl &ppTracker,<br>
clang::Preprocessor &PP, llvm::StringRef rootHeaderFile)<br>
: PPTracker(ppTracker), PP(PP), RootHeaderFile(rootHeaderFile) {}<br>
- ~PreprocessorCallbacks() override {}<br>
+ ~PreprocessorCallbacks() override = default;<br>
<br>
// Overridden handlers.<br>
void InclusionDirective(clang::SourceLocation HashLoc,<br>
@@ -812,7 +812,7 @@ public:<br>
}<br>
}<br>
<br>
- ~PreprocessorTrackerImpl() override {}<br>
+ ~PreprocessorTrackerImpl() override = default;<br>
<br>
// Handle entering a preprocessing session.<br>
void handlePreprocessorEntry(clang::Preprocessor &PP,<br>
@@ -1288,7 +1288,7 @@ private:<br>
// PreprocessorTracker functions.<br>
<br>
// PreprocessorTracker desctructor.<br>
-PreprocessorTracker::~PreprocessorTracker() {}<br>
+PreprocessorTracker::~PreprocessorTracker() = default;<br>
<br>
// Create instance of PreprocessorTracker.<br>
PreprocessorTracker *PreprocessorTracker::create(<br>
<br>
Modified: clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp?rev=250824&r1=250823&r2=250824&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp?rev=250824&r1=250823&r2=250824&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp (original)<br>
+++ clang-tools-extra/trunk/pp-trace/PPCallbacksTracker.cpp Tue Oct 20 07:56:27 2015<br>
@@ -96,7 +96,7 @@ PPCallbacksTracker::PPCallbacksTracker(l<br>
clang::Preprocessor &PP)<br>
: CallbackCalls(CallbackCalls), Ignore(Ignore), PP(PP) {}<br>
<br>
-PPCallbacksTracker::~PPCallbacksTracker() {}<br>
+PPCallbacksTracker::~PPCallbacksTracker() = default;<br>
<br>
// Callback functions.<br>
<br>
<br>
Modified: clang-tools-extra/trunk/unittests/clang-tidy/IncludeInserterTest.cpp<br>
URL: <a href="http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clang-tidy/IncludeInserterTest.cpp?rev=250824&r1=250823&r2=250824&view=diff" rel="noreferrer" target="_blank">http://llvm.org/viewvc/llvm-project/clang-tools-extra/trunk/unittests/clang-tidy/IncludeInserterTest.cpp?rev=250824&r1=250823&r2=250824&view=diff</a><br>
==============================================================================<br>
--- clang-tools-extra/trunk/unittests/clang-tidy/IncludeInserterTest.cpp (original)<br>
+++ clang-tools-extra/trunk/unittests/clang-tidy/IncludeInserterTest.cpp Tue Oct 20 07:56:27 2015<br>
@@ -98,7 +98,7 @@ class CXXSystemIncludeInserterCheck : pu<br>
public:<br>
CXXSystemIncludeInserterCheck(StringRef CheckName, ClangTidyContext *Context)<br>
: IncludeInserterCheckBase(CheckName, Context) {}<br>
- virtual ~CXXSystemIncludeInserterCheck() {}<br>
+ virtual ~CXXSystemIncludeInserterCheck() = default;<br>
<br>
std::vector<StringRef> HeadersToInclude() const override { return {"set"}; }<br>
bool IsAngledInclude() const override { return true; }<br>
<br>
<br>
_______________________________________________<br>
cfe-commits mailing list<br>
<a href="mailto:cfe-commits@lists.llvm.org">cfe-commits@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits</a><br>
</blockquote></div><br></div></div>