From e557bd4eb73ecee802c724c7f7f16ad8b3793bed Mon Sep 17 00:00:00 2001 From: Noel Grandin Date: Tue, 16 Jul 2019 14:39:20 +0200 Subject: [PATCH] rename override plugin in preparation for using it in the shared plugin infrastructure, which needs the name of the Registration variable to match the name of the plugin, which doesn't work when the plugin is named the same as a keyword Change-Id: I40a3dc1902f2fa1efe76b5e472cd03f4b480ff34 Reviewed-on: https://gerrit.libreoffice.org/75741 Tested-by: Jenkins Reviewed-by: Noel Grandin --- .../clang/{override.cxx => overridevirtual.cxx} | 12 ++++++------ solenv/clang-format/blacklist | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) rename compilerplugins/clang/{override.cxx => overridevirtual.cxx} (94%) diff --git a/compilerplugins/clang/override.cxx b/compilerplugins/clang/overridevirtual.cxx similarity index 94% rename from compilerplugins/clang/override.cxx rename to compilerplugins/clang/overridevirtual.cxx index bd63792c3e28..9b31035d2156 100644 --- a/compilerplugins/clang/override.cxx +++ b/compilerplugins/clang/overridevirtual.cxx @@ -19,11 +19,11 @@ namespace { -class Override: - public loplugin::FilteringRewritePlugin +class OverrideVirtual: + public loplugin::FilteringRewritePlugin { public: - explicit Override(loplugin::InstantiationData const & data): + explicit OverrideVirtual(loplugin::InstantiationData const & data): FilteringRewritePlugin(data) {} virtual void run() override; @@ -34,7 +34,7 @@ private: std::set insertions_; }; -void Override::run() { +void OverrideVirtual::run() { if (compiler.getLangOpts().CPlusPlus && compiler.getPreprocessor().getIdentifierInfo( "LIBO_INTERNAL_ONLY")->hasMacroDefinition()) @@ -42,7 +42,7 @@ void Override::run() { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } } -bool Override::VisitCXXMethodDecl(CXXMethodDecl const * decl) { +bool OverrideVirtual::VisitCXXMethodDecl(CXXMethodDecl const * decl) { // As a heuristic, ignore declarations where the name is spelled out in an // ignored location; that e.g. handles uses of the Q_OBJECT macro from // external QtCore/qobjectdefs.h: @@ -161,7 +161,7 @@ bool Override::VisitCXXMethodDecl(CXXMethodDecl const * decl) { return true; } -loplugin::Plugin::Registration X("override", true); +loplugin::Plugin::Registration X("overridevirtual", true); } diff --git a/solenv/clang-format/blacklist b/solenv/clang-format/blacklist index a069e3b1208f..4c2b3be8e9d1 100644 --- a/solenv/clang-format/blacklist +++ b/solenv/clang-format/blacklist @@ -1702,8 +1702,8 @@ compilerplugins/clang/mergeclasses.cxx compilerplugins/clang/nullptr.cxx compilerplugins/clang/oncevar.cxx compilerplugins/clang/oslendian.cxx -compilerplugins/clang/override.cxx compilerplugins/clang/overrideparam.cxx +compilerplugins/clang/overridevirtual.cxx compilerplugins/clang/passparamsbyref.cxx compilerplugins/clang/passstuffbyref.cxx compilerplugins/clang/plugin.cxx