summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/ptrvector.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-16 13:05:34 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-16 21:31:22 +0200
commit40fc30d05d9cce7ce7a9cdcb718dcb0f0aab8ac7 (patch)
treec856f18770e4183bdaff9760124d96a464e84ce6 /compilerplugins/clang/ptrvector.cxx
parent70c6651e02c4582d66d8e1c1286406c4f01a7d4b (diff)
convert some plugins to LO_CLANG_SHARED_PLUGINS
Change-Id: I63c9e010d83c24e18a36164ceb0441e48b757142 Reviewed-on: https://gerrit.libreoffice.org/75725 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins/clang/ptrvector.cxx')
-rw-r--r--compilerplugins/clang/ptrvector.cxx10
1 files changed, 7 insertions, 3 deletions
diff --git a/compilerplugins/clang/ptrvector.cxx b/compilerplugins/clang/ptrvector.cxx
index ed0893e3558f..758e3e90f34c 100644
--- a/compilerplugins/clang/ptrvector.cxx
+++ b/compilerplugins/clang/ptrvector.cxx
@@ -6,6 +6,7 @@
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
+#ifndef LO_CLANG_SHARED_PLUGINS
#include <memory>
#include <cassert>
@@ -33,7 +34,8 @@ public:
virtual void run() override
{
- TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
+ if (preRun())
+ TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
}
bool shouldVisitTemplateInstantiations () const { return true; }
@@ -80,8 +82,10 @@ bool PtrVector::VisitCXXOperatorCallExpr(const CXXOperatorCallExpr* expr)
}
-loplugin::Plugin::Registration< PtrVector > X("ptrvector");
+loplugin::Plugin::Registration< PtrVector > ptrvector("ptrvector");
-}
+} // namespace
+
+#endif // LO_CLANG_SHARED_PLUGINS
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */