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>
This commit is contained in:
Noel Grandin 2019-07-16 14:39:20 +02:00
parent 2d4ccc58e9
commit e557bd4eb7
2 changed files with 7 additions and 7 deletions

View File

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

View File

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