[Libreoffice-commits] core.git: compilerplugins/clang

Jan Holesovsky kendy at collabora.com
Thu May 14 01:52:50 PDT 2015


 compilerplugins/clang/rendercontext.cxx |    2 ++
 1 file changed, 2 insertions(+)

New commits:
commit 80cf5251e3e6003c73b1db8667a6cdf252664aea
Author: Jan Holesovsky <kendy at collabora.com>
Date:   Thu May 14 10:51:49 2015 +0200

    loplugin rendercontext: No param => no check.
    
    Change-Id: I30c8624fa00338c9cca7a054e08eacfc4fd6a630

diff --git a/compilerplugins/clang/rendercontext.cxx b/compilerplugins/clang/rendercontext.cxx
index 24aaa08..cc2a945 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;


More information about the Libreoffice-commits mailing list