summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/constparams.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2019-11-11 15:55:49 +0100
committerNoel Grandin <noel.grandin@collabora.co.uk>2019-11-11 17:29:06 +0100
commita0c30af2ac83eb0f7e76c336d60a31872db19938 (patch)
treed2a232ef0c5a4812eac1efd7d3580327d2b05872 /compilerplugins/clang/constparams.cxx
parent19e96dc1569ea66acb668554daab9bebc6ad973b (diff)
Make base of loplugin::FunctionAddress more flexible
(I'm planning to use it for a FilteringRewritePlugin.) And while at it, base its current uses on FilteringPlugin. Change-Id: I0acdcc6cb0b3a434b425405c8c438dbf65e4d3cb Reviewed-on: https://gerrit.libreoffice.org/82451 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins/clang/constparams.cxx')
-rw-r--r--compilerplugins/clang/constparams.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/compilerplugins/clang/constparams.cxx b/compilerplugins/clang/constparams.cxx
index 388c813de18a..28179f30abae 100644
--- a/compilerplugins/clang/constparams.cxx
+++ b/compilerplugins/clang/constparams.cxx
@@ -28,10 +28,10 @@ namespace
{
class ConstParams:
- public loplugin::FunctionAddress<ConstParams>
+ public loplugin::FunctionAddress<loplugin::FilteringPlugin<ConstParams>>
{
public:
- explicit ConstParams(loplugin::InstantiationData const & data): loplugin::FunctionAddress<ConstParams>(data) {}
+ explicit ConstParams(loplugin::InstantiationData const & data): FunctionAddress(data) {}
virtual void run() override {
std::string fn(handler.getMainFileName());
@@ -110,7 +110,7 @@ bool ConstParams::TraverseFunctionDecl(FunctionDecl * functionDecl)
auto prev = currentFunctionDecl;
if (CheckTraverseFunctionDecl(functionDecl))
currentFunctionDecl = functionDecl;
- auto rv = loplugin::FunctionAddress<ConstParams>::TraverseFunctionDecl(functionDecl);
+ auto rv = FunctionAddress::TraverseFunctionDecl(functionDecl);
currentFunctionDecl = prev;
return rv;
}
@@ -119,7 +119,7 @@ bool ConstParams::TraverseCXXMethodDecl(CXXMethodDecl * f)
auto prev = currentFunctionDecl;
if (CheckTraverseFunctionDecl(f))
currentFunctionDecl = f;
- auto rv = loplugin::FunctionAddress<ConstParams>::TraverseCXXMethodDecl(f);
+ auto rv = FunctionAddress::TraverseCXXMethodDecl(f);
currentFunctionDecl = prev;
return rv;
}
@@ -128,7 +128,7 @@ bool ConstParams::TraverseCXXConstructorDecl(CXXConstructorDecl * f)
auto prev = currentFunctionDecl;
if (CheckTraverseFunctionDecl(f))
currentFunctionDecl = f;
- auto rv = loplugin::FunctionAddress<ConstParams>::TraverseCXXConstructorDecl(f);
+ auto rv = FunctionAddress::TraverseCXXConstructorDecl(f);
currentFunctionDecl = prev;
return rv;
}