diff options
Diffstat (limited to 'compilerplugins/clang/weakbase.cxx')
-rw-r--r-- | compilerplugins/clang/weakbase.cxx | 19 |
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: */ |