summaryrefslogtreecommitdiffstats
path: root/compilerplugins/clang/redundantcast.cxx
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/redundantcast.cxx
parenttdf#116542 a11y: introduce STATIC role (diff)
downloadcore-9f4d23c15115d64febd6bf01f870cc157badd350.tar.gz
core-9f4d23c15115d64febd6bf01f870cc157badd350.zip
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/redundantcast.cxx')
-rw-r--r--compilerplugins/clang/redundantcast.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/compilerplugins/clang/redundantcast.cxx b/compilerplugins/clang/redundantcast.cxx
index ad7818f4a981..d390a7e15ccc 100644
--- a/compilerplugins/clang/redundantcast.cxx
+++ b/compilerplugins/clang/redundantcast.cxx
@@ -78,11 +78,11 @@ AlgebraicType algebraicType(clang::Type const & type) {
}
class RedundantCast:
- public RecursiveASTVisitor<RedundantCast>, public loplugin::RewritePlugin
+ public loplugin::FilteringRewritePlugin<RedundantCast>
{
public:
explicit RedundantCast(loplugin::InstantiationData const & data):
- RewritePlugin(data)
+ FilteringRewritePlugin(data)
{}
virtual void run() override {