diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-16 14:39:20 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-07-17 09:56:16 +0200 |
commit | e557bd4eb73ecee802c724c7f7f16ad8b3793bed (patch) | |
tree | f209d6c6c009fb121ca851f8e888e0b662632c8a /compilerplugins | |
parent | 2d4ccc58e9ef3b98a88407e1a7a3abf3379f0d20 (diff) |
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 <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/overridevirtual.cxx (renamed from compilerplugins/clang/override.cxx) | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compilerplugins/clang/override.cxx b/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<Override> +class OverrideVirtual: + public loplugin::FilteringRewritePlugin<OverrideVirtual> { 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<SourceLocation> 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<Override> X("override", true); +loplugin::Plugin::Registration<OverrideVirtual> X("overridevirtual", true); } |