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

Libreoffice Gerrit user logerrit at kemper.freedesktop.org
Mon Mar 11 18:44:59 UTC 2019


 compilerplugins/clang/dyncastvisibility.cxx |    4 ++--
 compilerplugins/clang/simplifyconstruct.cxx |    4 ++--
 compilerplugins/clang/stringstatic.cxx      |    5 ++---
 compilerplugins/clang/weakobject.cxx        |    5 ++---
 4 files changed, 8 insertions(+), 10 deletions(-)

New commits:
commit a62ad33b0eb1dac70f91a409d11ac1bcdb624842
Author:     Luboš Luňák <l.lunak at collabora.com>
AuthorDate: Tue Mar 5 16:15:22 2019 +0100
Commit:     Noel Grandin <noel.grandin at collabora.co.uk>
CommitDate: Mon Mar 11 19:44:33 2019 +0100

    change some clang plugins to FilteringPlugins
    
    As far as I can tell these do not need to scan everything, so the filtering
    (and faster) base plugin is sufficient.
    
    Change-Id: I0912a730bb5ec9670d1faa5c83f573902118cc95
    Reviewed-on: https://gerrit.libreoffice.org/68872
    Tested-by: Jenkins
    Reviewed-by: Noel Grandin <noel.grandin at collabora.co.uk>

diff --git a/compilerplugins/clang/dyncastvisibility.cxx b/compilerplugins/clang/dyncastvisibility.cxx
index 6a1d84d91d3e..8b29f0735ca9 100644
--- a/compilerplugins/clang/dyncastvisibility.cxx
+++ b/compilerplugins/clang/dyncastvisibility.cxx
@@ -79,11 +79,11 @@ StringRef vis(Visibility v) {
 }
 
 class DynCastVisibility final:
-    public RecursiveASTVisitor<DynCastVisibility>, public loplugin::Plugin
+    public loplugin::FilteringPlugin<DynCastVisibility>
 {
 public:
     explicit DynCastVisibility(loplugin::InstantiationData const & data):
-        Plugin(data) {}
+        FilteringPlugin(data) {}
 
     bool shouldVisitTemplateInstantiations() const { return true; }
 
diff --git a/compilerplugins/clang/simplifyconstruct.cxx b/compilerplugins/clang/simplifyconstruct.cxx
index 172a1bd48029..b48764302eae 100644
--- a/compilerplugins/clang/simplifyconstruct.cxx
+++ b/compilerplugins/clang/simplifyconstruct.cxx
@@ -18,11 +18,11 @@
 
 namespace
 {
-class SimplifyConstruct : public RecursiveASTVisitor<SimplifyConstruct>, public loplugin::Plugin
+class SimplifyConstruct : public loplugin::FilteringPlugin<SimplifyConstruct>
 {
 public:
     explicit SimplifyConstruct(loplugin::InstantiationData const& data)
-        : Plugin(data)
+        : FilteringPlugin(data)
     {
     }
 
diff --git a/compilerplugins/clang/stringstatic.cxx b/compilerplugins/clang/stringstatic.cxx
index 7fa14c0766c7..1a46fdd3dee8 100644
--- a/compilerplugins/clang/stringstatic.cxx
+++ b/compilerplugins/clang/stringstatic.cxx
@@ -22,13 +22,12 @@
 namespace {
 
 class StringStatic
-    : public clang::RecursiveASTVisitor<StringStatic>
-    , public loplugin::Plugin
+    : public loplugin::FilteringPlugin<StringStatic>
 {
 
 public:
     explicit StringStatic(loplugin::InstantiationData const& rData):
-        Plugin(rData) {}
+        FilteringPlugin(rData) {}
 
     void run() override;
     bool VisitVarDecl(VarDecl const*);
diff --git a/compilerplugins/clang/weakobject.cxx b/compilerplugins/clang/weakobject.cxx
index 70e81baa411a..1f801d6acdd2 100644
--- a/compilerplugins/clang/weakobject.cxx
+++ b/compilerplugins/clang/weakobject.cxx
@@ -19,12 +19,11 @@
 namespace {
 
 class WeakObject
-    : public clang::RecursiveASTVisitor<WeakObject>
-    , public loplugin::Plugin
+    : public loplugin::FilteringPlugin<WeakObject>
 {
 
 public:
-    explicit WeakObject(loplugin::InstantiationData const& rData): Plugin(rData)
+    explicit WeakObject(loplugin::InstantiationData const& rData): FilteringPlugin(rData)
     {}
 
     void run() override {


More information about the Libreoffice-commits mailing list