[Libreoffice-commits] core.git: compilerplugins/clang

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Thu Aug 23 14:35:14 UTC 2018


 compilerplugins/clang/blockblock.cxx              |    4 ++--
 compilerplugins/clang/casttovoid.cxx              |    4 ++--
 compilerplugins/clang/changetoolsgen.cxx          |    4 ++--
 compilerplugins/clang/charrightshift.cxx          |    4 ++--
 compilerplugins/clang/checkunusedparams.cxx       |    4 ++--
 compilerplugins/clang/comparisonwithconstant.cxx  |    4 ++--
 compilerplugins/clang/conststringvar.cxx          |    4 ++--
 compilerplugins/clang/convertlong.cxx             |    4 ++--
 compilerplugins/clang/datamembershadow.cxx        |    4 ++--
 compilerplugins/clang/dbgunhandledexception.cxx   |    4 ++--
 compilerplugins/clang/dllprivate.cxx              |    4 ++--
 compilerplugins/clang/dodgyswitch.cxx             |    4 ++--
 compilerplugins/clang/doubleconvert.cxx           |    4 ++--
 compilerplugins/clang/dynexcspec.cxx              |    4 ++--
 compilerplugins/clang/emptyif.cxx                 |    4 ++--
 compilerplugins/clang/expressionalwayszero.cxx    |    4 ++--
 compilerplugins/clang/externvar.cxx               |    4 ++--
 compilerplugins/clang/finalprotected.cxx          |    4 ++--
 compilerplugins/clang/flatten.cxx                 |    4 ++--
 compilerplugins/clang/fragiledestructor.cxx       |    4 ++--
 compilerplugins/clang/nestedunnamed.cxx           |    4 ++--
 compilerplugins/clang/overrideparam.cxx           |    4 ++--
 compilerplugins/clang/passparamsbyref.cxx         |    4 ++--
 compilerplugins/clang/pointerbool.cxx             |    4 ++--
 compilerplugins/clang/redundantfcast.cxx          |    4 ++--
 compilerplugins/clang/redundantinline.cxx         |    4 ++--
 compilerplugins/clang/redundantpointerops.cxx     |    4 ++--
 compilerplugins/clang/reservedid.cxx              |    4 ++--
 compilerplugins/clang/salcall.cxx                 |    4 ++--
 compilerplugins/clang/salunicodeliteral.cxx       |    4 ++--
 compilerplugins/clang/simplifydynamiccast.cxx     |    4 ++--
 compilerplugins/clang/staticaccess.cxx            |    4 ++--
 compilerplugins/clang/staticanonymous.cxx         |    5 ++---
 compilerplugins/clang/store/badvectorinit.cxx     |    4 ++--
 compilerplugins/clang/store/bodynotinblock.hxx    |    3 +--
 compilerplugins/clang/store/deadclass.cxx         |    4 ++--
 compilerplugins/clang/store/defaultparams.cxx     |    4 ++--
 compilerplugins/clang/store/fpcomparison.cxx      |    4 ++--
 compilerplugins/clang/store/returnbyref.cxx       |    4 ++--
 compilerplugins/clang/store/sfxitemsetrewrite.cxx |    4 ++--
 compilerplugins/clang/store/stylepolice.cxx       |    4 ++--
 compilerplugins/clang/subtlezeroinit.cxx          |    4 ++--
 compilerplugins/clang/unicodetochar.cxx           |    4 ++--
 compilerplugins/clang/unnecessarycatchthrow.cxx   |    4 ++--
 compilerplugins/clang/unnecessaryoverride.cxx     |    4 ++--
 compilerplugins/clang/unnecessaryparen.cxx        |    4 ++--
 compilerplugins/clang/unoany.cxx                  |    4 ++--
 compilerplugins/clang/unusedenumconstants.cxx     |    4 ++--
 compilerplugins/clang/unusedindex.cxx             |    4 ++--
 compilerplugins/clang/unusedvariablemore.cxx      |    4 ++--
 compilerplugins/clang/useuniqueptr.cxx            |    4 ++--
 compilerplugins/clang/virtualdown.cxx             |    4 ++--
 52 files changed, 103 insertions(+), 105 deletions(-)

New commits:
commit 1fd27a79318b2a762e3ae1590dde783ee656234b
Author:     Noel Grandin <noel.grandin at collabora.co.uk>
AuthorDate: Thu Aug 23 14:35:15 2018 +0200
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Thu Aug 23 16:34:48 2018 +0200

    filter out AST in more plugins
    
    I seem to have missed quite a few in
    
        commit 9f4d23c15115d64febd6bf01f870cc157badd350
        filter out some of the AST in the plugins
    
    This nets me another 14% improvement
    
    Change-Id: I39b980b49ced560f768045dbedd3ddfef29306c1
    Reviewed-on: https://gerrit.libreoffice.org/59501
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/blockblock.cxx b/compilerplugins/clang/blockblock.cxx
index b0cba961aba0..6c9ef887cf10 100644
--- a/compilerplugins/clang/blockblock.cxx
+++ b/compilerplugins/clang/blockblock.cxx
@@ -20,11 +20,11 @@
 namespace {
 
 class BlockBlock:
-    public RecursiveASTVisitor<BlockBlock>, public loplugin::RewritePlugin
+    public loplugin::FilteringRewritePlugin<BlockBlock>
 {
 public:
     explicit BlockBlock(loplugin::InstantiationData const & data):
-        RewritePlugin(data) {}
+        FilteringRewritePlugin(data) {}
 
     virtual void run() override
     {
diff --git a/compilerplugins/clang/casttovoid.cxx b/compilerplugins/clang/casttovoid.cxx
index 35c35da42a9a..3812618a7283 100644
--- a/compilerplugins/clang/casttovoid.cxx
+++ b/compilerplugins/clang/casttovoid.cxx
@@ -44,11 +44,11 @@ Expr const * lookThroughInitListExpr(Expr const * expr) {
 }
 
 class CastToVoid final:
-    public RecursiveASTVisitor<CastToVoid>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<CastToVoid>
 {
 public:
     explicit CastToVoid(loplugin::InstantiationData const & data):
-        Plugin(data) {}
+        FilteringPlugin(data) {}
 
     bool TraverseCStyleCastExpr(CStyleCastExpr * expr) {
         auto const dre = checkCast(expr);
diff --git a/compilerplugins/clang/changetoolsgen.cxx b/compilerplugins/clang/changetoolsgen.cxx
index 190c4abf2c84..b5eda7dbb826 100644
--- a/compilerplugins/clang/changetoolsgen.cxx
+++ b/compilerplugins/clang/changetoolsgen.cxx
@@ -24,11 +24,11 @@
 
 namespace
 {
-class ChangeToolsGen : public RecursiveASTVisitor<ChangeToolsGen>, public loplugin::RewritePlugin
+class ChangeToolsGen : public loplugin::FilteringRewritePlugin<ChangeToolsGen>
 {
 public:
     explicit ChangeToolsGen(loplugin::InstantiationData const& data)
-        : RewritePlugin(data)
+        : FilteringRewritePlugin(data)
     {
     }
     virtual void run() override;
diff --git a/compilerplugins/clang/charrightshift.cxx b/compilerplugins/clang/charrightshift.cxx
index fe21cd8c8468..aa4c85d3f22d 100644
--- a/compilerplugins/clang/charrightshift.cxx
+++ b/compilerplugins/clang/charrightshift.cxx
@@ -13,11 +13,11 @@
 namespace {
 
 class CharRightShift:
-    public RecursiveASTVisitor<CharRightShift>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<CharRightShift>
 {
 public:
     explicit CharRightShift(loplugin::InstantiationData const & data):
-        Plugin(data) {}
+        FilteringPlugin(data) {}
 
     void run() override
     { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
diff --git a/compilerplugins/clang/checkunusedparams.cxx b/compilerplugins/clang/checkunusedparams.cxx
index f0f95f6141db..2d4bc0dd60fe 100644
--- a/compilerplugins/clang/checkunusedparams.cxx
+++ b/compilerplugins/clang/checkunusedparams.cxx
@@ -24,10 +24,10 @@ TODO look for places where we are working around the warning by doing
  */
 namespace {
 
-class CheckUnusedParams: public RecursiveASTVisitor<CheckUnusedParams>, public loplugin::Plugin {
+class CheckUnusedParams: public loplugin::FilteringPlugin<CheckUnusedParams> {
 public:
     explicit CheckUnusedParams(loplugin::InstantiationData const & data):
-        Plugin(data) {}
+        FilteringPlugin(data) {}
     void run() override;
     bool VisitFunctionDecl(FunctionDecl const *);
     bool VisitUnaryAddrOf(UnaryOperator const *);
diff --git a/compilerplugins/clang/comparisonwithconstant.cxx b/compilerplugins/clang/comparisonwithconstant.cxx
index d52e57f71345..6abe08b5fab7 100644
--- a/compilerplugins/clang/comparisonwithconstant.cxx
+++ b/compilerplugins/clang/comparisonwithconstant.cxx
@@ -23,10 +23,10 @@
 namespace {
 
 class ComparisonWithConstant :
-    public RecursiveASTVisitor<ComparisonWithConstant>, public loplugin::RewritePlugin
+    public loplugin::FilteringRewritePlugin<ComparisonWithConstant>
 {
 public:
-    explicit ComparisonWithConstant(loplugin::InstantiationData const & data): RewritePlugin(data) {}
+    explicit ComparisonWithConstant(loplugin::InstantiationData const & data): FilteringRewritePlugin(data) {}
 
     virtual void run() override
     {
diff --git a/compilerplugins/clang/conststringvar.cxx b/compilerplugins/clang/conststringvar.cxx
index bc20e182a400..a323b1cf0480 100644
--- a/compilerplugins/clang/conststringvar.cxx
+++ b/compilerplugins/clang/conststringvar.cxx
@@ -45,11 +45,11 @@ bool hasExternalLinkage(VarDecl const * decl) {
 }
 
 class ConstStringVar:
-    public RecursiveASTVisitor<ConstStringVar>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<ConstStringVar>
 {
 public:
     explicit ConstStringVar(loplugin::InstantiationData const & data):
-        Plugin(data) {}
+        FilteringPlugin(data) {}
 
     void run() override {
         if (compiler.getLangOpts().CPlusPlus) {
diff --git a/compilerplugins/clang/convertlong.cxx b/compilerplugins/clang/convertlong.cxx
index 8038b8a6371b..593265e652de 100644
--- a/compilerplugins/clang/convertlong.cxx
+++ b/compilerplugins/clang/convertlong.cxx
@@ -25,11 +25,11 @@
  */
 namespace
 {
-class ConvertLong : public RecursiveASTVisitor<ConvertLong>, public loplugin::Plugin
+class ConvertLong : public loplugin::FilteringPlugin<ConvertLong>
 {
 public:
     explicit ConvertLong(loplugin::InstantiationData const& data)
-        : Plugin(data)
+        : FilteringPlugin(data)
     {
     }
 
diff --git a/compilerplugins/clang/datamembershadow.cxx b/compilerplugins/clang/datamembershadow.cxx
index 2bb643d22a86..6c7f866761a8 100644
--- a/compilerplugins/clang/datamembershadow.cxx
+++ b/compilerplugins/clang/datamembershadow.cxx
@@ -26,11 +26,11 @@ namespace
 {
 
 class DataMemberShadow:
-    public RecursiveASTVisitor<DataMemberShadow>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<DataMemberShadow>
 {
 public:
     explicit DataMemberShadow(loplugin::InstantiationData const & data):
-        Plugin(data) {}
+        FilteringPlugin(data) {}
 
     virtual void run() override {
         TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
diff --git a/compilerplugins/clang/dbgunhandledexception.cxx b/compilerplugins/clang/dbgunhandledexception.cxx
index 633e655cd109..e701b38849f2 100644
--- a/compilerplugins/clang/dbgunhandledexception.cxx
+++ b/compilerplugins/clang/dbgunhandledexception.cxx
@@ -24,7 +24,7 @@ Check that DBG_UNHANDLED_EXCEPTION is always the first statement in a catch bloc
 it does not work properly.
 */
 
-class DbgUnhandledException : public RecursiveASTVisitor<DbgUnhandledException>, public Plugin
+class DbgUnhandledException : public loplugin::FilteringPlugin<DbgUnhandledException>
 {
 public:
     explicit DbgUnhandledException(InstantiationData const& data);
@@ -37,7 +37,7 @@ private:
 };
 
 DbgUnhandledException::DbgUnhandledException(const InstantiationData& data)
-    : Plugin(data)
+    : FilteringPlugin(data)
 {
 }
 
diff --git a/compilerplugins/clang/dllprivate.cxx b/compilerplugins/clang/dllprivate.cxx
index bb4e9c35a26b..8d0f221c327c 100644
--- a/compilerplugins/clang/dllprivate.cxx
+++ b/compilerplugins/clang/dllprivate.cxx
@@ -12,10 +12,10 @@
 namespace {
 
 class DllPrivate final:
-    public RecursiveASTVisitor<DllPrivate>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<DllPrivate>
 {
 public:
-    explicit DllPrivate(loplugin::InstantiationData const & data): Plugin(data)
+    explicit DllPrivate(loplugin::InstantiationData const & data): FilteringPlugin(data)
     {}
 
     bool VisitNamedDecl(NamedDecl const * decl) {
diff --git a/compilerplugins/clang/dodgyswitch.cxx b/compilerplugins/clang/dodgyswitch.cxx
index 066d4fcebebb..d0674b3632b0 100644
--- a/compilerplugins/clang/dodgyswitch.cxx
+++ b/compilerplugins/clang/dodgyswitch.cxx
@@ -17,10 +17,10 @@
 namespace {
 
 class DodgySwitch:
-    public RecursiveASTVisitor<DodgySwitch>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<DodgySwitch>
 {
 public:
-    explicit DodgySwitch(loplugin::InstantiationData const & data): Plugin(data)
+    explicit DodgySwitch(loplugin::InstantiationData const & data): FilteringPlugin(data)
     {}
 
     virtual void run() override
diff --git a/compilerplugins/clang/doubleconvert.cxx b/compilerplugins/clang/doubleconvert.cxx
index a0478e9e5f1f..ea93084511cf 100644
--- a/compilerplugins/clang/doubleconvert.cxx
+++ b/compilerplugins/clang/doubleconvert.cxx
@@ -17,11 +17,11 @@
  */
 namespace
 {
-class DoubleConvert final : public RecursiveASTVisitor<DoubleConvert>, public loplugin::Plugin
+class DoubleConvert final : public loplugin::FilteringPlugin<DoubleConvert>
 {
 public:
     explicit DoubleConvert(loplugin::InstantiationData const& data)
-        : Plugin(data)
+        : FilteringPlugin(data)
     {
     }
     void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
diff --git a/compilerplugins/clang/dynexcspec.cxx b/compilerplugins/clang/dynexcspec.cxx
index 651c997e60cf..c596547ea195 100644
--- a/compilerplugins/clang/dynexcspec.cxx
+++ b/compilerplugins/clang/dynexcspec.cxx
@@ -43,11 +43,11 @@ bool isDtorOrDealloc(FunctionDecl const * decl) {
 }
 
 class DynExcSpec:
-    public RecursiveASTVisitor<DynExcSpec>, public loplugin::RewritePlugin
+    public loplugin::FilteringRewritePlugin<DynExcSpec>
 {
 public:
     explicit DynExcSpec(loplugin::InstantiationData const & data):
-        RewritePlugin(data) {}
+        FilteringRewritePlugin(data) {}
 
     void run() override {
         if (compiler.getLangOpts().CPlusPlus) {
diff --git a/compilerplugins/clang/emptyif.cxx b/compilerplugins/clang/emptyif.cxx
index 82bd22338c06..76f9c033018e 100644
--- a/compilerplugins/clang/emptyif.cxx
+++ b/compilerplugins/clang/emptyif.cxx
@@ -22,11 +22,11 @@
  */
 namespace
 {
-class EmptyIf : public RecursiveASTVisitor<EmptyIf>, public loplugin::RewritePlugin
+class EmptyIf : public loplugin::FilteringRewritePlugin<EmptyIf>
 {
 public:
     explicit EmptyIf(loplugin::InstantiationData const& data)
-        : RewritePlugin(data)
+        : FilteringRewritePlugin(data)
     {
     }
 
diff --git a/compilerplugins/clang/expressionalwayszero.cxx b/compilerplugins/clang/expressionalwayszero.cxx
index ab343c1ae902..dae006b00097 100644
--- a/compilerplugins/clang/expressionalwayszero.cxx
+++ b/compilerplugins/clang/expressionalwayszero.cxx
@@ -28,10 +28,10 @@ static bool startswith(const std::string& rStr, const char* pSubStr) {
 }
 
 class ExpressionAlwaysZero:
-    public RecursiveASTVisitor<ExpressionAlwaysZero>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<ExpressionAlwaysZero>
 {
 public:
-    explicit ExpressionAlwaysZero(loplugin::InstantiationData const & data): Plugin(data) {}
+    explicit ExpressionAlwaysZero(loplugin::InstantiationData const & data): FilteringPlugin(data) {}
 
     virtual void run() override
     {
diff --git a/compilerplugins/clang/externvar.cxx b/compilerplugins/clang/externvar.cxx
index e8c66e556c3a..cc2c8fc7f4b0 100644
--- a/compilerplugins/clang/externvar.cxx
+++ b/compilerplugins/clang/externvar.cxx
@@ -41,10 +41,10 @@ bool hasExternalLinkage(VarDecl const * decl) {
     return true;
 }
 
-class ExternVar: public RecursiveASTVisitor<ExternVar>, public loplugin::Plugin
+class ExternVar: public loplugin::FilteringPlugin<ExternVar>
 {
 public:
-    explicit ExternVar(loplugin::InstantiationData const & data): Plugin(data)
+    explicit ExternVar(loplugin::InstantiationData const & data): FilteringPlugin(data)
     {}
 
     void run() override
diff --git a/compilerplugins/clang/finalprotected.cxx b/compilerplugins/clang/finalprotected.cxx
index 8032d0d5d743..e35f573fb979 100644
--- a/compilerplugins/clang/finalprotected.cxx
+++ b/compilerplugins/clang/finalprotected.cxx
@@ -21,11 +21,11 @@ namespace
 {
 
 class FinalProtected:
-    public RecursiveASTVisitor<FinalProtected>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<FinalProtected>
 {
 public:
     explicit FinalProtected(loplugin::InstantiationData const & data):
-        Plugin(data) {}
+        FilteringPlugin(data) {}
 
     virtual void run() override {
         TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
diff --git a/compilerplugins/clang/flatten.cxx b/compilerplugins/clang/flatten.cxx
index 40376d2e1678..e56d21603774 100644
--- a/compilerplugins/clang/flatten.cxx
+++ b/compilerplugins/clang/flatten.cxx
@@ -21,11 +21,11 @@
 namespace {
 
 class Flatten:
-    public RecursiveASTVisitor<Flatten>, public loplugin::RewritePlugin
+    public loplugin::FilteringRewritePlugin<Flatten>
 {
 public:
     explicit Flatten(loplugin::InstantiationData const & data):
-        RewritePlugin(data) {}
+        FilteringRewritePlugin(data) {}
 
     virtual void run() override
     {
diff --git a/compilerplugins/clang/fragiledestructor.cxx b/compilerplugins/clang/fragiledestructor.cxx
index 2c4b3235eb38..74f32aa165f6 100644
--- a/compilerplugins/clang/fragiledestructor.cxx
+++ b/compilerplugins/clang/fragiledestructor.cxx
@@ -22,11 +22,11 @@
 namespace {
 
 class FragileDestructor:
-    public RecursiveASTVisitor<FragileDestructor>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<FragileDestructor>
 {
 public:
     explicit FragileDestructor(loplugin::InstantiationData const & data):
-        Plugin(data) {}
+        FilteringPlugin(data) {}
 
     virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
 
diff --git a/compilerplugins/clang/nestedunnamed.cxx b/compilerplugins/clang/nestedunnamed.cxx
index c26f5aac8efd..4c8923eb402c 100644
--- a/compilerplugins/clang/nestedunnamed.cxx
+++ b/compilerplugins/clang/nestedunnamed.cxx
@@ -17,11 +17,11 @@
 
 namespace
 {
-class NestedUnnamed : public RecursiveASTVisitor<NestedUnnamed>, public loplugin::Plugin
+class NestedUnnamed : public loplugin::FilteringPlugin<NestedUnnamed>
 {
 public:
     explicit NestedUnnamed(loplugin::InstantiationData const& data)
-        : Plugin(data)
+        : FilteringPlugin(data)
     {
     }
 
diff --git a/compilerplugins/clang/overrideparam.cxx b/compilerplugins/clang/overrideparam.cxx
index 10e664c75326..39400566152b 100644
--- a/compilerplugins/clang/overrideparam.cxx
+++ b/compilerplugins/clang/overrideparam.cxx
@@ -26,11 +26,11 @@
 namespace {
 
 class OverrideParam:
-    public RecursiveASTVisitor<OverrideParam>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<OverrideParam>
 {
 public:
     explicit OverrideParam(loplugin::InstantiationData const & data):
-        Plugin(data) {}
+        FilteringPlugin(data) {}
 
     virtual void run() override;
 
diff --git a/compilerplugins/clang/passparamsbyref.cxx b/compilerplugins/clang/passparamsbyref.cxx
index d6ea67871b20..3c083db569a7 100644
--- a/compilerplugins/clang/passparamsbyref.cxx
+++ b/compilerplugins/clang/passparamsbyref.cxx
@@ -28,10 +28,10 @@
 namespace {
 
 class PassParamsByRef:
-    public RecursiveASTVisitor<PassParamsByRef>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<PassParamsByRef>
 {
 public:
-    explicit PassParamsByRef(loplugin::InstantiationData const & data): Plugin(data), mbInsideFunctionDecl(false) {}
+    explicit PassParamsByRef(loplugin::InstantiationData const & data): FilteringPlugin(data), mbInsideFunctionDecl(false) {}
 
     virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
 
diff --git a/compilerplugins/clang/pointerbool.cxx b/compilerplugins/clang/pointerbool.cxx
index 02fe6515aabd..bb5bdff136b5 100644
--- a/compilerplugins/clang/pointerbool.cxx
+++ b/compilerplugins/clang/pointerbool.cxx
@@ -23,11 +23,11 @@
 
 namespace
 {
-class PointerBool : public RecursiveASTVisitor<PointerBool>, public loplugin::Plugin
+class PointerBool : public loplugin::FilteringPlugin<PointerBool>
 {
 public:
     explicit PointerBool(loplugin::InstantiationData const& data)
-        : Plugin(data)
+        : FilteringPlugin(data)
     {
     }
 
diff --git a/compilerplugins/clang/redundantfcast.cxx b/compilerplugins/clang/redundantfcast.cxx
index 8a1e913c18d5..3dc99d633626 100644
--- a/compilerplugins/clang/redundantfcast.cxx
+++ b/compilerplugins/clang/redundantfcast.cxx
@@ -13,11 +13,11 @@
 
 namespace
 {
-class RedundantFCast final : public RecursiveASTVisitor<RedundantFCast>, public loplugin::Plugin
+class RedundantFCast final : public loplugin::FilteringPlugin<RedundantFCast>
 {
 public:
     explicit RedundantFCast(loplugin::InstantiationData const& data)
-        : Plugin(data)
+        : FilteringPlugin(data)
     {
     }
 
diff --git a/compilerplugins/clang/redundantinline.cxx b/compilerplugins/clang/redundantinline.cxx
index 70cdbd6fdce6..223f37ac98cb 100644
--- a/compilerplugins/clang/redundantinline.cxx
+++ b/compilerplugins/clang/redundantinline.cxx
@@ -14,11 +14,11 @@
 namespace {
 
 class RedundantInline:
-    public RecursiveASTVisitor<RedundantInline>, public loplugin::RewritePlugin
+    public loplugin::FilteringRewritePlugin<RedundantInline>
 {
 public:
     explicit RedundantInline(loplugin::InstantiationData const & data):
-        RewritePlugin(data) {}
+        FilteringRewritePlugin(data) {}
 
     void run() override {
         if (compiler.getLangOpts().CPlusPlus) {
diff --git a/compilerplugins/clang/redundantpointerops.cxx b/compilerplugins/clang/redundantpointerops.cxx
index 1c28052f046a..bbbc6651f32c 100644
--- a/compilerplugins/clang/redundantpointerops.cxx
+++ b/compilerplugins/clang/redundantpointerops.cxx
@@ -36,10 +36,10 @@
 namespace {
 
 class RedundantPointerOps:
-    public RecursiveASTVisitor<RedundantPointerOps>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<RedundantPointerOps>
 {
 public:
-    explicit RedundantPointerOps(loplugin::InstantiationData const & data): Plugin(data) {}
+    explicit RedundantPointerOps(loplugin::InstantiationData const & data): FilteringPlugin(data) {}
 
     virtual void run() override
     {
diff --git a/compilerplugins/clang/reservedid.cxx b/compilerplugins/clang/reservedid.cxx
index e3cb737cf6b5..f05890cda0a5 100644
--- a/compilerplugins/clang/reservedid.cxx
+++ b/compilerplugins/clang/reservedid.cxx
@@ -33,10 +33,10 @@ bool isJniFunction(NamedDecl const * decl) {
 }
 
 class ReservedId:
-    public RecursiveASTVisitor<ReservedId>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<ReservedId>
 {
 public:
-    explicit ReservedId(loplugin::InstantiationData const & data): Plugin(data)
+    explicit ReservedId(loplugin::InstantiationData const & data): FilteringPlugin(data)
     {}
 
     void run() override;
diff --git a/compilerplugins/clang/salcall.cxx b/compilerplugins/clang/salcall.cxx
index 2a6160162527..0048b907f552 100644
--- a/compilerplugins/clang/salcall.cxx
+++ b/compilerplugins/clang/salcall.cxx
@@ -51,11 +51,11 @@ CXXMethodDecl const* getTemplateInstantiationPattern(CXXMethodDecl const* decl)
     return p == nullptr ? decl : cast<CXXMethodDecl>(p);
 }
 
-class SalCall final : public RecursiveASTVisitor<SalCall>, public loplugin::RewritePlugin
+class SalCall final : public loplugin::FilteringRewritePlugin<SalCall>
 {
 public:
     explicit SalCall(loplugin::InstantiationData const& data)
-        : RewritePlugin(data)
+        : FilteringRewritePlugin(data)
     {
     }
 
diff --git a/compilerplugins/clang/salunicodeliteral.cxx b/compilerplugins/clang/salunicodeliteral.cxx
index cf06b6ccaad7..bdf83694b77e 100644
--- a/compilerplugins/clang/salunicodeliteral.cxx
+++ b/compilerplugins/clang/salunicodeliteral.cxx
@@ -20,11 +20,11 @@ bool isAsciiCharacterLiteral(Expr const * expr) {
 }
 
 class SalUnicodeLiteral final:
-    public RecursiveASTVisitor<SalUnicodeLiteral>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<SalUnicodeLiteral>
 {
 public:
     explicit SalUnicodeLiteral(loplugin::InstantiationData const & data):
-        Plugin(data) {}
+        FilteringPlugin(data) {}
 
     bool VisitCXXStaticCastExpr(CXXStaticCastExpr const * expr) {
         check(expr);
diff --git a/compilerplugins/clang/simplifydynamiccast.cxx b/compilerplugins/clang/simplifydynamiccast.cxx
index a82976c7ae27..b1f06179ee71 100644
--- a/compilerplugins/clang/simplifydynamiccast.cxx
+++ b/compilerplugins/clang/simplifydynamiccast.cxx
@@ -19,11 +19,11 @@
 
 namespace
 {
-class SimplifyDynamicCast : public RecursiveASTVisitor<SimplifyDynamicCast>, public loplugin::Plugin
+class SimplifyDynamicCast : public loplugin::FilteringPlugin<SimplifyDynamicCast>
 {
 public:
     explicit SimplifyDynamicCast(loplugin::InstantiationData const& data)
-        : Plugin(data)
+        : FilteringPlugin(data)
     {
     }
 
diff --git a/compilerplugins/clang/staticaccess.cxx b/compilerplugins/clang/staticaccess.cxx
index c48861978d61..6b15bfb15349 100644
--- a/compilerplugins/clang/staticaccess.cxx
+++ b/compilerplugins/clang/staticaccess.cxx
@@ -43,11 +43,11 @@ bool isStatic(ValueDecl const * decl, bool * memberEnumerator) {
 }
 
 class StaticAccess:
-    public RecursiveASTVisitor<StaticAccess>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<StaticAccess>
 {
 public:
     explicit StaticAccess(loplugin::InstantiationData const & data):
-        Plugin(data) {}
+        FilteringPlugin(data) {}
 
     void run() override
     { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
diff --git a/compilerplugins/clang/staticanonymous.cxx b/compilerplugins/clang/staticanonymous.cxx
index 0fcb15000a3d..f31499af6f73 100644
--- a/compilerplugins/clang/staticanonymous.cxx
+++ b/compilerplugins/clang/staticanonymous.cxx
@@ -17,8 +17,7 @@ namespace loplugin
 {
 
 class StaticAnonymous
-    : public RecursiveASTVisitor< StaticAnonymous >
-    , public Plugin
+    : public loplugin::FilteringPlugin<StaticAnonymous>
     {
     public:
         explicit StaticAnonymous( const InstantiationData& data );
@@ -28,7 +27,7 @@ class StaticAnonymous
     };
 
 StaticAnonymous::StaticAnonymous( const InstantiationData& data )
-    : Plugin( data )
+    : FilteringPlugin( data )
     {
     }
 
diff --git a/compilerplugins/clang/store/badvectorinit.cxx b/compilerplugins/clang/store/badvectorinit.cxx
index a793c96346a8..68cba18de580 100644
--- a/compilerplugins/clang/store/badvectorinit.cxx
+++ b/compilerplugins/clang/store/badvectorinit.cxx
@@ -85,10 +85,10 @@ namespace {
 
 
 class BadVectorInit:
-    public RecursiveASTVisitor<BadVectorInit>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<BadVectorInit>
 {
 public:
-    explicit BadVectorInit(InstantiationData const & data): Plugin(data) {}
+    explicit BadVectorInit(InstantiationData const & data): FilteringPlugin(data) {}
 
     virtual void run() override
     {
diff --git a/compilerplugins/clang/store/bodynotinblock.hxx b/compilerplugins/clang/store/bodynotinblock.hxx
index 4cce9c189e11..e5f0dc49f428 100644
--- a/compilerplugins/clang/store/bodynotinblock.hxx
+++ b/compilerplugins/clang/store/bodynotinblock.hxx
@@ -18,8 +18,7 @@ namespace loplugin
 {
 
 class BodyNotInBlock
-    : public RecursiveASTVisitor< BodyNotInBlock >
-    , public Plugin
+    : public loplugin::FilteringPlugin<BodyNotInBlock>
     {
     public:
         explicit BodyNotInBlock( const InstantiationData& data );
diff --git a/compilerplugins/clang/store/deadclass.cxx b/compilerplugins/clang/store/deadclass.cxx
index 1aaac2a8d09b..f055d6de2830 100644
--- a/compilerplugins/clang/store/deadclass.cxx
+++ b/compilerplugins/clang/store/deadclass.cxx
@@ -12,10 +12,10 @@
 namespace {
 
 class DeadClass:
-    public RecursiveASTVisitor<DeadClass>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<DeadClass>
 {
 public:
-    explicit DeadClass(InstantiationData const & data): Plugin(data) {}
+    explicit DeadClass(InstantiationData const & data): FilteringPlugin(data) {}
 
     void run() override;
 
diff --git a/compilerplugins/clang/store/defaultparams.cxx b/compilerplugins/clang/store/defaultparams.cxx
index 7755b3749661..71a637e72c04 100644
--- a/compilerplugins/clang/store/defaultparams.cxx
+++ b/compilerplugins/clang/store/defaultparams.cxx
@@ -18,10 +18,10 @@
 namespace {
 
 class DefaultParams:
-    public RecursiveASTVisitor<DefaultParams>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<DefaultParams>
 {
 public:
-    explicit DefaultParams(InstantiationData const & data): Plugin(data) {}
+    explicit DefaultParams(InstantiationData const & data): FilteringPlugin(data) {}
 
     virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
 
diff --git a/compilerplugins/clang/store/fpcomparison.cxx b/compilerplugins/clang/store/fpcomparison.cxx
index 0e27ed9819f4..8ad5d4c3b9e6 100644
--- a/compilerplugins/clang/store/fpcomparison.cxx
+++ b/compilerplugins/clang/store/fpcomparison.cxx
@@ -23,11 +23,11 @@ comparing floating point numbers using == or != is a bad idea.
 namespace {
 
 class FpComparison:
-    public RecursiveASTVisitor<FpComparison>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<FpComparison>
 {
 public:
     explicit FpComparison(loplugin::InstantiationData const & data):
-        Plugin(data) {}
+        FilteringPlugin(data) {}
 
     virtual void run() override
     {
diff --git a/compilerplugins/clang/store/returnbyref.cxx b/compilerplugins/clang/store/returnbyref.cxx
index 51723c0f40a4..697ab752909d 100644
--- a/compilerplugins/clang/store/returnbyref.cxx
+++ b/compilerplugins/clang/store/returnbyref.cxx
@@ -25,10 +25,10 @@
 namespace {
 
 class ReturnByRef:
-    public RecursiveASTVisitor<ReturnByRef>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<ReturnByRef>
 {
 public:
-    explicit ReturnByRef(InstantiationData const & data): Plugin(data) {}
+    explicit ReturnByRef(InstantiationData const & data): FilteringPlugin(data) {}
 
     virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
 
diff --git a/compilerplugins/clang/store/sfxitemsetrewrite.cxx b/compilerplugins/clang/store/sfxitemsetrewrite.cxx
index 4e3d7c81d322..e1fa52209b02 100644
--- a/compilerplugins/clang/store/sfxitemsetrewrite.cxx
+++ b/compilerplugins/clang/store/sfxitemsetrewrite.cxx
@@ -20,10 +20,10 @@ namespace {
 bool gap(APSInt n1, APSInt n2) { return n1 < n2 && n2 - n1 > 1; }
 
 class Visitor final:
-    public RecursiveASTVisitor<Visitor>, public loplugin::RewritePlugin
+    public loplugin::FilteringRewritePlugin<Visitor>
 {
 public:
-    explicit Visitor(InstantiationData const & data): RewritePlugin(data) {}
+    explicit Visitor(InstantiationData const & data): FilteringRewritePlugin(data) {}
 
     bool VisitCXXConstructExpr(CXXConstructExpr const * expr) {
         if (ignoreLocation(expr)) {
diff --git a/compilerplugins/clang/store/stylepolice.cxx b/compilerplugins/clang/store/stylepolice.cxx
index 7a2e94c802ff..2c0ac68c2e4c 100644
--- a/compilerplugins/clang/store/stylepolice.cxx
+++ b/compilerplugins/clang/store/stylepolice.cxx
@@ -23,10 +23,10 @@
 namespace {
 
 class StylePolice :
-    public RecursiveASTVisitor<StylePolice>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<StylePolice>
 {
 public:
-    explicit StylePolice(InstantiationData const & data): Plugin(data) {}
+    explicit StylePolice(InstantiationData const & data): FilteringPlugin(data) {}
 
     virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
 
diff --git a/compilerplugins/clang/subtlezeroinit.cxx b/compilerplugins/clang/subtlezeroinit.cxx
index 5e98bfcccc59..aa0a3dd72d13 100644
--- a/compilerplugins/clang/subtlezeroinit.cxx
+++ b/compilerplugins/clang/subtlezeroinit.cxx
@@ -18,11 +18,11 @@
 namespace {
 
 class SubtleZeroInit final:
-    public RecursiveASTVisitor<SubtleZeroInit>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<SubtleZeroInit>
 {
 public:
     explicit SubtleZeroInit(loplugin::InstantiationData const & data):
-        Plugin(data) {}
+        FilteringPlugin(data) {}
 
     bool VisitCXXNewExpr(CXXNewExpr const * expr) {
         if (ignoreLocation(expr)) {
diff --git a/compilerplugins/clang/unicodetochar.cxx b/compilerplugins/clang/unicodetochar.cxx
index 85d74e405eb3..19a7aeb3ebb9 100644
--- a/compilerplugins/clang/unicodetochar.cxx
+++ b/compilerplugins/clang/unicodetochar.cxx
@@ -18,11 +18,11 @@
 namespace {
 
 class UnicodeToChar final:
-    public RecursiveASTVisitor<UnicodeToChar>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<UnicodeToChar>
 {
 public:
     explicit UnicodeToChar(loplugin::InstantiationData const & data):
-        Plugin(data) {}
+        FilteringPlugin(data) {}
 
     bool TraverseCStyleCastExpr(CStyleCastExpr * expr) {
         subExprs_.push(expr->getSubExpr());
diff --git a/compilerplugins/clang/unnecessarycatchthrow.cxx b/compilerplugins/clang/unnecessarycatchthrow.cxx
index 4dff6ae852d9..73cb01456a40 100644
--- a/compilerplugins/clang/unnecessarycatchthrow.cxx
+++ b/compilerplugins/clang/unnecessarycatchthrow.cxx
@@ -29,10 +29,10 @@ look for unnecessary blocks that just catch and rethrow:
 namespace {
 
 class UnnecessaryCatchThrow:
-    public RecursiveASTVisitor<UnnecessaryCatchThrow>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<UnnecessaryCatchThrow>
 {
 public:
-    explicit UnnecessaryCatchThrow(loplugin::InstantiationData const & data): Plugin(data) {}
+    explicit UnnecessaryCatchThrow(loplugin::InstantiationData const & data): FilteringPlugin(data) {}
 
     virtual void run() override
     {
diff --git a/compilerplugins/clang/unnecessaryoverride.cxx b/compilerplugins/clang/unnecessaryoverride.cxx
index 09361730a302..f906621a2844 100644
--- a/compilerplugins/clang/unnecessaryoverride.cxx
+++ b/compilerplugins/clang/unnecessaryoverride.cxx
@@ -64,10 +64,10 @@ bool hasMultipleBaseInstances(
 }
 
 class UnnecessaryOverride:
-    public RecursiveASTVisitor<UnnecessaryOverride>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<UnnecessaryOverride>
 {
 public:
-    explicit UnnecessaryOverride(loplugin::InstantiationData const & data): Plugin(data) {}
+    explicit UnnecessaryOverride(loplugin::InstantiationData const & data): FilteringPlugin(data) {}
 
     virtual void run() override
     {
diff --git a/compilerplugins/clang/unnecessaryparen.cxx b/compilerplugins/clang/unnecessaryparen.cxx
index f2e67cfefb2c..1a26ed21c7fb 100644
--- a/compilerplugins/clang/unnecessaryparen.cxx
+++ b/compilerplugins/clang/unnecessaryparen.cxx
@@ -59,11 +59,11 @@ Expr const * ignoreAllImplicit(Expr const * expr) {
 }
 
 class UnnecessaryParen:
-    public RecursiveASTVisitor<UnnecessaryParen>, public loplugin::RewritePlugin
+    public loplugin::FilteringRewritePlugin<UnnecessaryParen>
 {
 public:
     explicit UnnecessaryParen(loplugin::InstantiationData const & data):
-        RewritePlugin(data) {}
+        FilteringRewritePlugin(data) {}
 
     virtual void run() override
     {
diff --git a/compilerplugins/clang/unoany.cxx b/compilerplugins/clang/unoany.cxx
index 1272ed409964..07b9da435752 100644
--- a/compilerplugins/clang/unoany.cxx
+++ b/compilerplugins/clang/unoany.cxx
@@ -12,10 +12,10 @@
 
 
 class UnoAny:
-    public RecursiveASTVisitor<UnoAny>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<UnoAny>
 {
 public:
-    explicit UnoAny(loplugin::InstantiationData const & data): Plugin(data) {}
+    explicit UnoAny(loplugin::InstantiationData const & data): FilteringPlugin(data) {}
 
     void run() override {
         TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
diff --git a/compilerplugins/clang/unusedenumconstants.cxx b/compilerplugins/clang/unusedenumconstants.cxx
index 8a0aaace2669..b106d308fdb5 100644
--- a/compilerplugins/clang/unusedenumconstants.cxx
+++ b/compilerplugins/clang/unusedenumconstants.cxx
@@ -59,10 +59,10 @@ static std::set<MyFieldInfo> readSet;
 
 
 class UnusedEnumConstants:
-    public RecursiveASTVisitor<UnusedEnumConstants>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<UnusedEnumConstants>
 {
 public:
-    explicit UnusedEnumConstants(loplugin::InstantiationData const & data): Plugin(data) {}
+    explicit UnusedEnumConstants(loplugin::InstantiationData const & data): FilteringPlugin(data) {}
 
     virtual void run() override
     {
diff --git a/compilerplugins/clang/unusedindex.cxx b/compilerplugins/clang/unusedindex.cxx
index ba57705afcf8..a47d55b0fd0a 100644
--- a/compilerplugins/clang/unusedindex.cxx
+++ b/compilerplugins/clang/unusedindex.cxx
@@ -24,11 +24,11 @@
 */
 namespace
 {
-class UnusedIndex : public RecursiveASTVisitor<UnusedIndex>, public loplugin::Plugin
+class UnusedIndex : public loplugin::FilteringPlugin<UnusedIndex>
 {
 public:
     explicit UnusedIndex(loplugin::InstantiationData const& data)
-        : Plugin(data)
+        : FilteringPlugin(data)
     {
     }
 
diff --git a/compilerplugins/clang/unusedvariablemore.cxx b/compilerplugins/clang/unusedvariablemore.cxx
index fa2ff366052b..2e8b69224aa5 100644
--- a/compilerplugins/clang/unusedvariablemore.cxx
+++ b/compilerplugins/clang/unusedvariablemore.cxx
@@ -33,7 +33,7 @@ namespace loplugin
   so it is off by default.
 */
 
-class UnusedVariableMore : public RecursiveASTVisitor<UnusedVariableMore>, public Plugin
+class UnusedVariableMore : public loplugin::FilteringPlugin<UnusedVariableMore>
 {
 public:
     explicit UnusedVariableMore(const InstantiationData& data);
@@ -52,7 +52,7 @@ private:
 };
 
 UnusedVariableMore::UnusedVariableMore(const InstantiationData& data)
-    : Plugin(data)
+    : FilteringPlugin(data)
 {
 }
 
diff --git a/compilerplugins/clang/useuniqueptr.cxx b/compilerplugins/clang/useuniqueptr.cxx
index c13e12186c49..3038447964bb 100644
--- a/compilerplugins/clang/useuniqueptr.cxx
+++ b/compilerplugins/clang/useuniqueptr.cxx
@@ -24,11 +24,11 @@
 namespace {
 
 class UseUniquePtr:
-    public RecursiveASTVisitor<UseUniquePtr>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<UseUniquePtr>
 {
 public:
     explicit UseUniquePtr(loplugin::InstantiationData const & data):
-        Plugin(data) {}
+        FilteringPlugin(data) {}
 
     virtual void run() override
     {
diff --git a/compilerplugins/clang/virtualdown.cxx b/compilerplugins/clang/virtualdown.cxx
index 8c7ef41494d9..0bc9bf491148 100644
--- a/compilerplugins/clang/virtualdown.cxx
+++ b/compilerplugins/clang/virtualdown.cxx
@@ -42,11 +42,11 @@ bool operator<(const MyFuncInfo& lhs, const MyFuncInfo& rhs) { return lhs.name <
 static std::set<MyFuncInfo> definitionSet;
 static std::set<std::string> callSet;
 
-class VirtualDown : public RecursiveASTVisitor<VirtualDown>, public loplugin::Plugin
+class VirtualDown : public loplugin::FilteringPlugin<VirtualDown>
 {
 public:
     explicit VirtualDown(loplugin::InstantiationData const& data)
-        : Plugin(data)
+        : FilteringPlugin(data)
     {
     }
 


More information about the Libreoffice-commits mailing list