change some clang plugins to FilteringPlugins
As far as I can tell these do not need to scan everything, so the filtering (and faster) base plugin is sufficient. Change-Id: I0912a730bb5ec9670d1faa5c83f573902118cc95 Reviewed-on: https://gerrit.libreoffice.org/68872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
committed by
Noel Grandin
parent
99f25bc344
commit
a62ad33b0e
@@ -79,11 +79,11 @@ StringRef vis(Visibility v) {
|
||||
}
|
||||
|
||||
class DynCastVisibility final:
|
||||
public RecursiveASTVisitor<DynCastVisibility>, public loplugin::Plugin
|
||||
public loplugin::FilteringPlugin<DynCastVisibility>
|
||||
{
|
||||
public:
|
||||
explicit DynCastVisibility(loplugin::InstantiationData const & data):
|
||||
Plugin(data) {}
|
||||
FilteringPlugin(data) {}
|
||||
|
||||
bool shouldVisitTemplateInstantiations() const { return true; }
|
||||
|
||||
|
@@ -18,11 +18,11 @@
|
||||
|
||||
namespace
|
||||
{
|
||||
class SimplifyConstruct : public RecursiveASTVisitor<SimplifyConstruct>, public loplugin::Plugin
|
||||
class SimplifyConstruct : public loplugin::FilteringPlugin<SimplifyConstruct>
|
||||
{
|
||||
public:
|
||||
explicit SimplifyConstruct(loplugin::InstantiationData const& data)
|
||||
: Plugin(data)
|
||||
: FilteringPlugin(data)
|
||||
{
|
||||
}
|
||||
|
||||
|
@@ -22,13 +22,12 @@
|
||||
namespace {
|
||||
|
||||
class StringStatic
|
||||
: public clang::RecursiveASTVisitor<StringStatic>
|
||||
, public loplugin::Plugin
|
||||
: public loplugin::FilteringPlugin<StringStatic>
|
||||
{
|
||||
|
||||
public:
|
||||
explicit StringStatic(loplugin::InstantiationData const& rData):
|
||||
Plugin(rData) {}
|
||||
FilteringPlugin(rData) {}
|
||||
|
||||
void run() override;
|
||||
bool VisitVarDecl(VarDecl const*);
|
||||
|
@@ -19,12 +19,11 @@
|
||||
namespace {
|
||||
|
||||
class WeakObject
|
||||
: public clang::RecursiveASTVisitor<WeakObject>
|
||||
, public loplugin::Plugin
|
||||
: public loplugin::FilteringPlugin<WeakObject>
|
||||
{
|
||||
|
||||
public:
|
||||
explicit WeakObject(loplugin::InstantiationData const& rData): Plugin(rData)
|
||||
explicit WeakObject(loplugin::InstantiationData const& rData): FilteringPlugin(rData)
|
||||
{}
|
||||
|
||||
void run() override {
|
||||
|
Reference in New Issue
Block a user