diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-13 17:24:26 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-08-14 13:02:14 +0200 |
commit | 9f4d23c15115d64febd6bf01f870cc157badd350 (patch) | |
tree | 6bc1724f580291d42d62815d9ba84c7d2245b0ad /compilerplugins/clang/externandnotdefined.cxx | |
parent | 4917430c1c5e8105987e81d65d31df21955ad60e (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/externandnotdefined.cxx')
-rw-r--r-- | compilerplugins/clang/externandnotdefined.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compilerplugins/clang/externandnotdefined.cxx b/compilerplugins/clang/externandnotdefined.cxx index 97dff5a8dfa3..faf6bffb136c 100644 --- a/compilerplugins/clang/externandnotdefined.cxx +++ b/compilerplugins/clang/externandnotdefined.cxx @@ -17,10 +17,10 @@ namespace { class ExternAndNotDefined: - public RecursiveASTVisitor<ExternAndNotDefined>, public loplugin::Plugin + public loplugin::FilteringPlugin<ExternAndNotDefined> { public: - explicit ExternAndNotDefined(loplugin::InstantiationData const & data): Plugin(data) {} + explicit ExternAndNotDefined(loplugin::InstantiationData const & data): FilteringPlugin(data) {} virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } |