make some plugins used the shared framework

Change-Id: Ie283a4774564f25e0fde8ca35212f92be786d671
Reviewed-on: https://gerrit.libreoffice.org/75785
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2019-07-17 15:06:43 +02:00
parent 7598810d63
commit dd969ad6e0
16 changed files with 428 additions and 101 deletions

View File

@@ -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 "check.hxx"
#include "compat.hxx"
@@ -68,17 +69,21 @@ public:
return true;
}
private:
bool preRun() override { return compiler.getLangOpts().CPlusPlus; }
void run() override
{
if (compiler.getLangOpts().CPlusPlus)
if (preRun())
{
TraverseDecl(compiler.getASTContext().getTranslationUnitDecl());
}
}
};
static loplugin::Plugin::Registration<Data> reg("data");
}
static loplugin::Plugin::Registration<Data> data("data");
} // namespace
#endif // LO_CLANG_SHARED_PLUGINS
/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */