summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/weakbase.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2019-07-15 18:18:57 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-07-15 18:18:57 +0200
commit574db10513be6b25f24c8cab49cbc9e63aca87d3 (patch)
treef56f03a03a935daf09adf5c7a8540b12d37e6a29 /compilerplugins/clang/weakbase.cxx
parent48480d4f19d2fb92ca4ae0527eec4753cdc439c0 (diff)
Revert "convert some plugins to use the sharedplugin infrastructure"
This reverts commit fc1b213d157afa57704cec5a0fb65ae8c11d7822. I didn't convert these correctly, the Traverse calls need adjusting.
Diffstat (limited to 'compilerplugins/clang/weakbase.cxx')
-rw-r--r--compilerplugins/clang/weakbase.cxx19
1 files changed, 3 insertions, 16 deletions
diff --git a/compilerplugins/clang/weakbase.cxx b/compilerplugins/clang/weakbase.cxx
index a0040dd37c30..fbd72955c0ba 100644
--- a/compilerplugins/clang/weakbase.cxx
+++ b/compilerplugins/clang/weakbase.cxx
@@ -7,8 +7,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
-#ifndef LO_CLANG_SHARED_PLUGINS
-
#include <string>
#include <iostream>
#include <map>
@@ -30,15 +28,7 @@ public:
{
}
- bool preRun() override { return compiler.getLangOpts().CPlusPlus; }
-
- void run() override
- {
- if (preRun())
- {
- TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
- }
- }
+ virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); }
bool VisitCXXRecordDecl(CXXRecordDecl const*);
};
@@ -114,10 +104,7 @@ bool WeakBase::VisitCXXRecordDecl(CXXRecordDecl const* recordDecl)
return true;
}
-loplugin::Plugin::Registration<WeakBase> weakbase("weakbase");
-
-} // namespace
-
-#endif // LO_CLANG_SHARED_PLUGINS
+loplugin::Plugin::Registration<WeakBase> WeakBase("weakbase", true);
+}
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */