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

Noel Grandin noel.grandin at collabora.co.uk
Thu Mar 8 12:41:56 UTC 2018


 compilerplugins/clang/constantparam.py |    5 +++++
 1 file changed, 5 insertions(+)

New commits:
commit e151ce85d1c219a94365af6eab6cc5fc54a0ea7e
Author: Noel Grandin <noel.grandin at collabora.co.uk>
Date:   Thu Mar 8 14:39:41 2018 +0200

    loplugin:constantparam ignore some SFX macro generated code
    
    Change-Id: Ic5d9a17aeec51d59e26c49bbdf5719e6d8f6486f

diff --git a/compilerplugins/clang/constantparam.py b/compilerplugins/clang/constantparam.py
index dcf7a680d9f0..97dada368d60 100755
--- a/compilerplugins/clang/constantparam.py
+++ b/compilerplugins/clang/constantparam.py
@@ -67,6 +67,11 @@ for callInfo, callValues in callDict.iteritems():
     # part of our binary API
     if sourceLoc.startswith("include/LibreOfficeKit"): continue
 
+    # ignore methods generated by SFX macros
+    if "RegisterInterface(class SfxModule *)" in nameAndParams: continue
+    if "RegisterChildWindow(_Bool,class SfxModule *,enum SfxChildWindowFlags)" in nameAndParams: continue
+    if "RegisterControl(unsigned short,class SfxModule *)" in nameAndParams: continue
+
     if RepresentsInt(callValue):
         if callValue == "0" or callValue == "1":
             tmp1list.append((sourceLoc, functionSig, callInfo[3] + " " + callInfo[2], callValue))


More information about the Libreoffice-commits mailing list