summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorJan Holesovsky <kendy@collabora.com>2015-05-14 10:51:49 +0200
committerJan Holesovsky <kendy@collabora.com>2015-05-14 10:51:49 +0200
commit80cf5251e3e6003c73b1db8667a6cdf252664aea (patch)
treec0fad9eed78af681227f7278c627891f5f470fb5 /compilerplugins
parent117c728593ee4596357cdf46741d326999209bb3 (diff)
loplugin rendercontext: No param => no check.
Change-Id: I30c8624fa00338c9cca7a054e08eacfc4fd6a630
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/rendercontext.cxx2
1 files changed, 2 insertions, 0 deletions
diff --git a/compilerplugins/clang/rendercontext.cxx b/compilerplugins/clang/rendercontext.cxx
index 24aaa081a99b..cc2a945769c3 100644
--- a/compilerplugins/clang/rendercontext.cxx
+++ b/compilerplugins/clang/rendercontext.cxx
@@ -57,6 +57,8 @@ bool RenderContext::TraverseFunctionDecl(const FunctionDecl * pFunctionDecl)
return true;
}
// we are only currently interested in methods where the first parameter is RenderContext
+ if (pFunctionDecl->getNumParams() == 0)
+ return true;
string arg0 = pFunctionDecl->getParamDecl( 0 )->getType().getAsString();
if ( arg0.find("RenderContext") != std::string::npos ) {
return true;