diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2019-03-05 16:15:22 +0100 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2019-03-11 19:44:33 +0100 |
commit | a62ad33b0eb1dac70f91a409d11ac1bcdb624842 (patch) | |
tree | 397d5c38a4a66bbfe5334bb03ac861394a328203 /compilerplugins | |
parent | 99f25bc344e931e66366e20664a23dc263fe3113 (diff) |
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@collabora.co.uk>
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/dyncastvisibility.cxx | 4 | ||||
-rw-r--r-- | compilerplugins/clang/simplifyconstruct.cxx | 4 | ||||
-rw-r--r-- | compilerplugins/clang/stringstatic.cxx | 5 | ||||
-rw-r--r-- | compilerplugins/clang/weakobject.cxx | 5 |
4 files changed, 8 insertions, 10 deletions
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 { |