summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/store
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-08-13 17:24:26 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-08-14 13:02:14 +0200
commit9f4d23c15115d64febd6bf01f870cc157badd350 (patch)
tree6bc1724f580291d42d62815d9ba84c7d2245b0ad /compilerplugins/clang/store
parent4917430c1c5e8105987e81d65d31df21955ad60e (diff)
filter out some of the AST in the plugins
by checking if the current namespace decl is in our code, so we have to scan less stuff, which results in a 10% perf improvement for me Change-Id: Idf0e30d57b6d0dcd13daa9ed679c28b9d233d387 Reviewed-on: https://gerrit.libreoffice.org/58942 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins/clang/store')
-rw-r--r--compilerplugins/clang/store/cascadingassignop.cxx2
-rw-r--r--compilerplugins/clang/store/cascadingassignop.hxx4
-rw-r--r--compilerplugins/clang/store/cascadingcondop.cxx2
-rw-r--r--compilerplugins/clang/store/cascadingcondop.hxx4
-rw-r--r--compilerplugins/clang/store/changefunctioncalls.cxx5
-rw-r--r--compilerplugins/clang/store/constantfunction.cxx4
-rw-r--r--compilerplugins/clang/store/deletedspecial.cxx4
-rw-r--r--compilerplugins/clang/store/derivedclass.cxx5
-rw-r--r--compilerplugins/clang/store/findoncontainer.cxx4
-rw-r--r--compilerplugins/clang/store/lclstaticfix.cxx2
-rw-r--r--compilerplugins/clang/store/lclstaticfix.hxx3
-rw-r--r--compilerplugins/clang/store/paintmethodconversion.cxx4
-rw-r--r--compilerplugins/clang/store/postfixincrementfix.cxx2
-rw-r--r--compilerplugins/clang/store/postfixincrementfix.hxx3
-rw-r--r--compilerplugins/clang/store/referencecasting.cxx2
-rw-r--r--compilerplugins/clang/store/referencecasting.hxx3
-rw-r--r--compilerplugins/clang/store/removeforwardstringdecl.cxx2
-rw-r--r--compilerplugins/clang/store/removeforwardstringdecl.hxx3
-rw-r--r--compilerplugins/clang/store/removevirtuals.cxx4
-rw-r--r--compilerplugins/clang/store/returnunique.cxx4
-rw-r--r--compilerplugins/clang/store/revisibility.cxx4
-rw-r--r--compilerplugins/clang/store/rtlconstasciimacro.cxx5
-rw-r--r--compilerplugins/clang/store/stdexception.cxx4
-rw-r--r--compilerplugins/clang/store/svstreamoutputoperators.cxx5
-rw-r--r--compilerplugins/clang/store/tutorial/tutorial1.cxx2
-rw-r--r--compilerplugins/clang/store/tutorial/tutorial1.hxx4
-rw-r--r--compilerplugins/clang/store/tutorial/tutorial2.cxx2
-rw-r--r--compilerplugins/clang/store/tutorial/tutorial2.hxx3
-rw-r--r--compilerplugins/clang/store/tutorial/tutorial3.cxx2
-rw-r--r--compilerplugins/clang/store/tutorial/tutorial3.hxx3
-rw-r--r--compilerplugins/clang/store/unusedcode.cxx5
-rw-r--r--compilerplugins/clang/store/valueof.cxx5
32 files changed, 46 insertions, 64 deletions
diff --git a/compilerplugins/clang/store/cascadingassignop.cxx b/compilerplugins/clang/store/cascadingassignop.cxx
index 1d08217f177e..660689b9c77b 100644
--- a/compilerplugins/clang/store/cascadingassignop.cxx
+++ b/compilerplugins/clang/store/cascadingassignop.cxx
@@ -40,7 +40,7 @@ struct WalkCounter
// Ctor, nothing special, pass the argument(s).
CascadingAssignOp::CascadingAssignOp( const InstantiationData& data )
- : Plugin( data )
+ : FilteringPlugin( data )
{
}
diff --git a/compilerplugins/clang/store/cascadingassignop.hxx b/compilerplugins/clang/store/cascadingassignop.hxx
index fa776c7a3ba4..adc3eac77ba7 100644
--- a/compilerplugins/clang/store/cascadingassignop.hxx
+++ b/compilerplugins/clang/store/cascadingassignop.hxx
@@ -22,9 +22,7 @@ struct WalkCounter;
// The class implementing the plugin action.
class CascadingAssignOp
// Inherits from the Clang class that will allow examing the Clang AST tree (i.e. syntax tree).
- : public RecursiveASTVisitor< CascadingAssignOp >
- // And the base class for LO Clang plugins.
- , public Plugin
+ : public FilteringPlugin< CascadingAssignOp >
{
public:
CascadingAssignOp( const InstantiationData& data );
diff --git a/compilerplugins/clang/store/cascadingcondop.cxx b/compilerplugins/clang/store/cascadingcondop.cxx
index c868e5e468a2..8164e4614f6b 100644
--- a/compilerplugins/clang/store/cascadingcondop.cxx
+++ b/compilerplugins/clang/store/cascadingcondop.cxx
@@ -39,7 +39,7 @@ struct WalkCounter
// Ctor, nothing special, pass the argument(s).
CascadingCondOp::CascadingCondOp( const InstantiationData& data )
- : Plugin( data )
+ : FilteringPlugin( data )
{
}
diff --git a/compilerplugins/clang/store/cascadingcondop.hxx b/compilerplugins/clang/store/cascadingcondop.hxx
index 8d41177ec051..5bdf11093957 100644
--- a/compilerplugins/clang/store/cascadingcondop.hxx
+++ b/compilerplugins/clang/store/cascadingcondop.hxx
@@ -22,9 +22,7 @@ struct WalkCounter;
// The class implementing the plugin action.
class CascadingCondOp
// Inherits from the Clang class that will allow examing the Clang AST tree (i.e. syntax tree).
- : public RecursiveASTVisitor< CascadingCondOp >
- // And the base class for LO Clang plugins.
- , public Plugin
+ : public FilteringPlugin< CascadingCondOp >
{
public:
CascadingCondOp( const InstantiationData& data );
diff --git a/compilerplugins/clang/store/changefunctioncalls.cxx b/compilerplugins/clang/store/changefunctioncalls.cxx
index a728ad5a310a..9f5390a2150c 100644
--- a/compilerplugins/clang/store/changefunctioncalls.cxx
+++ b/compilerplugins/clang/store/changefunctioncalls.cxx
@@ -33,8 +33,7 @@ namespace loplugin
{
class ChangeFunctionCalls
- : public RecursiveASTVisitor< ChangeFunctionCalls >
- , public RewritePlugin
+ : public loplugin::FilteringRewritePlugin< ChangeFunctionCalls >
{
public:
explicit ChangeFunctionCalls( CompilerInstance& compiler, Rewriter& rewriter );
@@ -43,7 +42,7 @@ class ChangeFunctionCalls
};
ChangeFunctionCalls::ChangeFunctionCalls( CompilerInstance& compiler, Rewriter& rewriter )
- : RewritePlugin( compiler, rewriter )
+ : FilteringRewritePlugin( compiler, rewriter )
{
}
diff --git a/compilerplugins/clang/store/constantfunction.cxx b/compilerplugins/clang/store/constantfunction.cxx
index f3dd4f8a39c5..b2be6b90532d 100644
--- a/compilerplugins/clang/store/constantfunction.cxx
+++ b/compilerplugins/clang/store/constantfunction.cxx
@@ -19,11 +19,11 @@
namespace {
class ConstantFunction:
- public RecursiveASTVisitor<ConstantFunction>, public loplugin::Plugin
+ public loplugin::FilteringPlugin<ConstantFunction>
{
StringRef getFilename(const FunctionDecl* functionDecl);
public:
- explicit ConstantFunction(InstantiationData const & data): Plugin(data) {}
+ explicit ConstantFunction(InstantiationData const & data): FilteringRewritePlugin(data) {}
void run() override
{
diff --git a/compilerplugins/clang/store/deletedspecial.cxx b/compilerplugins/clang/store/deletedspecial.cxx
index 7b29fcf5a76e..5d66de352184 100644
--- a/compilerplugins/clang/store/deletedspecial.cxx
+++ b/compilerplugins/clang/store/deletedspecial.cxx
@@ -32,10 +32,10 @@ CXXRecordDecl const * getClass(CXXMethodDecl const * decl) {
}
class DeletedSpecial:
- public RecursiveASTVisitor<DeletedSpecial>, public loplugin::Plugin
+ public loplugin::FilteringPlugin<DeletedSpecial>
{
public:
- explicit DeletedSpecial(InstantiationData const & data): Plugin(data) {}
+ explicit DeletedSpecial(InstantiationData const & data): FilteringPlugin(data) {}
virtual void run() override;
diff --git a/compilerplugins/clang/store/derivedclass.cxx b/compilerplugins/clang/store/derivedclass.cxx
index 95f0296b4537..bc4a396930e2 100644
--- a/compilerplugins/clang/store/derivedclass.cxx
+++ b/compilerplugins/clang/store/derivedclass.cxx
@@ -12,12 +12,11 @@
namespace {
class DerivedClass:
- public RecursiveASTVisitor<DerivedClass>,
- public loplugin::Plugin
+ public loplugin::FilteringPlugin<DerivedClass>
{
public:
explicit DerivedClass(InstantiationData const & data):
- Plugin(data) {}
+ FilteringPlugin(data) {}
virtual void run() override
{ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
diff --git a/compilerplugins/clang/store/findoncontainer.cxx b/compilerplugins/clang/store/findoncontainer.cxx
index 99efb9caab56..09f51187aef0 100644
--- a/compilerplugins/clang/store/findoncontainer.cxx
+++ b/compilerplugins/clang/store/findoncontainer.cxx
@@ -22,10 +22,10 @@
namespace {
class FindOnContainer:
- public RecursiveASTVisitor<FindOnContainer>, public loplugin::Plugin
+ public loplugin::FilteringPlugin<FindOnContainer>
{
public:
- explicit FindOnContainer(InstantiationData const & data): Plugin(data) {}
+ explicit FindOnContainer(InstantiationData const & data): FilteringPlugin(data) {}
virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
diff --git a/compilerplugins/clang/store/lclstaticfix.cxx b/compilerplugins/clang/store/lclstaticfix.cxx
index 81210bd5641f..01e4171fc4f4 100644
--- a/compilerplugins/clang/store/lclstaticfix.cxx
+++ b/compilerplugins/clang/store/lclstaticfix.cxx
@@ -21,7 +21,7 @@ namespace loplugin
{
LclStaticFix::LclStaticFix( CompilerInstance& compiler, Rewriter& rewriter )
- : RewritePlugin( compiler, rewriter )
+ : FilteringRewritePlugin( compiler, rewriter )
{
}
diff --git a/compilerplugins/clang/store/lclstaticfix.hxx b/compilerplugins/clang/store/lclstaticfix.hxx
index a42801f6f0d4..e15420e63927 100644
--- a/compilerplugins/clang/store/lclstaticfix.hxx
+++ b/compilerplugins/clang/store/lclstaticfix.hxx
@@ -18,8 +18,7 @@ namespace loplugin
{
class LclStaticFix
- : public RecursiveASTVisitor< LclStaticFix >
- , public RewritePlugin
+ : public loplugin::FilteringRewritePlugin< LclStaticFix >
{
public:
explicit LclStaticFix( CompilerInstance& compiler, Rewriter& rewriter );
diff --git a/compilerplugins/clang/store/paintmethodconversion.cxx b/compilerplugins/clang/store/paintmethodconversion.cxx
index e19a0f416819..f8c63d4b98ce 100644
--- a/compilerplugins/clang/store/paintmethodconversion.cxx
+++ b/compilerplugins/clang/store/paintmethodconversion.cxx
@@ -43,11 +43,11 @@ bool isDerivedFromWindow(const CXXRecordDecl* decl) {
return false;
}
-class PaintMethodConversion: public RecursiveASTVisitor<PaintMethodConversion>, public loplugin::RewritePlugin
+class PaintMethodConversion: public loplugin::FilteringRewritePlugin<PaintMethodConversion>
{
public:
explicit PaintMethodConversion(InstantiationData const& data):
- RewritePlugin(data)
+ FilteringRewritePlugin(data)
{}
virtual void run() override
diff --git a/compilerplugins/clang/store/postfixincrementfix.cxx b/compilerplugins/clang/store/postfixincrementfix.cxx
index c4ad68591817..eba6f35b5ab8 100644
--- a/compilerplugins/clang/store/postfixincrementfix.cxx
+++ b/compilerplugins/clang/store/postfixincrementfix.cxx
@@ -21,7 +21,7 @@ namespace loplugin
{
PostfixIncrementFix::PostfixIncrementFix( const InstantiationData& data )
- : RewritePlugin( data )
+ : FilteringRewritePlugin( data )
{
}
diff --git a/compilerplugins/clang/store/postfixincrementfix.hxx b/compilerplugins/clang/store/postfixincrementfix.hxx
index 60dc93bb79f6..6cc2470e6ee7 100644
--- a/compilerplugins/clang/store/postfixincrementfix.hxx
+++ b/compilerplugins/clang/store/postfixincrementfix.hxx
@@ -18,8 +18,7 @@ namespace loplugin
{
class PostfixIncrementFix
- : public RecursiveASTVisitor< PostfixIncrementFix >
- , public RewritePlugin
+ : public loplugin::FilteringRewritePlugin< PostfixIncrementFix >
{
public:
explicit PostfixIncrementFix( const InstantiationData& data );
diff --git a/compilerplugins/clang/store/referencecasting.cxx b/compilerplugins/clang/store/referencecasting.cxx
index 4466fb66e122..ed74b0b6e14a 100644
--- a/compilerplugins/clang/store/referencecasting.cxx
+++ b/compilerplugins/clang/store/referencecasting.cxx
@@ -33,7 +33,7 @@ I have logged a bug here:
*/
ReferenceCasting::ReferenceCasting( CompilerInstance& compiler )
- : Plugin( compiler )
+ : FilteringPlugin( compiler )
{
}
diff --git a/compilerplugins/clang/store/referencecasting.hxx b/compilerplugins/clang/store/referencecasting.hxx
index eab7a7784b47..3c41b773e0f0 100644
--- a/compilerplugins/clang/store/referencecasting.hxx
+++ b/compilerplugins/clang/store/referencecasting.hxx
@@ -18,8 +18,7 @@ namespace loplugin
{
class ReferenceCasting
- : public RecursiveASTVisitor< ReferenceCasting >
- , public Plugin
+ : public FilteringPlugin< ReferenceCasting >
{
public:
explicit ReferenceCasting( CompilerInstance& compiler );
diff --git a/compilerplugins/clang/store/removeforwardstringdecl.cxx b/compilerplugins/clang/store/removeforwardstringdecl.cxx
index c70d7a8e2eb2..e7a546a8f5d3 100644
--- a/compilerplugins/clang/store/removeforwardstringdecl.cxx
+++ b/compilerplugins/clang/store/removeforwardstringdecl.cxx
@@ -21,7 +21,7 @@ namespace loplugin
{
RemoveForwardStringDecl::RemoveForwardStringDecl( CompilerInstance& compiler, Rewriter& rewriter )
- : RewritePlugin( compiler, rewriter )
+ : FilteringRewritePlugin( compiler, rewriter )
{
}
diff --git a/compilerplugins/clang/store/removeforwardstringdecl.hxx b/compilerplugins/clang/store/removeforwardstringdecl.hxx
index d8e2e7ea5fb8..ef2c3f96743f 100644
--- a/compilerplugins/clang/store/removeforwardstringdecl.hxx
+++ b/compilerplugins/clang/store/removeforwardstringdecl.hxx
@@ -18,8 +18,7 @@ namespace loplugin
{
class RemoveForwardStringDecl
- : public RecursiveASTVisitor< RemoveForwardStringDecl >
- , public RewritePlugin
+ : public loplugin::FilteringRewritePlugin< RemoveForwardStringDecl >
{
public:
explicit RemoveForwardStringDecl( CompilerInstance& compiler, Rewriter& rewriter );
diff --git a/compilerplugins/clang/store/removevirtuals.cxx b/compilerplugins/clang/store/removevirtuals.cxx
index e44cb738629e..1dc98304d2ba 100644
--- a/compilerplugins/clang/store/removevirtuals.cxx
+++ b/compilerplugins/clang/store/removevirtuals.cxx
@@ -26,7 +26,7 @@
namespace {
class RemoveVirtuals:
- public RecursiveASTVisitor<RemoveVirtuals>, public loplugin::RewritePlugin
+ public loplugin::FilteringRewritePlugin<RemoveVirtuals>
{
public:
explicit RemoveVirtuals(InstantiationData const & data);
@@ -50,7 +50,7 @@ size_t getFilesize(const char* filename)
return st.st_size;
}
-RemoveVirtuals::RemoveVirtuals(InstantiationData const & data): RewritePlugin(data)
+RemoveVirtuals::RemoveVirtuals(InstantiationData const & data): FilteringRewritePlugin(data)
{
static const char sInputFile[] = SRCDIR "/result.txt";
mmapFilesize = getFilesize(sInputFile);
diff --git a/compilerplugins/clang/store/returnunique.cxx b/compilerplugins/clang/store/returnunique.cxx
index d97d5253d97b..913c043a4712 100644
--- a/compilerplugins/clang/store/returnunique.cxx
+++ b/compilerplugins/clang/store/returnunique.cxx
@@ -18,10 +18,10 @@
namespace {
class ReturnUnique:
- public RecursiveASTVisitor<ReturnUnique>, public loplugin::Plugin
+ public loplugin::FilteringPlugin<ReturnUnique>
{
public:
- explicit ReturnUnique(InstantiationData const & data): Plugin(data) {}
+ explicit ReturnUnique(InstantiationData const & data): FilteringPlugin(data) {}
void run() override {
if (compiler.getLangOpts().CPlusPlus) {
diff --git a/compilerplugins/clang/store/revisibility.cxx b/compilerplugins/clang/store/revisibility.cxx
index fec8ff7f7e61..9aa04f7b2560 100644
--- a/compilerplugins/clang/store/revisibility.cxx
+++ b/compilerplugins/clang/store/revisibility.cxx
@@ -26,10 +26,10 @@ bool isFriendDecl(Decl const * decl) {
}
class ReVisibility:
- public RecursiveASTVisitor<ReVisibility>, public loplugin::Plugin
+ public loplugin::FilteringPlugin<ReVisibility>
{
public:
- explicit ReVisibility(InstantiationData const & data): Plugin(data) {}
+ explicit ReVisibility(InstantiationData const & data): FilteringPlugin(data) {}
void run() override
{ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
diff --git a/compilerplugins/clang/store/rtlconstasciimacro.cxx b/compilerplugins/clang/store/rtlconstasciimacro.cxx
index eb955e2b4590..66e202ce266f 100644
--- a/compilerplugins/clang/store/rtlconstasciimacro.cxx
+++ b/compilerplugins/clang/store/rtlconstasciimacro.cxx
@@ -24,9 +24,8 @@ namespace loplugin
{
class RtlConstAsciiMacro
- : public RecursiveASTVisitor< RtlConstAsciiMacro >
+ : public loplugin::FilteringRewritePlugin< RtlConstAsciiMacro >
, public PPCallbacks
- , public RewritePlugin
{
public:
explicit RtlConstAsciiMacro( const InstantiationData& data );
@@ -44,7 +43,7 @@ class RtlConstAsciiMacro
};
RtlConstAsciiMacro::RtlConstAsciiMacro( const InstantiationData& data )
- : RewritePlugin( data )
+ : FilteringRewritePlugin( data )
, searchingForString( false )
{
compiler.getPreprocessor().addPPCallbacks( this );
diff --git a/compilerplugins/clang/store/stdexception.cxx b/compilerplugins/clang/store/stdexception.cxx
index 85a589f7abdd..47a7d579118a 100644
--- a/compilerplugins/clang/store/stdexception.cxx
+++ b/compilerplugins/clang/store/stdexception.cxx
@@ -23,10 +23,10 @@ bool isStdException(QualType type) {
}
class StdException:
- public RecursiveASTVisitor<StdException>, public loplugin::RewritePlugin
+ public loplugin::FilteringRewritePlugin<StdException>
{
public:
- explicit StdException(InstantiationData const & data): RewritePlugin(data)
+ explicit StdException(InstantiationData const & data): FilteringRewritePlugin(data)
{}
virtual void run() override
diff --git a/compilerplugins/clang/store/svstreamoutputoperators.cxx b/compilerplugins/clang/store/svstreamoutputoperators.cxx
index dcabbf5df3bb..6e0ff616844d 100644
--- a/compilerplugins/clang/store/svstreamoutputoperators.cxx
+++ b/compilerplugins/clang/store/svstreamoutputoperators.cxx
@@ -33,8 +33,7 @@ namespace loplugin
{
class SvStreamOutputOperators
- : public RecursiveASTVisitor< SvStreamOutputOperators >
- , public RewritePlugin
+ : public loplugin::FilteringRewritePlugin< SvStreamOutputOperators >
{
public:
explicit SvStreamOutputOperators( InstantiationData const & data );
@@ -45,7 +44,7 @@ class SvStreamOutputOperators
};
SvStreamOutputOperators::SvStreamOutputOperators( InstantiationData const & data )
- : RewritePlugin( data )
+ : FilteringRewritePlugin( data )
{
}
diff --git a/compilerplugins/clang/store/tutorial/tutorial1.cxx b/compilerplugins/clang/store/tutorial/tutorial1.cxx
index cd3f710d1187..0b73431fbbad 100644
--- a/compilerplugins/clang/store/tutorial/tutorial1.cxx
+++ b/compilerplugins/clang/store/tutorial/tutorial1.cxx
@@ -22,7 +22,7 @@ namespace loplugin
// Ctor, nothing special, pass the argument(s).
Tutorial1::Tutorial1( const InstantiationData& data )
- : Plugin( data )
+ : FilteringPlugin( data )
{
}
diff --git a/compilerplugins/clang/store/tutorial/tutorial1.hxx b/compilerplugins/clang/store/tutorial/tutorial1.hxx
index 365d9259680c..59f115147780 100644
--- a/compilerplugins/clang/store/tutorial/tutorial1.hxx
+++ b/compilerplugins/clang/store/tutorial/tutorial1.hxx
@@ -20,9 +20,7 @@ namespace loplugin
// The class implementing the plugin action.
class Tutorial1
// Inherits from the Clang class that will allow examing the Clang AST tree (i.e. syntax tree).
- : public RecursiveASTVisitor< Tutorial1 >
- // And the base class for LO Clang plugins.
- , public Plugin
+ : public FilteringPlugin< Tutorial1 >
{
public:
// Ctor, nothing special.
diff --git a/compilerplugins/clang/store/tutorial/tutorial2.cxx b/compilerplugins/clang/store/tutorial/tutorial2.cxx
index 5d3a2d6322e5..8ef338c6d5f8 100644
--- a/compilerplugins/clang/store/tutorial/tutorial2.cxx
+++ b/compilerplugins/clang/store/tutorial/tutorial2.cxx
@@ -23,7 +23,7 @@ namespace loplugin
{
Tutorial2::Tutorial2( const InstantiationData& data )
- : Plugin( data )
+ : FilteringPlugin( data )
{
}
diff --git a/compilerplugins/clang/store/tutorial/tutorial2.hxx b/compilerplugins/clang/store/tutorial/tutorial2.hxx
index cb708d32cef8..9c1f486f80e0 100644
--- a/compilerplugins/clang/store/tutorial/tutorial2.hxx
+++ b/compilerplugins/clang/store/tutorial/tutorial2.hxx
@@ -19,8 +19,7 @@ namespace loplugin
// The same like for Tutorial1.
class Tutorial2
- : public RecursiveASTVisitor< Tutorial2 >
- , public Plugin
+ : public FilteringPlugin< Tutorial2 >
{
public:
Tutorial2( const InstantiationData& data );
diff --git a/compilerplugins/clang/store/tutorial/tutorial3.cxx b/compilerplugins/clang/store/tutorial/tutorial3.cxx
index 183c3b20d40c..e48118611eb7 100644
--- a/compilerplugins/clang/store/tutorial/tutorial3.cxx
+++ b/compilerplugins/clang/store/tutorial/tutorial3.cxx
@@ -23,7 +23,7 @@ namespace loplugin
// Ctor, pass arguments.
Tutorial3::Tutorial3( const InstantiationData& data )
- : RewritePlugin( data )
+ : FilteringRewritePlugin( data )
{
}
diff --git a/compilerplugins/clang/store/tutorial/tutorial3.hxx b/compilerplugins/clang/store/tutorial/tutorial3.hxx
index 4261d1bfd7f0..badb12904cf2 100644
--- a/compilerplugins/clang/store/tutorial/tutorial3.hxx
+++ b/compilerplugins/clang/store/tutorial/tutorial3.hxx
@@ -19,8 +19,7 @@ namespace loplugin
// Similar like for Tutorial2, but this time the base class is RewritePlugin.
class Tutorial3
- : public RecursiveASTVisitor< Tutorial3 >
- , public RewritePlugin
+ : public loplugin::FilteringRewritePlugin< Tutorial3 >
{
public:
// One more argument for ctor.
diff --git a/compilerplugins/clang/store/unusedcode.cxx b/compilerplugins/clang/store/unusedcode.cxx
index 09fc71b3fcc5..32fc4d3c2d7b 100644
--- a/compilerplugins/clang/store/unusedcode.cxx
+++ b/compilerplugins/clang/store/unusedcode.cxx
@@ -25,8 +25,7 @@ namespace loplugin
{
class UnusedCode
- : public RecursiveASTVisitor< UnusedCode >
- , public RewritePlugin
+ : public loplugin::FilteringRewritePlugin< UnusedCode >
{
public:
explicit UnusedCode( CompilerInstance& compiler, Rewriter& rewriter );
@@ -35,7 +34,7 @@ class UnusedCode
};
UnusedCode::UnusedCode( CompilerInstance& compiler, Rewriter& rewriter )
- : RewritePlugin( compiler, rewriter )
+ : FilteringRewritePlugin( compiler, rewriter )
{
}
diff --git a/compilerplugins/clang/store/valueof.cxx b/compilerplugins/clang/store/valueof.cxx
index 63dfa2f0c2bc..2b769a3e8cac 100644
--- a/compilerplugins/clang/store/valueof.cxx
+++ b/compilerplugins/clang/store/valueof.cxx
@@ -22,8 +22,7 @@ namespace loplugin
{
class ConvertValueOf
- : public RecursiveASTVisitor< ConvertValueOf >
- , public RewritePlugin
+ : public loplugin::FilteringRewritePlugin< ConvertValueOf >
{
public:
explicit ConvertValueOf( CompilerInstance& compiler, Rewriter& rewriter );
@@ -34,7 +33,7 @@ class ConvertValueOf
};
ConvertValueOf::ConvertValueOf( CompilerInstance& compiler, Rewriter& rewriter )
- : RewritePlugin( compiler, rewriter )
+ : FilteringRewritePlugin( compiler, rewriter )
{
}