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:
parent
2d4ccc58e9
commit
e557bd4eb7
@ -19,11 +19,11 @@
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
|
|
||||||
class Override:
|
class OverrideVirtual:
|
||||||
public loplugin::FilteringRewritePlugin<Override>
|
public loplugin::FilteringRewritePlugin<OverrideVirtual>
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
explicit Override(loplugin::InstantiationData const & data):
|
explicit OverrideVirtual(loplugin::InstantiationData const & data):
|
||||||
FilteringRewritePlugin(data) {}
|
FilteringRewritePlugin(data) {}
|
||||||
|
|
||||||
virtual void run() override;
|
virtual void run() override;
|
||||||
@ -34,7 +34,7 @@ private:
|
|||||||
std::set<SourceLocation> insertions_;
|
std::set<SourceLocation> insertions_;
|
||||||
};
|
};
|
||||||
|
|
||||||
void Override::run() {
|
void OverrideVirtual::run() {
|
||||||
if (compiler.getLangOpts().CPlusPlus
|
if (compiler.getLangOpts().CPlusPlus
|
||||||
&& compiler.getPreprocessor().getIdentifierInfo(
|
&& compiler.getPreprocessor().getIdentifierInfo(
|
||||||
"LIBO_INTERNAL_ONLY")->hasMacroDefinition())
|
"LIBO_INTERNAL_ONLY")->hasMacroDefinition())
|
||||||
@ -42,7 +42,7 @@ void Override::run() {
|
|||||||
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
|
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
|
// 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
|
// ignored location; that e.g. handles uses of the Q_OBJECT macro from
|
||||||
// external QtCore/qobjectdefs.h:
|
// external QtCore/qobjectdefs.h:
|
||||||
@ -161,7 +161,7 @@ bool Override::VisitCXXMethodDecl(CXXMethodDecl const * decl) {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
loplugin::Plugin::Registration<Override> X("override", true);
|
loplugin::Plugin::Registration<OverrideVirtual> X("overridevirtual", true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
@ -1702,8 +1702,8 @@ compilerplugins/clang/mergeclasses.cxx
|
|||||||
compilerplugins/clang/nullptr.cxx
|
compilerplugins/clang/nullptr.cxx
|
||||||
compilerplugins/clang/oncevar.cxx
|
compilerplugins/clang/oncevar.cxx
|
||||||
compilerplugins/clang/oslendian.cxx
|
compilerplugins/clang/oslendian.cxx
|
||||||
compilerplugins/clang/override.cxx
|
|
||||||
compilerplugins/clang/overrideparam.cxx
|
compilerplugins/clang/overrideparam.cxx
|
||||||
|
compilerplugins/clang/overridevirtual.cxx
|
||||||
compilerplugins/clang/passparamsbyref.cxx
|
compilerplugins/clang/passparamsbyref.cxx
|
||||||
compilerplugins/clang/passstuffbyref.cxx
|
compilerplugins/clang/passstuffbyref.cxx
|
||||||
compilerplugins/clang/plugin.cxx
|
compilerplugins/clang/plugin.cxx
|
||||||
|
Loading…
x
Reference in New Issue
Block a user