From 267c6f2ac71f92999e969232431ba04678e7437e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 07:54:39 +0200 Subject: Adding upstream version 4:24.2.0. Signed-off-by: Daniel Baumann --- compilerplugins/.gitignore | 27 + compilerplugins/LICENSE.TXT | 40 + compilerplugins/Makefile | 23 + compilerplugins/Makefile-clang.mk | 365 + compilerplugins/Makefile.mk | 36 + compilerplugins/README.md | 71 + compilerplugins/clang/automem.cxx | 92 + compilerplugins/clang/badstatics.cxx | 284 + compilerplugins/clang/blockblock.cxx | 109 + compilerplugins/clang/bufferadd.cxx | 393 ++ compilerplugins/clang/buriedassign.cxx | 650 ++ compilerplugins/clang/casttovoid.cxx | 540 ++ compilerplugins/clang/changetoolsgen.cxx | 376 ++ compilerplugins/clang/charrightshift.cxx | 65 + compilerplugins/clang/check.cxx | 396 ++ compilerplugins/clang/check.hxx | 316 + compilerplugins/clang/checkconfigmacros.cxx | 120 + compilerplugins/clang/classmemaccess.cxx | 133 + compilerplugins/clang/collapseif.cxx | 107 + compilerplugins/clang/colorcheck.cxx | 98 + compilerplugins/clang/commaoperator.cxx | 130 + compilerplugins/clang/compat.hxx | 252 + compilerplugins/clang/conditionalstring.cxx | 459 ++ .../clang/constantparam.bitmask.results | 54 + .../clang/constantparam.booleans.results | 4304 ++++++++++++ .../clang/constantparam.constructors.results | 1120 +++ compilerplugins/clang/constantparam.cxx | 298 + .../clang/constantparam.numbers.results | 3424 ++++++++++ compilerplugins/clang/constantparam.py | 197 + compilerplugins/clang/constexprliteral.cxx | 68 + compilerplugins/clang/constmethod.cxx | 563 ++ compilerplugins/clang/constmove.cxx | 85 + compilerplugins/clang/conststringvar.cxx | 156 + compilerplugins/clang/consttobool.cxx | 292 + compilerplugins/clang/cow_wrapper.cxx | 121 + compilerplugins/clang/cppunitassertequals.cxx | 305 + compilerplugins/clang/crosscast.cxx | 166 + compilerplugins/clang/cstylecast.cxx | 707 ++ compilerplugins/clang/data.cxx | 89 + compilerplugins/clang/datamembershadow.cxx | 126 + compilerplugins/clang/dbgunhandledexception.cxx | 128 + compilerplugins/clang/derefnullptr.cxx | 52 + compilerplugins/clang/dllprivate.cxx | 86 + compilerplugins/clang/duplicate-defines.cxx | 136 + compilerplugins/clang/dyncastvisibility.cxx | 209 + compilerplugins/clang/dynexcspec.cxx | 186 + compilerplugins/clang/elidestringvar.cxx | 461 ++ compilerplugins/clang/empty.cxx | 167 + compilerplugins/clang/emptyif.cxx | 93 + compilerplugins/clang/expandablemethods.cxx | 327 + compilerplugins/clang/expandablemethods.py | 149 + compilerplugins/clang/expressionalwayszero.cxx | 151 + compilerplugins/clang/external.cxx | 610 ++ compilerplugins/clang/externandnotdefined.cxx | 78 + compilerplugins/clang/faileddyncast.cxx | 138 + compilerplugins/clang/fakebool.cxx | 910 +++ compilerplugins/clang/fieldcanbelocal.cxx | 464 ++ compilerplugins/clang/fieldcanbelocal.py | 123 + compilerplugins/clang/fieldcanbelocal.results | 123 + compilerplugins/clang/fieldcast.cxx | 206 + compilerplugins/clang/fieldcast.py | 71 + compilerplugins/clang/fieldcast.results | 681 ++ compilerplugins/clang/finalclasses.cxx | 164 + compilerplugins/clang/finalclasses.py | 80 + compilerplugins/clang/flatten.cxx | 689 ++ compilerplugins/clang/fragiledestructor.cxx | 147 + compilerplugins/clang/functionaddress.hxx | 120 + compilerplugins/clang/getimplementationname.cxx | 314 + compilerplugins/clang/getstr.cxx | 170 + compilerplugins/clang/implicitboolconversion.cxx | 921 +++ compilerplugins/clang/implinheritancehelper.cxx | 124 + compilerplugins/clang/includeform.cxx | 119 + compilerplugins/clang/indentation.cxx | 460 ++ compilerplugins/clang/inlinevisible.cxx | 56 + compilerplugins/clang/intvsfloat.cxx | 117 + compilerplugins/clang/literaltoboolconversion.cxx | 232 + compilerplugins/clang/locking2.cxx | 716 ++ compilerplugins/clang/locking2.py | 79 + compilerplugins/clang/logexceptionnicely.cxx | 150 + compilerplugins/clang/loopvartoosmall.cxx | 246 + compilerplugins/clang/makeshared.cxx | 252 + compilerplugins/clang/mapindex.cxx | 108 + compilerplugins/clang/mergeclasses.cxx | 173 + compilerplugins/clang/mergeclasses.py | 76 + compilerplugins/clang/mergeclasses.results | 503 ++ compilerplugins/clang/methodcycles.cxx | 380 ++ .../clang/methodcycles.partition.results | 8 + compilerplugins/clang/methodcycles.py | 265 + compilerplugins/clang/methodcycles.results | 157 + compilerplugins/clang/moveit.cxx | 271 + compilerplugins/clang/moveparam.cxx | 191 + compilerplugins/clang/nestedunnamed.cxx | 81 + compilerplugins/clang/noexcept.cxx | 83 + compilerplugins/clang/noexceptmove.cxx | 332 + compilerplugins/clang/nullptr.cxx | 431 ++ compilerplugins/clang/optionalbool.cxx | 88 + compilerplugins/clang/oslendian.cxx | 133 + compilerplugins/clang/ostr.cxx | 531 ++ compilerplugins/clang/overrideparam.cxx | 166 + compilerplugins/clang/overridevirtual.cxx | 174 + compilerplugins/clang/pahole-all-classes.py | 155 + compilerplugins/clang/passparamsbyref.cxx | 234 + compilerplugins/clang/passstuffbyref.cxx | 509 ++ compilerplugins/clang/plugin.cxx | 1111 +++ compilerplugins/clang/plugin.hxx | 321 + compilerplugins/clang/pluginhandler.cxx | 535 ++ compilerplugins/clang/pluginhandler.hxx | 111 + compilerplugins/clang/pointerbool.cxx | 169 + compilerplugins/clang/precompiled_clang.hxx | 54 + compilerplugins/clang/privatebase.cxx | 60 + compilerplugins/clang/ptrvector.cxx | 91 + compilerplugins/clang/rangedforcopy.cxx | 85 + compilerplugins/clang/readability-redundant-pp.cxx | 133 + compilerplugins/clang/reducevarscope.cxx | 551 ++ compilerplugins/clang/redundantcast.cxx | 1025 +++ compilerplugins/clang/redundantfcast.cxx | 365 + compilerplugins/clang/redundantinline.cxx | 178 + compilerplugins/clang/redundantpointerops.cxx | 168 + compilerplugins/clang/redundantstatic.cxx | 122 + compilerplugins/clang/refcounting.cxx | 899 +++ compilerplugins/clang/refcountingbase.cxx | 141 + compilerplugins/clang/referencecasting.cxx | 548 ++ compilerplugins/clang/rendercontext.cxx | 133 + compilerplugins/clang/reservedid.cxx | 328 + compilerplugins/clang/returnconstant.cxx | 226 + compilerplugins/clang/returnconstval.cxx | 79 + compilerplugins/clang/salcall.cxx | 615 ++ compilerplugins/clang/sallogareas.cxx | 284 + compilerplugins/clang/salunicodeliteral.cxx | 103 + compilerplugins/clang/selfinit.cxx | 109 + compilerplugins/clang/sfxpoolitem.cxx | 134 + compilerplugins/clang/sharedvisitor/README | 45 + compilerplugins/clang/sharedvisitor/analyzer.cxx | 299 + .../clang/sharedvisitor/dummyplugin.hxx | 81 + compilerplugins/clang/sharedvisitor/generator.cxx | 480 ++ .../clang/sharedvisitor/precompiled_clang.hxx | 12 + compilerplugins/clang/simplifyconstruct.cxx | 110 + compilerplugins/clang/simplifydynamiccast.cxx | 118 + compilerplugins/clang/simplifypointertobool.cxx | 450 ++ .../clang/singlevalfields.could-be-bool.results | 261 + compilerplugins/clang/singlevalfields.cxx | 579 ++ compilerplugins/clang/singlevalfields.py | 116 + compilerplugins/clang/singlevalfields.results | 1305 ++++ compilerplugins/clang/staticaccess.cxx | 100 + compilerplugins/clang/staticconstfield.cxx | 174 + compilerplugins/clang/staticdynamic.cxx | 168 + compilerplugins/clang/staticmethods.cxx | 246 + compilerplugins/clang/stdfunction.cxx | 52 + compilerplugins/clang/store/README | 3 + compilerplugins/clang/store/badvectorinit.cxx | 214 + compilerplugins/clang/store/bodynotinblock.cxx | 147 + compilerplugins/clang/store/bodynotinblock.hxx | 35 + compilerplugins/clang/store/cascadingassignop.cxx | 94 + compilerplugins/clang/store/cascadingassignop.hxx | 35 + compilerplugins/clang/store/cascadingcondop.cxx | 85 + compilerplugins/clang/store/cascadingcondop.hxx | 35 + .../clang/store/changefunctioncalls.cxx | 91 + compilerplugins/clang/store/checkunusedparams.cxx | 502 ++ .../clang/store/comparisonwithconstant.cxx | 168 + compilerplugins/clang/store/constantfunction.cxx | 506 ++ compilerplugins/clang/store/constfields.cxx | 596 ++ compilerplugins/clang/store/constfields.py | 86 + compilerplugins/clang/store/constfieldsrewrite.cxx | 169 + compilerplugins/clang/store/constparams.cxx | 618 ++ compilerplugins/clang/store/constvars.cxx | 558 ++ compilerplugins/clang/store/convertlong.cxx | 139 + .../clang/store/countusersofdefaultparams.cxx | 250 + .../clang/store/countusersofdefaultparams.py | 80 + compilerplugins/clang/store/deadclass.cxx | 69 + compilerplugins/clang/store/defaultparams.cxx | 128 + compilerplugins/clang/store/deletedspecial.cxx | 153 + compilerplugins/clang/store/derivedclass.cxx | 70 + compilerplugins/clang/store/dodgyswitch.cxx | 78 + compilerplugins/clang/store/doubleconvert.cxx | 83 + compilerplugins/clang/store/finalprotected.cxx | 84 + compilerplugins/clang/store/findoncontainer.cxx | 77 + compilerplugins/clang/store/fpcomparison.cxx | 382 ++ compilerplugins/clang/store/inlinefields.cxx | 251 + compilerplugins/clang/store/inlinefields.py | 72 + .../clang/store/inlinesimplememberfunctions.cxx | 294 + compilerplugins/clang/store/lclstaticfix.cxx | 54 + compilerplugins/clang/store/lclstaticfix.hxx | 30 + compilerplugins/clang/store/manualrefcount.cxx | 323 + compilerplugins/clang/store/memoryvar.cxx | 238 + .../clang/store/namespaceindentation.cxx | 220 + compilerplugins/clang/store/oncevar.cxx | 414 ++ compilerplugins/clang/store/optmove.cxx | 161 + compilerplugins/clang/store/optvalue.cxx | 66 + .../clang/store/paintmethodconversion.cxx | 94 + .../clang/store/postfixincrementfix.cxx | 132 + .../clang/store/postfixincrementfix.hxx | 35 + compilerplugins/clang/store/putpoolitem.cxx | 103 + compilerplugins/clang/store/refassign.cxx | 151 + .../clang/store/removeforwardstringdecl.cxx | 78 + .../clang/store/removeforwardstringdecl.hxx | 32 + compilerplugins/clang/store/removevirtuals.cxx | 150 + compilerplugins/clang/store/returnbyref.cxx | 138 + compilerplugins/clang/store/returnunique.cxx | 83 + compilerplugins/clang/store/revisibility.cxx | 89 + compilerplugins/clang/store/rtlconstasciimacro.cxx | 144 + compilerplugins/clang/store/sequentialassign.cxx | 327 + compilerplugins/clang/store/sfxitemsetrewrite.cxx | 419 ++ compilerplugins/clang/store/shouldreturnbool.cxx | 248 + compilerplugins/clang/store/simplifybool.cxx | 1333 ++++ compilerplugins/clang/store/staticvar.cxx | 213 + compilerplugins/clang/store/stdexception.cxx | 188 + compilerplugins/clang/store/stringbuffer.cxx | 75 + .../clang/store/stringliteraldefine.cxx | 171 + compilerplugins/clang/store/stringloop.cxx | 292 + compilerplugins/clang/store/stylepolice.cxx | 196 + .../clang/store/svstreamoutputoperators.cxx | 223 + compilerplugins/clang/store/test/deadclass.cxx | 15 + compilerplugins/clang/store/toolslong.cxx | 653 ++ compilerplugins/clang/store/tutorial/tutorial1.cxx | 68 + compilerplugins/clang/store/tutorial/tutorial1.hxx | 35 + .../clang/store/tutorial/tutorial1_example.cxx | 21 + compilerplugins/clang/store/tutorial/tutorial2.cxx | 95 + compilerplugins/clang/store/tutorial/tutorial2.hxx | 35 + .../clang/store/tutorial/tutorial2_example.cxx | 18 + compilerplugins/clang/store/tutorial/tutorial3.cxx | 77 + compilerplugins/clang/store/tutorial/tutorial3.hxx | 37 + compilerplugins/clang/store/unique2optional.cxx | 264 + compilerplugins/clang/store/unusedcode.cxx | 77 + compilerplugins/clang/store/unusedfieldsremove.cxx | 137 + compilerplugins/clang/store/unusedindex.cxx | 87 + .../clang/store/unusedmethodsremove.cxx | 153 + compilerplugins/clang/store/valueof.cxx | 148 + compilerplugins/clang/stringadd.cxx | 529 ++ compilerplugins/clang/stringconcatauto.cxx | 110 + compilerplugins/clang/stringconcatliterals.cxx | 170 + compilerplugins/clang/stringconstant.cxx | 2259 +++++++ compilerplugins/clang/stringliteralvar.cxx | 320 + compilerplugins/clang/stringstatic.cxx | 118 + compilerplugins/clang/stringview.cxx | 407 ++ compilerplugins/clang/stringviewdangle.cxx | 117 + compilerplugins/clang/stringviewparam.cxx | 575 ++ compilerplugins/clang/stringviewvar.cxx | 407 ++ compilerplugins/clang/subtlezeroinit.cxx | 67 + compilerplugins/clang/test/badstatics.cxx | 58 + compilerplugins/clang/test/blockblock.cxx | 47 + compilerplugins/clang/test/bufferadd.cxx | 116 + compilerplugins/clang/test/buriedassign.cxx | 133 + compilerplugins/clang/test/casttovoid.cxx | 125 + compilerplugins/clang/test/classmemaccess.cxx | 36 + compilerplugins/clang/test/collapseif.cxx | 55 + compilerplugins/clang/test/commaoperator.cxx | 28 + compilerplugins/clang/test/conditionalstring.cxx | 27 + compilerplugins/clang/test/constexprliteral.cxx | 24 + compilerplugins/clang/test/constfields.cxx | 45 + compilerplugins/clang/test/constmethod.cxx | 59 + compilerplugins/clang/test/constmove.cxx | 25 + compilerplugins/clang/test/constparams.cxx | 73 + compilerplugins/clang/test/consttobool.cxx | 70 + compilerplugins/clang/test/constvars.cxx | 94 + compilerplugins/clang/test/convertlong.cxx | 42 + compilerplugins/clang/test/cow_wrapper.cxx | 44 + compilerplugins/clang/test/cppunitassertequals.cxx | 93 + compilerplugins/clang/test/crosscast.cxx | 96 + compilerplugins/clang/test/cstylecast.cxx | 74 + compilerplugins/clang/test/datamembershadow.cxx | 24 + .../clang/test/dbgunhandledexception.cxx | 38 + compilerplugins/clang/test/dodgyswitch.cxx | 30 + compilerplugins/clang/test/doubleconvert.cxx | 25 + compilerplugins/clang/test/elidestringvar.cxx | 46 + compilerplugins/clang/test/emptyif.cxx | 61 + .../clang/test/expressionalwayszero.cxx | 47 + compilerplugins/clang/test/external.cxx | 195 + compilerplugins/clang/test/external.hxx | 23 + compilerplugins/clang/test/faileddyncast.cxx | 21 + compilerplugins/clang/test/fakebool.cxx | 50 + compilerplugins/clang/test/fieldcast.cxx | 63 + compilerplugins/clang/test/flatten.cxx | 191 + compilerplugins/clang/test/fragiledestructor.cxx | 88 + compilerplugins/clang/test/getstr.cxx | 61 + .../clang/test/implicitboolconversion.cxx | 83 + .../clang/test/implinheritancehelper.cxx | 26 + compilerplugins/clang/test/indentation.cxx | 110 + compilerplugins/clang/test/intvsfloat.cxx | 62 + compilerplugins/clang/test/locking2.cxx | 56 + compilerplugins/clang/test/logexceptionnicely.cxx | 52 + compilerplugins/clang/test/loopvartoosmall.cxx | 26 + compilerplugins/clang/test/makeshared.cxx | 63 + compilerplugins/clang/test/mapindex.cxx | 43 + compilerplugins/clang/test/moveit.cxx | 105 + compilerplugins/clang/test/moveparam.cxx | 60 + .../clang/test/namespaceindentation.cxx | 50 + compilerplugins/clang/test/noexcept.cxx | 16 + compilerplugins/clang/test/noexceptmove.cxx | 95 + compilerplugins/clang/test/nullptr.cxx | 23 + compilerplugins/clang/test/oncevar.cxx | 66 + compilerplugins/clang/test/optionalbool.cxx | 27 + compilerplugins/clang/test/optmove.cxx | 53 + compilerplugins/clang/test/optvalue.cxx | 75 + compilerplugins/clang/test/oslendian-1.cxx | 47 + compilerplugins/clang/test/oslendian-2.cxx | 23 + compilerplugins/clang/test/oslendian-3.cxx | 25 + compilerplugins/clang/test/ostr.cxx | 163 + compilerplugins/clang/test/overridevirtual.cxx | 44 + compilerplugins/clang/test/passparamsbyref.cxx | 42 + compilerplugins/clang/test/passstuffbyref.cxx | 84 + compilerplugins/clang/test/pointerbool.cxx | 46 + compilerplugins/clang/test/putpoolitem.cxx | 48 + compilerplugins/clang/test/rangedforcopy.cxx | 40 + compilerplugins/clang/test/reducevarscope.cxx | 99 + compilerplugins/clang/test/redundantcast.cxx | 502 ++ compilerplugins/clang/test/redundantcast.hxx | 35 + compilerplugins/clang/test/redundantfcast.cxx | 242 + compilerplugins/clang/test/redundantinline.cxx | 24 + compilerplugins/clang/test/redundantinline.hxx | 78 + compilerplugins/clang/test/redundantpointerops.cxx | 95 + .../clang/test/redundantpreprocessor.cxx | 15 + compilerplugins/clang/test/refassign.cxx | 31 + compilerplugins/clang/test/refcounting.cxx | 132 + compilerplugins/clang/test/referencecasting.cxx | 217 + compilerplugins/clang/test/returnconstval.cxx | 21 + compilerplugins/clang/test/salcall.cxx | 188 + compilerplugins/clang/test/sallogareas.cxx | 51 + compilerplugins/clang/test/salunicodeliteral.cxx | 40 + compilerplugins/clang/test/salunicodeliteral.hxx | 14 + compilerplugins/clang/test/selfinit.cxx | 33 + compilerplugins/clang/test/sequentialassign.cxx | 98 + compilerplugins/clang/test/shouldreturnbool.cxx | 31 + compilerplugins/clang/test/simplifyconstruct.cxx | 88 + compilerplugins/clang/test/simplifydynamiccast.cxx | 34 + .../clang/test/simplifypointertobool.cxx | 74 + compilerplugins/clang/test/singlevalfields.cxx | 26 + compilerplugins/clang/test/staticconstfield.cxx | 120 + compilerplugins/clang/test/staticdynamic.cxx | 44 + compilerplugins/clang/test/staticmethods.cxx | 16 + compilerplugins/clang/test/staticvar.cxx | 80 + compilerplugins/clang/test/stdfunction.cxx | 56 + compilerplugins/clang/test/stringadd.cxx | 315 + compilerplugins/clang/test/stringbuffer.cxx | 22 + compilerplugins/clang/test/stringconcatauto.cxx | 59 + .../clang/test/stringconcatliterals.cxx | 68 + compilerplugins/clang/test/stringconstant.cxx | 141 + compilerplugins/clang/test/stringliteraldefine.cxx | 56 + compilerplugins/clang/test/stringliteralvar.cxx | 134 + compilerplugins/clang/test/stringloop.cxx | 41 + compilerplugins/clang/test/stringstatic.cxx | 29 + compilerplugins/clang/test/stringview-c++03.cxx | 21 + compilerplugins/clang/test/stringview.cxx | 219 + compilerplugins/clang/test/stringviewdangle.cxx | 37 + compilerplugins/clang/test/stringviewparam.cxx | 113 + compilerplugins/clang/test/stringviewvar.cxx | 65 + compilerplugins/clang/test/trivialconstructor.cxx | 58 + compilerplugins/clang/test/trivialdestructor.cxx | 57 + compilerplugins/clang/test/typedefparam.cxx | 80 + compilerplugins/clang/test/typeidcomparison.cxx | 41 + .../clang/test/unnecessarycatchthrow.cxx | 58 + compilerplugins/clang/test/unnecessarygetstr.cxx | 131 + compilerplugins/clang/test/unnecessarylocking.cxx | 114 + .../clang/test/unnecessaryoverride-dtor.cxx | 137 + .../clang/test/unnecessaryoverride-dtor.hxx | 52 + compilerplugins/clang/test/unnecessaryoverride.cxx | 196 + compilerplugins/clang/test/unnecessaryparen.cxx | 166 + compilerplugins/clang/test/unoaggregation.cxx | 42 + compilerplugins/clang/test/unoany.cxx | 29 + compilerplugins/clang/test/unoquery.cxx | 19 + compilerplugins/clang/test/unreffun.cxx | 57 + compilerplugins/clang/test/unreffun.hxx | 18 + compilerplugins/clang/test/unsignedcompare.cxx | 16 + .../clang/test/unusedcapturedefault.cxx | 16 + compilerplugins/clang/test/unusedenumconstants.cxx | 120 + compilerplugins/clang/test/unusedfields.cxx | 426 ++ compilerplugins/clang/test/unusedindex.cxx | 42 + compilerplugins/clang/test/unusedmember.cxx | 267 + compilerplugins/clang/test/unusedvariablecheck.cxx | 38 + compilerplugins/clang/test/unusedvariablemore.cxx | 58 + compilerplugins/clang/test/unusedvarsglobal.cxx | 24 + compilerplugins/clang/test/useuniqueptr.cxx | 311 + compilerplugins/clang/test/vclwidgets.cxx | 99 + compilerplugins/clang/test/weakbase.cxx | 83 + compilerplugins/clang/test/writeonlyvars.cxx | 168 + compilerplugins/clang/test/xmlimport.cxx | 233 + compilerplugins/clang/trivialconstructor.cxx | 156 + compilerplugins/clang/trivialdestructor.cxx | 113 + compilerplugins/clang/typedefparam.cxx | 334 + compilerplugins/clang/typeidcomparison.cxx | 90 + compilerplugins/clang/unicodetochar.cxx | 122 + compilerplugins/clang/unnecessarycatchthrow.cxx | 91 + compilerplugins/clang/unnecessarygetstr.cxx | 148 + compilerplugins/clang/unnecessarylocking.cxx | 322 + compilerplugins/clang/unnecessaryoverride.cxx | 539 ++ compilerplugins/clang/unnecessaryparen.cxx | 732 ++ .../clang/unnecessaryvirtual-dead.results | 26 + compilerplugins/clang/unnecessaryvirtual.cxx | 208 + compilerplugins/clang/unnecessaryvirtual.py | 107 + compilerplugins/clang/unnecessaryvirtual.results | 471 ++ compilerplugins/clang/unoaggregation.cxx | 215 + compilerplugins/clang/unoany.cxx | 92 + compilerplugins/clang/unoquery.cxx | 99 + compilerplugins/clang/unreffun.cxx | 199 + compilerplugins/clang/unsignedcompare.cxx | 232 + compilerplugins/clang/unusedcapturedefault.cxx | 60 + compilerplugins/clang/unusedenumconstants.cxx | 307 + compilerplugins/clang/unusedenumconstants.py | 261 + .../clang/unusedenumconstants.readonly.results | 1404 ++++ .../clang/unusedenumconstants.untouched.results | 494 ++ .../clang/unusedenumconstants.writeonly.results | 7106 ++++++++++++++++++++ compilerplugins/clang/unusedfields.cxx | 1219 ++++ .../unusedfields.only-used-in-constructor.results | 984 +++ compilerplugins/clang/unusedfields.py | 300 + .../clang/unusedfields.readonly.results | 930 +++ .../clang/unusedfields.untouched.results | 590 ++ .../clang/unusedfields.writeonly.results | 1352 ++++ compilerplugins/clang/unusedmember.cxx | 445 ++ compilerplugins/clang/unusedmethods.cxx | 429 ++ compilerplugins/clang/unusedmethods.py | 316 + compilerplugins/clang/unusedmethods.results | 3488 ++++++++++ .../clang/unusedmethods.unused-returns.results | 432 ++ compilerplugins/clang/unusedvariablecheck.cxx | 125 + compilerplugins/clang/unusedvariablecheck.hxx | 32 + compilerplugins/clang/unusedvariablemore.cxx | 337 + compilerplugins/clang/unusedvariableplus.cxx | 519 ++ compilerplugins/clang/unusedvarsglobal.cxx | 961 +++ compilerplugins/clang/unusedvarsglobal.py | 150 + .../clang/unusedvarsglobal.untouched.results | 98 + .../clang/unusedvarsglobal.writeonly.results | 204 + compilerplugins/clang/useuniqueptr.cxx | 1295 ++++ compilerplugins/clang/vclwidgets.cxx | 877 +++ compilerplugins/clang/virtualdead.cxx | 285 + compilerplugins/clang/virtualdead.py | 128 + compilerplugins/clang/virtualdead.results | 129 + .../clang/virtualdead.unusedparams.results | 285 + compilerplugins/clang/virtualdown.cxx | 219 + compilerplugins/clang/virtualdown.py | 54 + compilerplugins/clang/virtualdown.results | 675 ++ compilerplugins/clang/weakbase.cxx | 175 + compilerplugins/clang/writeonlyvars.cxx | 1138 ++++ compilerplugins/clang/xmlimport.cxx | 394 ++ 431 files changed, 109189 insertions(+) create mode 100644 compilerplugins/.gitignore create mode 100644 compilerplugins/LICENSE.TXT create mode 100644 compilerplugins/Makefile create mode 100644 compilerplugins/Makefile-clang.mk create mode 100644 compilerplugins/Makefile.mk create mode 100644 compilerplugins/README.md create mode 100644 compilerplugins/clang/automem.cxx create mode 100644 compilerplugins/clang/badstatics.cxx create mode 100644 compilerplugins/clang/blockblock.cxx create mode 100644 compilerplugins/clang/bufferadd.cxx create mode 100644 compilerplugins/clang/buriedassign.cxx create mode 100644 compilerplugins/clang/casttovoid.cxx create mode 100644 compilerplugins/clang/changetoolsgen.cxx create mode 100644 compilerplugins/clang/charrightshift.cxx create mode 100644 compilerplugins/clang/check.cxx create mode 100644 compilerplugins/clang/check.hxx create mode 100644 compilerplugins/clang/checkconfigmacros.cxx create mode 100644 compilerplugins/clang/classmemaccess.cxx create mode 100644 compilerplugins/clang/collapseif.cxx create mode 100644 compilerplugins/clang/colorcheck.cxx create mode 100644 compilerplugins/clang/commaoperator.cxx create mode 100644 compilerplugins/clang/compat.hxx create mode 100644 compilerplugins/clang/conditionalstring.cxx create mode 100644 compilerplugins/clang/constantparam.bitmask.results create mode 100644 compilerplugins/clang/constantparam.booleans.results create mode 100644 compilerplugins/clang/constantparam.constructors.results create mode 100644 compilerplugins/clang/constantparam.cxx create mode 100644 compilerplugins/clang/constantparam.numbers.results create mode 100755 compilerplugins/clang/constantparam.py create mode 100644 compilerplugins/clang/constexprliteral.cxx create mode 100644 compilerplugins/clang/constmethod.cxx create mode 100644 compilerplugins/clang/constmove.cxx create mode 100644 compilerplugins/clang/conststringvar.cxx create mode 100644 compilerplugins/clang/consttobool.cxx create mode 100644 compilerplugins/clang/cow_wrapper.cxx create mode 100644 compilerplugins/clang/cppunitassertequals.cxx create mode 100644 compilerplugins/clang/crosscast.cxx create mode 100644 compilerplugins/clang/cstylecast.cxx create mode 100644 compilerplugins/clang/data.cxx create mode 100644 compilerplugins/clang/datamembershadow.cxx create mode 100644 compilerplugins/clang/dbgunhandledexception.cxx create mode 100644 compilerplugins/clang/derefnullptr.cxx create mode 100644 compilerplugins/clang/dllprivate.cxx create mode 100644 compilerplugins/clang/duplicate-defines.cxx create mode 100644 compilerplugins/clang/dyncastvisibility.cxx create mode 100644 compilerplugins/clang/dynexcspec.cxx create mode 100644 compilerplugins/clang/elidestringvar.cxx create mode 100644 compilerplugins/clang/empty.cxx create mode 100644 compilerplugins/clang/emptyif.cxx create mode 100644 compilerplugins/clang/expandablemethods.cxx create mode 100755 compilerplugins/clang/expandablemethods.py create mode 100644 compilerplugins/clang/expressionalwayszero.cxx create mode 100644 compilerplugins/clang/external.cxx create mode 100644 compilerplugins/clang/externandnotdefined.cxx create mode 100644 compilerplugins/clang/faileddyncast.cxx create mode 100644 compilerplugins/clang/fakebool.cxx create mode 100644 compilerplugins/clang/fieldcanbelocal.cxx create mode 100755 compilerplugins/clang/fieldcanbelocal.py create mode 100644 compilerplugins/clang/fieldcanbelocal.results create mode 100644 compilerplugins/clang/fieldcast.cxx create mode 100755 compilerplugins/clang/fieldcast.py create mode 100644 compilerplugins/clang/fieldcast.results create mode 100644 compilerplugins/clang/finalclasses.cxx create mode 100755 compilerplugins/clang/finalclasses.py create mode 100644 compilerplugins/clang/flatten.cxx create mode 100644 compilerplugins/clang/fragiledestructor.cxx create mode 100644 compilerplugins/clang/functionaddress.hxx create mode 100644 compilerplugins/clang/getimplementationname.cxx create mode 100644 compilerplugins/clang/getstr.cxx create mode 100644 compilerplugins/clang/implicitboolconversion.cxx create mode 100644 compilerplugins/clang/implinheritancehelper.cxx create mode 100644 compilerplugins/clang/includeform.cxx create mode 100644 compilerplugins/clang/indentation.cxx create mode 100644 compilerplugins/clang/inlinevisible.cxx create mode 100644 compilerplugins/clang/intvsfloat.cxx create mode 100644 compilerplugins/clang/literaltoboolconversion.cxx create mode 100644 compilerplugins/clang/locking2.cxx create mode 100755 compilerplugins/clang/locking2.py create mode 100644 compilerplugins/clang/logexceptionnicely.cxx create mode 100644 compilerplugins/clang/loopvartoosmall.cxx create mode 100644 compilerplugins/clang/makeshared.cxx create mode 100644 compilerplugins/clang/mapindex.cxx create mode 100644 compilerplugins/clang/mergeclasses.cxx create mode 100755 compilerplugins/clang/mergeclasses.py create mode 100644 compilerplugins/clang/mergeclasses.results create mode 100644 compilerplugins/clang/methodcycles.cxx create mode 100644 compilerplugins/clang/methodcycles.partition.results create mode 100755 compilerplugins/clang/methodcycles.py create mode 100644 compilerplugins/clang/methodcycles.results create mode 100644 compilerplugins/clang/moveit.cxx create mode 100644 compilerplugins/clang/moveparam.cxx create mode 100644 compilerplugins/clang/nestedunnamed.cxx create mode 100644 compilerplugins/clang/noexcept.cxx create mode 100644 compilerplugins/clang/noexceptmove.cxx create mode 100644 compilerplugins/clang/nullptr.cxx create mode 100644 compilerplugins/clang/optionalbool.cxx create mode 100644 compilerplugins/clang/oslendian.cxx create mode 100644 compilerplugins/clang/ostr.cxx create mode 100644 compilerplugins/clang/overrideparam.cxx create mode 100644 compilerplugins/clang/overridevirtual.cxx create mode 100755 compilerplugins/clang/pahole-all-classes.py create mode 100644 compilerplugins/clang/passparamsbyref.cxx create mode 100644 compilerplugins/clang/passstuffbyref.cxx create mode 100644 compilerplugins/clang/plugin.cxx create mode 100644 compilerplugins/clang/plugin.hxx create mode 100644 compilerplugins/clang/pluginhandler.cxx create mode 100644 compilerplugins/clang/pluginhandler.hxx create mode 100644 compilerplugins/clang/pointerbool.cxx create mode 100644 compilerplugins/clang/precompiled_clang.hxx create mode 100644 compilerplugins/clang/privatebase.cxx create mode 100644 compilerplugins/clang/ptrvector.cxx create mode 100644 compilerplugins/clang/rangedforcopy.cxx create mode 100644 compilerplugins/clang/readability-redundant-pp.cxx create mode 100644 compilerplugins/clang/reducevarscope.cxx create mode 100644 compilerplugins/clang/redundantcast.cxx create mode 100644 compilerplugins/clang/redundantfcast.cxx create mode 100644 compilerplugins/clang/redundantinline.cxx create mode 100644 compilerplugins/clang/redundantpointerops.cxx create mode 100644 compilerplugins/clang/redundantstatic.cxx create mode 100644 compilerplugins/clang/refcounting.cxx create mode 100644 compilerplugins/clang/refcountingbase.cxx create mode 100644 compilerplugins/clang/referencecasting.cxx create mode 100644 compilerplugins/clang/rendercontext.cxx create mode 100644 compilerplugins/clang/reservedid.cxx create mode 100644 compilerplugins/clang/returnconstant.cxx create mode 100644 compilerplugins/clang/returnconstval.cxx create mode 100644 compilerplugins/clang/salcall.cxx create mode 100644 compilerplugins/clang/sallogareas.cxx create mode 100644 compilerplugins/clang/salunicodeliteral.cxx create mode 100644 compilerplugins/clang/selfinit.cxx create mode 100644 compilerplugins/clang/sfxpoolitem.cxx create mode 100644 compilerplugins/clang/sharedvisitor/README create mode 100644 compilerplugins/clang/sharedvisitor/analyzer.cxx create mode 100644 compilerplugins/clang/sharedvisitor/dummyplugin.hxx create mode 100644 compilerplugins/clang/sharedvisitor/generator.cxx create mode 100644 compilerplugins/clang/sharedvisitor/precompiled_clang.hxx create mode 100644 compilerplugins/clang/simplifyconstruct.cxx create mode 100644 compilerplugins/clang/simplifydynamiccast.cxx create mode 100644 compilerplugins/clang/simplifypointertobool.cxx create mode 100644 compilerplugins/clang/singlevalfields.could-be-bool.results create mode 100644 compilerplugins/clang/singlevalfields.cxx create mode 100755 compilerplugins/clang/singlevalfields.py create mode 100644 compilerplugins/clang/singlevalfields.results create mode 100644 compilerplugins/clang/staticaccess.cxx create mode 100644 compilerplugins/clang/staticconstfield.cxx create mode 100644 compilerplugins/clang/staticdynamic.cxx create mode 100644 compilerplugins/clang/staticmethods.cxx create mode 100644 compilerplugins/clang/stdfunction.cxx create mode 100644 compilerplugins/clang/store/README create mode 100644 compilerplugins/clang/store/badvectorinit.cxx create mode 100644 compilerplugins/clang/store/bodynotinblock.cxx create mode 100644 compilerplugins/clang/store/bodynotinblock.hxx create mode 100644 compilerplugins/clang/store/cascadingassignop.cxx create mode 100644 compilerplugins/clang/store/cascadingassignop.hxx create mode 100644 compilerplugins/clang/store/cascadingcondop.cxx create mode 100644 compilerplugins/clang/store/cascadingcondop.hxx create mode 100644 compilerplugins/clang/store/changefunctioncalls.cxx create mode 100644 compilerplugins/clang/store/checkunusedparams.cxx create mode 100644 compilerplugins/clang/store/comparisonwithconstant.cxx create mode 100644 compilerplugins/clang/store/constantfunction.cxx create mode 100644 compilerplugins/clang/store/constfields.cxx create mode 100755 compilerplugins/clang/store/constfields.py create mode 100644 compilerplugins/clang/store/constfieldsrewrite.cxx create mode 100644 compilerplugins/clang/store/constparams.cxx create mode 100644 compilerplugins/clang/store/constvars.cxx create mode 100644 compilerplugins/clang/store/convertlong.cxx create mode 100644 compilerplugins/clang/store/countusersofdefaultparams.cxx create mode 100755 compilerplugins/clang/store/countusersofdefaultparams.py create mode 100644 compilerplugins/clang/store/deadclass.cxx create mode 100644 compilerplugins/clang/store/defaultparams.cxx create mode 100644 compilerplugins/clang/store/deletedspecial.cxx create mode 100644 compilerplugins/clang/store/derivedclass.cxx create mode 100644 compilerplugins/clang/store/dodgyswitch.cxx create mode 100644 compilerplugins/clang/store/doubleconvert.cxx create mode 100644 compilerplugins/clang/store/finalprotected.cxx create mode 100644 compilerplugins/clang/store/findoncontainer.cxx create mode 100644 compilerplugins/clang/store/fpcomparison.cxx create mode 100644 compilerplugins/clang/store/inlinefields.cxx create mode 100755 compilerplugins/clang/store/inlinefields.py create mode 100644 compilerplugins/clang/store/inlinesimplememberfunctions.cxx create mode 100644 compilerplugins/clang/store/lclstaticfix.cxx create mode 100644 compilerplugins/clang/store/lclstaticfix.hxx create mode 100644 compilerplugins/clang/store/manualrefcount.cxx create mode 100644 compilerplugins/clang/store/memoryvar.cxx create mode 100644 compilerplugins/clang/store/namespaceindentation.cxx create mode 100644 compilerplugins/clang/store/oncevar.cxx create mode 100644 compilerplugins/clang/store/optmove.cxx create mode 100644 compilerplugins/clang/store/optvalue.cxx create mode 100644 compilerplugins/clang/store/paintmethodconversion.cxx create mode 100644 compilerplugins/clang/store/postfixincrementfix.cxx create mode 100644 compilerplugins/clang/store/postfixincrementfix.hxx create mode 100644 compilerplugins/clang/store/putpoolitem.cxx create mode 100644 compilerplugins/clang/store/refassign.cxx create mode 100644 compilerplugins/clang/store/removeforwardstringdecl.cxx create mode 100644 compilerplugins/clang/store/removeforwardstringdecl.hxx create mode 100644 compilerplugins/clang/store/removevirtuals.cxx create mode 100644 compilerplugins/clang/store/returnbyref.cxx create mode 100644 compilerplugins/clang/store/returnunique.cxx create mode 100644 compilerplugins/clang/store/revisibility.cxx create mode 100644 compilerplugins/clang/store/rtlconstasciimacro.cxx create mode 100644 compilerplugins/clang/store/sequentialassign.cxx create mode 100644 compilerplugins/clang/store/sfxitemsetrewrite.cxx create mode 100644 compilerplugins/clang/store/shouldreturnbool.cxx create mode 100644 compilerplugins/clang/store/simplifybool.cxx create mode 100644 compilerplugins/clang/store/staticvar.cxx create mode 100644 compilerplugins/clang/store/stdexception.cxx create mode 100644 compilerplugins/clang/store/stringbuffer.cxx create mode 100644 compilerplugins/clang/store/stringliteraldefine.cxx create mode 100644 compilerplugins/clang/store/stringloop.cxx create mode 100644 compilerplugins/clang/store/stylepolice.cxx create mode 100644 compilerplugins/clang/store/svstreamoutputoperators.cxx create mode 100644 compilerplugins/clang/store/test/deadclass.cxx create mode 100644 compilerplugins/clang/store/toolslong.cxx create mode 100644 compilerplugins/clang/store/tutorial/tutorial1.cxx create mode 100644 compilerplugins/clang/store/tutorial/tutorial1.hxx create mode 100644 compilerplugins/clang/store/tutorial/tutorial1_example.cxx create mode 100644 compilerplugins/clang/store/tutorial/tutorial2.cxx create mode 100644 compilerplugins/clang/store/tutorial/tutorial2.hxx create mode 100644 compilerplugins/clang/store/tutorial/tutorial2_example.cxx create mode 100644 compilerplugins/clang/store/tutorial/tutorial3.cxx create mode 100644 compilerplugins/clang/store/tutorial/tutorial3.hxx create mode 100644 compilerplugins/clang/store/unique2optional.cxx create mode 100644 compilerplugins/clang/store/unusedcode.cxx create mode 100644 compilerplugins/clang/store/unusedfieldsremove.cxx create mode 100644 compilerplugins/clang/store/unusedindex.cxx create mode 100644 compilerplugins/clang/store/unusedmethodsremove.cxx create mode 100644 compilerplugins/clang/store/valueof.cxx create mode 100644 compilerplugins/clang/stringadd.cxx create mode 100644 compilerplugins/clang/stringconcatauto.cxx create mode 100644 compilerplugins/clang/stringconcatliterals.cxx create mode 100644 compilerplugins/clang/stringconstant.cxx create mode 100644 compilerplugins/clang/stringliteralvar.cxx create mode 100644 compilerplugins/clang/stringstatic.cxx create mode 100644 compilerplugins/clang/stringview.cxx create mode 100644 compilerplugins/clang/stringviewdangle.cxx create mode 100644 compilerplugins/clang/stringviewparam.cxx create mode 100644 compilerplugins/clang/stringviewvar.cxx create mode 100644 compilerplugins/clang/subtlezeroinit.cxx create mode 100644 compilerplugins/clang/test/badstatics.cxx create mode 100644 compilerplugins/clang/test/blockblock.cxx create mode 100644 compilerplugins/clang/test/bufferadd.cxx create mode 100644 compilerplugins/clang/test/buriedassign.cxx create mode 100644 compilerplugins/clang/test/casttovoid.cxx create mode 100644 compilerplugins/clang/test/classmemaccess.cxx create mode 100644 compilerplugins/clang/test/collapseif.cxx create mode 100644 compilerplugins/clang/test/commaoperator.cxx create mode 100644 compilerplugins/clang/test/conditionalstring.cxx create mode 100644 compilerplugins/clang/test/constexprliteral.cxx create mode 100644 compilerplugins/clang/test/constfields.cxx create mode 100644 compilerplugins/clang/test/constmethod.cxx create mode 100644 compilerplugins/clang/test/constmove.cxx create mode 100644 compilerplugins/clang/test/constparams.cxx create mode 100644 compilerplugins/clang/test/consttobool.cxx create mode 100644 compilerplugins/clang/test/constvars.cxx create mode 100644 compilerplugins/clang/test/convertlong.cxx create mode 100644 compilerplugins/clang/test/cow_wrapper.cxx create mode 100644 compilerplugins/clang/test/cppunitassertequals.cxx create mode 100644 compilerplugins/clang/test/crosscast.cxx create mode 100644 compilerplugins/clang/test/cstylecast.cxx create mode 100644 compilerplugins/clang/test/datamembershadow.cxx create mode 100644 compilerplugins/clang/test/dbgunhandledexception.cxx create mode 100644 compilerplugins/clang/test/dodgyswitch.cxx create mode 100644 compilerplugins/clang/test/doubleconvert.cxx create mode 100644 compilerplugins/clang/test/elidestringvar.cxx create mode 100644 compilerplugins/clang/test/emptyif.cxx create mode 100644 compilerplugins/clang/test/expressionalwayszero.cxx create mode 100644 compilerplugins/clang/test/external.cxx create mode 100644 compilerplugins/clang/test/external.hxx create mode 100644 compilerplugins/clang/test/faileddyncast.cxx create mode 100644 compilerplugins/clang/test/fakebool.cxx create mode 100644 compilerplugins/clang/test/fieldcast.cxx create mode 100644 compilerplugins/clang/test/flatten.cxx create mode 100644 compilerplugins/clang/test/fragiledestructor.cxx create mode 100644 compilerplugins/clang/test/getstr.cxx create mode 100644 compilerplugins/clang/test/implicitboolconversion.cxx create mode 100644 compilerplugins/clang/test/implinheritancehelper.cxx create mode 100644 compilerplugins/clang/test/indentation.cxx create mode 100644 compilerplugins/clang/test/intvsfloat.cxx create mode 100644 compilerplugins/clang/test/locking2.cxx create mode 100644 compilerplugins/clang/test/logexceptionnicely.cxx create mode 100644 compilerplugins/clang/test/loopvartoosmall.cxx create mode 100644 compilerplugins/clang/test/makeshared.cxx create mode 100644 compilerplugins/clang/test/mapindex.cxx create mode 100644 compilerplugins/clang/test/moveit.cxx create mode 100644 compilerplugins/clang/test/moveparam.cxx create mode 100644 compilerplugins/clang/test/namespaceindentation.cxx create mode 100644 compilerplugins/clang/test/noexcept.cxx create mode 100644 compilerplugins/clang/test/noexceptmove.cxx create mode 100644 compilerplugins/clang/test/nullptr.cxx create mode 100644 compilerplugins/clang/test/oncevar.cxx create mode 100644 compilerplugins/clang/test/optionalbool.cxx create mode 100644 compilerplugins/clang/test/optmove.cxx create mode 100644 compilerplugins/clang/test/optvalue.cxx create mode 100644 compilerplugins/clang/test/oslendian-1.cxx create mode 100644 compilerplugins/clang/test/oslendian-2.cxx create mode 100644 compilerplugins/clang/test/oslendian-3.cxx create mode 100644 compilerplugins/clang/test/ostr.cxx create mode 100644 compilerplugins/clang/test/overridevirtual.cxx create mode 100644 compilerplugins/clang/test/passparamsbyref.cxx create mode 100644 compilerplugins/clang/test/passstuffbyref.cxx create mode 100644 compilerplugins/clang/test/pointerbool.cxx create mode 100644 compilerplugins/clang/test/putpoolitem.cxx create mode 100644 compilerplugins/clang/test/rangedforcopy.cxx create mode 100644 compilerplugins/clang/test/reducevarscope.cxx create mode 100644 compilerplugins/clang/test/redundantcast.cxx create mode 100644 compilerplugins/clang/test/redundantcast.hxx create mode 100644 compilerplugins/clang/test/redundantfcast.cxx create mode 100644 compilerplugins/clang/test/redundantinline.cxx create mode 100644 compilerplugins/clang/test/redundantinline.hxx create mode 100644 compilerplugins/clang/test/redundantpointerops.cxx create mode 100644 compilerplugins/clang/test/redundantpreprocessor.cxx create mode 100644 compilerplugins/clang/test/refassign.cxx create mode 100644 compilerplugins/clang/test/refcounting.cxx create mode 100644 compilerplugins/clang/test/referencecasting.cxx create mode 100644 compilerplugins/clang/test/returnconstval.cxx create mode 100644 compilerplugins/clang/test/salcall.cxx create mode 100644 compilerplugins/clang/test/sallogareas.cxx create mode 100644 compilerplugins/clang/test/salunicodeliteral.cxx create mode 100644 compilerplugins/clang/test/salunicodeliteral.hxx create mode 100644 compilerplugins/clang/test/selfinit.cxx create mode 100644 compilerplugins/clang/test/sequentialassign.cxx create mode 100644 compilerplugins/clang/test/shouldreturnbool.cxx create mode 100644 compilerplugins/clang/test/simplifyconstruct.cxx create mode 100644 compilerplugins/clang/test/simplifydynamiccast.cxx create mode 100644 compilerplugins/clang/test/simplifypointertobool.cxx create mode 100644 compilerplugins/clang/test/singlevalfields.cxx create mode 100644 compilerplugins/clang/test/staticconstfield.cxx create mode 100644 compilerplugins/clang/test/staticdynamic.cxx create mode 100644 compilerplugins/clang/test/staticmethods.cxx create mode 100644 compilerplugins/clang/test/staticvar.cxx create mode 100644 compilerplugins/clang/test/stdfunction.cxx create mode 100644 compilerplugins/clang/test/stringadd.cxx create mode 100644 compilerplugins/clang/test/stringbuffer.cxx create mode 100644 compilerplugins/clang/test/stringconcatauto.cxx create mode 100644 compilerplugins/clang/test/stringconcatliterals.cxx create mode 100644 compilerplugins/clang/test/stringconstant.cxx create mode 100644 compilerplugins/clang/test/stringliteraldefine.cxx create mode 100644 compilerplugins/clang/test/stringliteralvar.cxx create mode 100644 compilerplugins/clang/test/stringloop.cxx create mode 100644 compilerplugins/clang/test/stringstatic.cxx create mode 100644 compilerplugins/clang/test/stringview-c++03.cxx create mode 100644 compilerplugins/clang/test/stringview.cxx create mode 100644 compilerplugins/clang/test/stringviewdangle.cxx create mode 100644 compilerplugins/clang/test/stringviewparam.cxx create mode 100644 compilerplugins/clang/test/stringviewvar.cxx create mode 100644 compilerplugins/clang/test/trivialconstructor.cxx create mode 100644 compilerplugins/clang/test/trivialdestructor.cxx create mode 100644 compilerplugins/clang/test/typedefparam.cxx create mode 100644 compilerplugins/clang/test/typeidcomparison.cxx create mode 100644 compilerplugins/clang/test/unnecessarycatchthrow.cxx create mode 100644 compilerplugins/clang/test/unnecessarygetstr.cxx create mode 100644 compilerplugins/clang/test/unnecessarylocking.cxx create mode 100644 compilerplugins/clang/test/unnecessaryoverride-dtor.cxx create mode 100644 compilerplugins/clang/test/unnecessaryoverride-dtor.hxx create mode 100644 compilerplugins/clang/test/unnecessaryoverride.cxx create mode 100644 compilerplugins/clang/test/unnecessaryparen.cxx create mode 100644 compilerplugins/clang/test/unoaggregation.cxx create mode 100644 compilerplugins/clang/test/unoany.cxx create mode 100644 compilerplugins/clang/test/unoquery.cxx create mode 100644 compilerplugins/clang/test/unreffun.cxx create mode 100644 compilerplugins/clang/test/unreffun.hxx create mode 100644 compilerplugins/clang/test/unsignedcompare.cxx create mode 100644 compilerplugins/clang/test/unusedcapturedefault.cxx create mode 100644 compilerplugins/clang/test/unusedenumconstants.cxx create mode 100644 compilerplugins/clang/test/unusedfields.cxx create mode 100644 compilerplugins/clang/test/unusedindex.cxx create mode 100644 compilerplugins/clang/test/unusedmember.cxx create mode 100644 compilerplugins/clang/test/unusedvariablecheck.cxx create mode 100644 compilerplugins/clang/test/unusedvariablemore.cxx create mode 100644 compilerplugins/clang/test/unusedvarsglobal.cxx create mode 100644 compilerplugins/clang/test/useuniqueptr.cxx create mode 100644 compilerplugins/clang/test/vclwidgets.cxx create mode 100644 compilerplugins/clang/test/weakbase.cxx create mode 100644 compilerplugins/clang/test/writeonlyvars.cxx create mode 100644 compilerplugins/clang/test/xmlimport.cxx create mode 100644 compilerplugins/clang/trivialconstructor.cxx create mode 100644 compilerplugins/clang/trivialdestructor.cxx create mode 100644 compilerplugins/clang/typedefparam.cxx create mode 100644 compilerplugins/clang/typeidcomparison.cxx create mode 100644 compilerplugins/clang/unicodetochar.cxx create mode 100644 compilerplugins/clang/unnecessarycatchthrow.cxx create mode 100644 compilerplugins/clang/unnecessarygetstr.cxx create mode 100644 compilerplugins/clang/unnecessarylocking.cxx create mode 100644 compilerplugins/clang/unnecessaryoverride.cxx create mode 100644 compilerplugins/clang/unnecessaryparen.cxx create mode 100644 compilerplugins/clang/unnecessaryvirtual-dead.results create mode 100644 compilerplugins/clang/unnecessaryvirtual.cxx create mode 100755 compilerplugins/clang/unnecessaryvirtual.py create mode 100644 compilerplugins/clang/unnecessaryvirtual.results create mode 100644 compilerplugins/clang/unoaggregation.cxx create mode 100644 compilerplugins/clang/unoany.cxx create mode 100644 compilerplugins/clang/unoquery.cxx create mode 100644 compilerplugins/clang/unreffun.cxx create mode 100644 compilerplugins/clang/unsignedcompare.cxx create mode 100644 compilerplugins/clang/unusedcapturedefault.cxx create mode 100644 compilerplugins/clang/unusedenumconstants.cxx create mode 100755 compilerplugins/clang/unusedenumconstants.py create mode 100644 compilerplugins/clang/unusedenumconstants.readonly.results create mode 100644 compilerplugins/clang/unusedenumconstants.untouched.results create mode 100644 compilerplugins/clang/unusedenumconstants.writeonly.results create mode 100644 compilerplugins/clang/unusedfields.cxx create mode 100644 compilerplugins/clang/unusedfields.only-used-in-constructor.results create mode 100755 compilerplugins/clang/unusedfields.py create mode 100644 compilerplugins/clang/unusedfields.readonly.results create mode 100644 compilerplugins/clang/unusedfields.untouched.results create mode 100644 compilerplugins/clang/unusedfields.writeonly.results create mode 100644 compilerplugins/clang/unusedmember.cxx create mode 100644 compilerplugins/clang/unusedmethods.cxx create mode 100755 compilerplugins/clang/unusedmethods.py create mode 100644 compilerplugins/clang/unusedmethods.results create mode 100644 compilerplugins/clang/unusedmethods.unused-returns.results create mode 100644 compilerplugins/clang/unusedvariablecheck.cxx create mode 100644 compilerplugins/clang/unusedvariablecheck.hxx create mode 100644 compilerplugins/clang/unusedvariablemore.cxx create mode 100644 compilerplugins/clang/unusedvariableplus.cxx create mode 100644 compilerplugins/clang/unusedvarsglobal.cxx create mode 100755 compilerplugins/clang/unusedvarsglobal.py create mode 100644 compilerplugins/clang/unusedvarsglobal.untouched.results create mode 100644 compilerplugins/clang/unusedvarsglobal.writeonly.results create mode 100644 compilerplugins/clang/useuniqueptr.cxx create mode 100644 compilerplugins/clang/vclwidgets.cxx create mode 100644 compilerplugins/clang/virtualdead.cxx create mode 100755 compilerplugins/clang/virtualdead.py create mode 100644 compilerplugins/clang/virtualdead.results create mode 100644 compilerplugins/clang/virtualdead.unusedparams.results create mode 100644 compilerplugins/clang/virtualdown.cxx create mode 100755 compilerplugins/clang/virtualdown.py create mode 100644 compilerplugins/clang/virtualdown.results create mode 100644 compilerplugins/clang/weakbase.cxx create mode 100644 compilerplugins/clang/writeonlyvars.cxx create mode 100644 compilerplugins/clang/xmlimport.cxx (limited to 'compilerplugins') diff --git a/compilerplugins/.gitignore b/compilerplugins/.gitignore new file mode 100644 index 0000000000..01a4bb1018 --- /dev/null +++ b/compilerplugins/.gitignore @@ -0,0 +1,27 @@ +/clang/clang-timestamp +/clang/plugin.dll +/clang/plugin.so +/clang/clang.pch +/clang/clang.pch.d +/clang/sharedvisitor/*.plugininfo +/clang/sharedvisitor/analyzer +/clang/sharedvisitor/analyzer.d +/clang/sharedvisitor/analyzer.dwo +/clang/sharedvisitor/analyzer.exe +/clang/sharedvisitor/analyzer.o +/clang/sharedvisitor/clang.pch +/clang/sharedvisitor/clang.pch.d +/clang/sharedvisitor/generator +/clang/sharedvisitor/generator.d +/clang/sharedvisitor/generator.dwo +/clang/sharedvisitor/generator.exe +/clang/sharedvisitor/generator.o +/clang/sharedvisitor/sharedvisitor.cxx +/clang/sharedvisitor/sharedvisitor.d +/clang/sharedvisitor/sharedvisitor.dwo +/clang/sharedvisitor/sharedvisitor.o +/clang/sources-new.txt +/clang/sources-shared-new.txt +/clang/sources-shared.txt +/clang/sources.txt +obj diff --git a/compilerplugins/LICENSE.TXT b/compilerplugins/LICENSE.TXT new file mode 100644 index 0000000000..1e8587c1cc --- /dev/null +++ b/compilerplugins/LICENSE.TXT @@ -0,0 +1,40 @@ +University of Illinois/NCSA +Open Source License + +Copyright (c) 2012-2023 The Document Foundation +All rights reserved. + +Developed by: + + The LibreOffice developers + + The Document Foundation + + https://www.libreoffice.org/ + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal with +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies +of the Software, and to permit persons to whom the Software is furnished to do +so, subject to the following conditions: + + * Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimers. + + * Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimers in the + documentation and/or other materials provided with the distribution. + + * Neither the names of the LLVM Team, University of Illinois at + Urbana-Champaign, nor the names of its contributors may be used to + endorse or promote products derived from this Software without specific + prior written permission. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE +SOFTWARE. diff --git a/compilerplugins/Makefile b/compilerplugins/Makefile new file mode 100644 index 0000000000..b458116a2c --- /dev/null +++ b/compilerplugins/Makefile @@ -0,0 +1,23 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +ifeq ($(BUILD_TYPE),) +ifeq ($(gb_Side),) +gb_Side:=host +endif +include $(dir $(realpath $(lastword $(MAKEFILE_LIST))))../config_$(gb_Side).mk +endif + +include $(SRCDIR)/compilerplugins/Makefile.mk + +all: build +build: compilerplugins +clean: compilerplugins-clean + +# vim: set noet sw=4 ts=4: diff --git a/compilerplugins/Makefile-clang.mk b/compilerplugins/Makefile-clang.mk new file mode 100644 index 0000000000..16a75e44b4 --- /dev/null +++ b/compilerplugins/Makefile-clang.mk @@ -0,0 +1,365 @@ +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +# Make sure variables in this Makefile do not conflict with other variables (e.g. from gbuild). + +# Set to 1 if you need to debug the plugin). +CLANGDEBUG= + +# Compile flags, you may occasionally want to override these: +ifeq ($(OS),WNT) +# See LLVM's cmake/modules/AddLLVM.cmake and LLVM build's +# tools/llvm-config/BuildVariables.inc: +# * Ignore "warning C4141: 'inline': used more than once" as emitted upon +# "LLVM_ATTRIBUTE_ALWAYS_INLINE inline" in various LLVM include files. +# * Ignore "warning C4577: 'noexcept' used with no exception handling mode +# specified; termination on exception is not guaranteed. Specify /EHsc". +CLANGCXXFLAGS=/nologo /D_HAS_EXCEPTIONS=0 /wd4141 /wd4577 /EHs-c- /GR- +ifeq ($(CLANGDEBUG),) +CLANGCXXFLAGS+=/O2 /Oi +else +CLANGCXXFLAGS+=/DEBUG /Od +endif +else # WNT +CLANGCXXFLAGS=-Wall -Wextra -Wundef -fvisibility-inlines-hidden +ifeq ($(CLANGDEBUG),) +CLANGCXXFLAGS+=-O2 +else +CLANGCXXFLAGS+=-g -O0 -UNDEBUG +endif +endif + +# Whether to make plugins use one shared ASTRecursiveVisitor (plugins run faster). +# By default enabled, disable if you work on an affected plugin (re-generating takes time). +LO_CLANG_SHARED_PLUGINS=1 +#TODO: Windows doesn't use LO_CLANG_SHARED_PLUGINS for now, see corresponding TODO comment in +# configure.ac: +ifeq ($(OS),WNT) +LO_CLANG_SHARED_PLUGINS= +endif + +# Whether to use precompiled headers for the sources. This is actually controlled +# by gb_ENABLE_PCH like everywhere else, but unsetting this disables PCH. +LO_CLANG_USE_PCH=1 + +# The uninteresting rest. + +include $(SRCDIR)/solenv/gbuild/gbuild.mk +include $(SRCDIR)/solenv/gbuild/Output.mk + +CLANG_COMMA :=, + +ifeq ($(OS),WNT) +CLANG_DL_EXT = .dll +CLANG_EXE_EXT = .exe +else +CLANG_DL_EXT = .so +CLANG_EXE_EXT = +endif + +# Clang headers require these. +CLANGDEFS:=$(COMPILER_PLUGINS_CXXFLAGS) +# All include locations needed (using -isystem silences various warnings when +# including those files): +ifneq ($(OS),WNT) +CLANGDEFS:=$(filter-out -isystem/usr/include,$(foreach opt,$(CLANGDEFS),$(patsubst -I%,-isystem%,$(opt)))) +endif + +# Clang/LLVM libraries are intentionally not linked in, they are usually built as static libraries, which means the resulting +# plugin would be big (even though the clang binary already includes it all) and it'd be necessary to explicitly specify +# also all the dependency libraries. + +CLANGINDIR=$(SRCDIR)/compilerplugins/clang +# Cannot use $(WORKDIR), the plugin should survive even 'make clean', otherwise the rebuilt +# plugin will cause cache misses with ccache. +CLANGOUTDIR=$(BUILDDIR)/compilerplugins/clang +CLANGOBJDIR=$(CLANGOUTDIR)/obj + +ifdef LO_CLANG_SHARED_PLUGINS +CLANGCXXFLAGS+=-DLO_CLANG_SHARED_PLUGINS +endif + +ifneq ($(CLANGDEBUG),) +ifeq ($(HAVE_GCC_SPLIT_DWARF),TRUE) +CLANGCXXFLAGS+=-gsplit-dwarf +endif +endif + +QUIET=$(if $(verbose),,@) + +ifneq ($(ENABLE_WERROR),) +ifeq ($(OS),WNT) +CLANGWERROR := +#TODO: /WX +else +CLANGWERROR := -Werror +# When COMPILER_PLUGINS_CXXFLAGS (obtained via `llvm-config --cxxflags`) contains options like +# -Wno-maybe-uninitialized that are targeting GCC (when LLVM was actually built with GCC), and +# COMPILER_PLUGINS_CXX (defaulting to CXX) denotes a Clang that does not understand those options, +# it fails with -Werror,-Wunknown-warning-option, so we need -Wno-unknown-warning-option (but which +# GCC does not understand) at least with -Werror: +ifeq ($(COMPILER_PLUGINS_COM_IS_CLANG),TRUE) +CLANGWERROR += -Wno-unknown-warning-option +endif +endif +endif + +ifneq ($(LO_CLANG_USE_PCH),) +# Reset and enable only if actually supported and enabled. +LO_CLANG_USE_PCH= +ifneq ($(gb_ENABLE_PCH),) +ifneq ($(OS),WNT) +# Currently only Clang PCH is supported (which should usually be the case, as Clang is usually self-built). +ifneq ($(findstring clang,$(COMPILER_PLUGINS_CXX)),) +LO_CLANG_USE_PCH=1 +LO_CLANG_PCH_FLAGS:=-Xclang -fno-pch-timestamp +endif +endif +endif +endif + + +compilerplugins: compilerplugins-build + +ifdef LO_CLANG_SHARED_PLUGINS +# The shared source, intentionally put first in the list because it takes the longest to build. +CLANGSRCOUTDIR=$(CLANGOUTDIR)/sharedvisitor/sharedvisitor.cxx +CLANGSRC+=$(CLANGSRCOUTDIR) +endif +# The list of source files, generated automatically (all files in clang/, but not subdirs). +CLANGSRCINDIR=$(sort $(foreach src,$(wildcard $(CLANGINDIR)/*.cxx), $(notdir $(src)))) +CLANGSRC+=$(CLANGSRCINDIR) + +# Remember the sources and if they have changed, force plugin relinking. +CLANGSRCCHANGED= \ + $(shell mkdir -p $(CLANGOUTDIR) ; \ + echo $(CLANGSRC) | sort > $(CLANGOUTDIR)/sources-new.txt; \ + if diff $(CLANGOUTDIR)/sources.txt $(CLANGOUTDIR)/sources-new.txt >/dev/null 2>/dev/null; then \ + echo 0; \ + else \ + mv $(CLANGOUTDIR)/sources-new.txt $(CLANGOUTDIR)/sources.txt; \ + echo 1; \ + fi; \ + ) +ifeq ($(CLANGSRCCHANGED),1) +.PHONY: CLANGFORCE +CLANGFORCE: +$(CLANGOUTDIR)/plugin$(CLANG_DL_EXT): CLANGFORCE +endif +# Make the .so also explicitly depend on the sources list, to force update in case CLANGSRCCHANGED was e.g. during 'make clean'. +$(CLANGOUTDIR)/plugin$(CLANG_DL_EXT): $(CLANGOUTDIR)/sources.txt +$(CLANGOUTDIR)/sources.txt: + touch $@ + +compilerplugins-build: $(CLANGOUTDIR) $(CLANGOBJDIR) $(CLANGOUTDIR)/plugin$(CLANG_DL_EXT) + +compilerplugins-clean: + rm -rf \ + $(CLANGOBJDIR) \ + $(CLANGOUTDIR)/clang-timestamp \ + $(CLANGOUTDIR)/plugin$(CLANG_DL_EXT) \ + $(CLANGOUTDIR)/clang.pch{,.d} \ + $(CLANGOUTDIR)/sharedvisitor/*.plugininfo \ + $(CLANGOUTDIR)/sharedvisitor/clang.pch{,.d} \ + $(CLANGOUTDIR)/sharedvisitor/sharedvisitor.{cxx,d,o} \ + $(CLANGOUTDIR)/sharedvisitor/{analyzer,generator}{$(CLANG_EXE_EXT),.d,.o} \ + $(CLANGOUTDIR)/sources-new.txt \ + $(CLANGOUTDIR)/sources-shared-new.txt \ + $(CLANGOUTDIR)/sources-shared.txt \ + $(CLANGOUTDIR)/sources.txt + +$(CLANGOUTDIR): + mkdir -p $(CLANGOUTDIR) + +$(CLANGOBJDIR): + mkdir -p $(CLANGOBJDIR) + +CLANGOBJS= + +ifeq ($(OS),WNT) + +# clangbuildsrc cxxfile objfile dfile +define clangbuildsrc +$(2): $(1) $(SRCDIR)/compilerplugins/Makefile-clang.mk $(CLANGOUTDIR)/clang-timestamp + $$(call gb_Output_announce,$(subst $(SRCDIR)/,,$(subst $(BUILDDIR)/,,$(1))),$(true),CXX,3) + $(QUIET)$(COMPILER_PLUGINS_CXX) $(CLANGDEFS) $(CLANGCXXFLAGS) $(CLANGWERROR) \ + $(CLANGINCLUDES) /I$(BUILDDIR)/config_host /I$(CLANGINDIR) $(1) /MD \ + /c /Fo: $(2) + +-include $(3) #TODO + +$(CLANGOUTDIR)/plugin$(CLANG_DL_EXT): $(2) +$(CLANGOUTDIR)/plugin$(CLANG_DL_EXT): CLANGOBJS += $(2) +endef + +else + +# clangbuildsrc cxxfile ofile dfile +define clangbuildsrc +$(2): $(1) $(SRCDIR)/compilerplugins/Makefile-clang.mk $(CLANGOUTDIR)/clang-timestamp \ + $(if $(LO_CLANG_USE_PCH),$(CLANGOUTDIR)/clang.pch) + $$(call gb_Output_announce,$(subst $(SRCDIR)/,,$(subst $(BUILDDIR)/,,$(1))),$(true),CXX,3) + $(QUIET)$(COMPILER_PLUGINS_CXX) $(CLANGDEFS) $(CLANGCXXFLAGS) $(CLANGWERROR) \ + $(CLANGINCLUDES) -I$(BUILDDIR)/config_host -I$(CLANGINDIR) $(1) \ + $(if $(LO_CLANG_USE_PCH),-include-pch $(CLANGOUTDIR)/clang.pch -DPCH_LEVEL=$(gb_ENABLE_PCH)) \ + -fPIC -c -o $(2) -MMD -MT $(2) -MP -MF $(3) + +-include $(3) + +$(CLANGOUTDIR)/plugin$(CLANG_DL_EXT): $(2) +$(CLANGOUTDIR)/plugin$(CLANG_DL_EXT): CLANGOBJS += $(2) +endef + +endif + +$(foreach src, $(CLANGSRCOUTDIR), $(eval $(call clangbuildsrc,$(src),$(src:.cxx=.o),$(src:.cxx=.d)))) +$(foreach src, $(CLANGSRCINDIR), $(eval $(call clangbuildsrc,$(CLANGINDIR)/$(src),$(CLANGOBJDIR)/$(src:.cxx=.o),$(CLANGOBJDIR)/$(src:.cxx=.d)))) + +$(CLANGOUTDIR)/plugin$(CLANG_DL_EXT): $(CLANGOBJS) + $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),LNK,4) +ifeq ($(OS),WNT) + $(QUIET)$(COMPILER_PLUGINS_CXX) /LD $(CLANGOBJS) /Fe: $@ $(CLANGLIBDIR)/clang.lib \ + mincore.lib version.lib /link $(COMPILER_PLUGINS_CXX_LINKFLAGS) +else + $(QUIET)$(COMPILER_PLUGINS_CXX) -shared $(CLANGOBJS) -o $@ \ + $(if $(filter MACOSX,$(OS)),-Wl$(CLANG_COMMA)-flat_namespace \ + -Wl$(CLANG_COMMA)-undefined -Wl$(CLANG_COMMA)suppress) +endif + +# Clang most probably doesn't maintain binary compatibility, so rebuild when clang changes +# (either the binary can change if it's a local build, or config_clang.h will change if configure detects +# a new version of a newly installed system clang). +$(CLANGOUTDIR)/clang-timestamp: $(CLANGDIR)/bin/clang$(CLANG_EXE_EXT) $(BUILDDIR)/config_host/config_clang.h + $(QUIET)touch $@ + + +ifdef LO_CLANG_SHARED_PLUGINS +SHARED_SOURCES := $(sort $(shell grep -l "LO_CLANG_SHARED_PLUGINS" $(CLANGINDIR)/*.cxx)) +SHARED_SOURCE_INFOS := $(foreach source,$(SHARED_SOURCES),$(patsubst $(CLANGINDIR)/%.cxx,$(CLANGOUTDIR)/sharedvisitor/%.plugininfo,$(source))) + +$(CLANGOUTDIR)/sharedvisitor/%.plugininfo: $(CLANGINDIR)/%.cxx \ + $(CLANGOUTDIR)/sharedvisitor/analyzer$(CLANG_EXE_EXT) \ + $(CLANGOUTDIR)/sharedvisitor/clang.pch + $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),GEN,1) + $(QUIET)$(ICECREAM_RUN) $(CLANGOUTDIR)/sharedvisitor/analyzer$(CLANG_EXE_EXT) \ + $(COMPILER_PLUGINS_TOOLING_ARGS:%=-arg=%) $< > $@ + +$(CLANGOUTDIR)/sharedvisitor/sharedvisitor.cxx: $(SHARED_SOURCE_INFOS) $(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT) + $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),GEN,1) + $(QUIET)$(ICECREAM_RUN) $(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT) \ + $(SHARED_SOURCE_INFOS) > $@ + +# Flags used internally in analyzer. +# Older versions of Clang have a problem to find their own internal headers, so add it. +# Also filter out the c++ library, it's not necessary to be specific about it in this case +# and it can also cause trouble with finding the proper headers. +CLANGTOOLDEFS = $(filter-out -stdlib=%,$(CLANGDEFS) -I$(CLANGSYSINCLUDE)) +CLANGTOOLDEFS += -w +ifneq ($(filter MACOSX,$(OS)),) +CLANGTOOLLIBS += -Wl,-rpath,$(CLANGLIBDIR) +else ifneq ($(filter-out WNT,$(OS)),) +ifneq ($(CLANGDIR),/usr) +# Help the generator find Clang shared libs, if Clang is built so and installed in a non-standard prefix. +CLANGTOOLLIBS += -Wl,--rpath,$(CLANGLIBDIR) +endif +endif + +$(CLANGOUTDIR)/sharedvisitor/analyzer$(CLANG_EXE_EXT): $(CLANGINDIR)/sharedvisitor/analyzer.cxx \ + | $(CLANGOUTDIR)/sharedvisitor + $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),GEN,1) + $(QUIET)$(COMPILER_PLUGINS_CXX) $(CLANGDEFS) $(CLANGCXXFLAGS) $(CLANGWERROR) $(CLANGINCLUDES) \ + -I$(BUILDDIR)/config_host -DCLANGFLAGS='"$(CLANGTOOLDEFS)"' \ + -DLO_CLANG_USE_ANALYZER_PCH=$(if $(COMPILER_PLUGINS_ANALYZER_PCH),1,0) \ + -c $< -o $(CLANGOUTDIR)/sharedvisitor/analyzer.o -MMD -MT $@ -MP \ + -MF $(CLANGOUTDIR)/sharedvisitor/analyzer.d + $(QUIET)$(COMPILER_PLUGINS_CXX) $(CLANGDEFS) $(CLANGCXXFLAGS) $(CLANGOUTDIR)/sharedvisitor/analyzer.o \ + -o $@ $(CLANGTOOLLIBS) + +$(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT): $(CLANGINDIR)/sharedvisitor/generator.cxx \ + | $(CLANGOUTDIR)/sharedvisitor + $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),GEN,1) + $(QUIET)$(COMPILER_PLUGINS_CXX) $(CLANGDEFS) $(CLANGCXXFLAGS) $(CLANGWERROR) \ + -c $< -o $(CLANGOUTDIR)/sharedvisitor/generator.o -MMD -MT $@ -MP \ + -MF $(CLANGOUTDIR)/sharedvisitor/generator.d + $(QUIET)$(COMPILER_PLUGINS_CXX) $(CLANGDEFS) $(CLANGCXXFLAGS) $(CLANGOUTDIR)/sharedvisitor/generator.o \ + -o $@ + +$(CLANGOUTDIR)/sharedvisitor/analyzer$(CLANG_EXE_EXT): $(SRCDIR)/compilerplugins/Makefile-clang.mk $(CLANGOUTDIR)/clang-timestamp + +$(CLANGOUTDIR)/sharedvisitor/generator$(CLANG_EXE_EXT): $(SRCDIR)/compilerplugins/Makefile-clang.mk + +$(CLANGOUTDIR)/sharedvisitor: + mkdir -p $(CLANGOUTDIR)/sharedvisitor + +-include $(CLANGOUTDIR)/sharedvisitor/analyzer.d +-include $(CLANGOUTDIR)/sharedvisitor/generator.d +# TODO WNT version + +# Remember the sources that are shared and if they have changed, force sharedvisitor.cxx generating. +# Duplicated from CLANGSRCCHANGED above. +CLANGSRCSHAREDCHANGED= \ + $(shell mkdir -p $(CLANGOUTDIR) ; \ + echo $(SHARED_SOURCES) | sort > $(CLANGOUTDIR)/sources-shared-new.txt; \ + if diff $(CLANGOUTDIR)/sources-shared.txt $(CLANGOUTDIR)/sources-shared-new.txt >/dev/null 2>/dev/null; then \ + echo 0; \ + else \ + mv $(CLANGOUTDIR)/sources-shared-new.txt $(CLANGOUTDIR)/sources-shared.txt; \ + echo 1; \ + fi; \ + ) +ifeq ($(CLANGSRCSHAREDCHANGED),1) +.PHONY: CLANGFORCE +CLANGFORCE: +$(CLANGOUTDIR)/sharedvisitor/sharedvisitor.cxx: CLANGFORCE +endif +# Make sharedvisitor.cxx also explicitly depend on the sources list, to force update in case CLANGSRCSHAREDCHANGED was e.g. during 'make clean'. +$(CLANGOUTDIR)/sharedvisitor/sharedvisitor.cxx: $(CLANGOUTDIR)/sources-shared.txt +$(CLANGOUTDIR)/sources-shared.txt: + touch $@ +endif + +ifneq ($(LO_CLANG_USE_PCH),) +# the PCH for plugin sources themselves + +ifeq ($(OS),WNT) +# TODO +else +$(CLANGOUTDIR)/clang.pch: $(CLANGINDIR)/precompiled_clang.hxx \ + $(SRCDIR)/compilerplugins/Makefile-clang.mk $(CLANGOUTDIR)/clang-timestamp + $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),PCH,1) + $(QUIET)$(COMPILER_PLUGINS_CXX) -x c++-header $(CLANGDEFS) $(CLANGCXXFLAGS) $(CLANGWERROR) \ + $(CLANGINCLUDES) -I$(BUILDDIR)/config_host -I$(CLANGINDIR) -DPCH_LEVEL=$(gb_ENABLE_PCH) \ + $(LO_CLANG_PCH_FLAGS) \ + -fPIC -c $< -o $@ -MMD -MT $@ -MP -MF $(CLANGOUTDIR)/clang.pch.d +endif +-include $(CLANGOUTDIR)/clang.pch.d + +endif + +ifeq ($(COMPILER_PLUGINS_ANALYZER_PCH),TRUE) +# the PCH for usage in sharedvisitor/analyzer + +# these are from the invocation in analyzer.cxx +LO_CLANG_ANALYZER_PCH_CXXFLAGS := -I$(BUILDDIR)/config_host $(CLANGTOOLDEFS) + +$(CLANGOUTDIR)/sharedvisitor/clang.pch: $(CLANGINDIR)/sharedvisitor/precompiled_clang.hxx \ + $(SRCDIR)/compilerplugins/Makefile-clang.mk $(CLANGOUTDIR)/clang-timestamp \ + | $(CLANGOUTDIR)/sharedvisitor + $(call gb_Output_announce,$(subst $(BUILDDIR)/,,$@),$(true),PCH,1) + $(QUIET)$(CLANGDIR)/bin/clang -x c++-header $(LO_CLANG_ANALYZER_PCH_CXXFLAGS) \ + $(LO_CLANG_PCH_FLAGS) $(COMPILER_PLUGINS_TOOLING_ARGS) -c $< -o $@ -MMD -MT $@ -MP \ + -MF $(CLANGOUTDIR)/sharedvisitor/clang.pch.d + +-include $(CLANGOUTDIR)/sharedvisitor/clang.pch.d + +else +$(CLANGOUTDIR)/sharedvisitor/clang.pch: + touch $@ +endif + +# vim: set noet sw=4 ts=4: diff --git a/compilerplugins/Makefile.mk b/compilerplugins/Makefile.mk new file mode 100644 index 0000000000..5da6967c16 --- /dev/null +++ b/compilerplugins/Makefile.mk @@ -0,0 +1,36 @@ +# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*- +# +# This file is part of the LibreOffice project. +# +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. +# + +.PHONY: compilerplugins compilerplugins-clean + +ifeq ($(COMPILER_PLUGINS),) + +# no support + +compilerplugins: +compilerplugins-clean: +compilerplugins.clean: + +else + +ifeq ($(COM_IS_CLANG),TRUE) + +compilerplugins: + $(MAKE) $(PARALLELISM_OPTION) -f $(SRCDIR)/compilerplugins/Makefile-clang.mk compilerplugins + +compilerplugins-clean: + $(MAKE) -f $(SRCDIR)/compilerplugins/Makefile-clang.mk compilerplugins-clean + +compilerplugins.clean: compilerplugins-clean + +endif + +endif + +# vim: set noet sw=4 ts=4: diff --git a/compilerplugins/README.md b/compilerplugins/README.md new file mode 100644 index 0000000000..8f8a51bd6f --- /dev/null +++ b/compilerplugins/README.md @@ -0,0 +1,71 @@ +# Compiler plugins + +## Overview + +This directory contains code for compiler plugins. These are used to perform +additional actions during compilation (such as additional warnings) and +also to perform mass code refactoring. + +Currently only the Clang compiler is supported . + +## Usage + +Compiler plugins are enabled automatically by `--enable-dbgutil` if Clang headers +are found or explicitly using `--enable-compiler-plugins`. + +## Functionality + +There are two kinds of plugin actions: + +- compile checks - these are run during normal compilation +- rewriters - these must be run manually and modify source files + +Each source has a comment saying whether it's compile check or a rewriter +and description of functionality. + +### Compile Checks + +Used during normal compilation to perform additional checks. +All warnings and errors are marked '[loplugin]' in the message. + +### Rewriters + +Rewriters analyse and possibly modify given source files. +Usage: `make COMPILER_PLUGIN_TOOL=` +Additional optional make arguments: + +- it is possible to also pass `FORCE_COMPILE=all` to make to trigger rebuild of all source files, + even those that are up to date. FORCE_COMPILE takes a list of gbuild targets specifying + where to run the rewriter ('all' means everything, '-' prepended means to not enable, '/' appended means + everything in the directory; there is no ordering, more specific overrides + more general, and disabling takes precedence). + Example: FORCE_COMPILE="all -sw/ -Library_sc" + +- `UPDATE_FILES=` - limits which modified files will be actually written back with the changes + - `mainfile` - only the main `.cxx` file will be modified (default) + - `all` - all source files involved will be modified (possibly even header files from other LO modules), + 3rd party header files are however never modified + - `` - only files in the given LO module (toplevel directory) will be modified (including headers) + +Modifications will be written directly to the source files. + +Some rewriter plugins are dual-mode and can also be used in a non-rewriting mode +in which they emit warnings for problematic code that they would otherwise +automatically rewrite. When any rewriter is enabled explicitly via `make +COMPILER_PLUGIN_TOOL=` it works in rewriting mode (and all other +plugins are disabled), but when no rewriter is explicitly enabled (i.e., just +`make`), all dual-mode rewriters are enabled in non-rewriting mode (along with +all non-rewriter plugins; and all non--dual-mode plugins are disabled). The +typical process to use such a dual-mode rewriter X in rewriting mode is + + make COMPILER_PLUGIN_WARNINGS_ONLY=X \ + && make COMPILER_PLUGIN_TOOL=X FORCE_COMPILE=all UPDATE_FILES=all + +which first generates a full build without failing due to warnings from plugin +X in non-rewriting mode (in case of `--enable-werror`) and then repeats the build +in rewriting mode (during which no object files are generate). + + +## Code Documentation / HowTos + + diff --git a/compilerplugins/clang/automem.cxx b/compilerplugins/clang/automem.cxx new file mode 100644 index 0000000000..92478b9fbb --- /dev/null +++ b/compilerplugins/clang/automem.cxx @@ -0,0 +1,92 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include +#include +#include +#include +#include "config_clang.h" +#include "plugin.hxx" + +/** + Find calls to "delete x" where x is a field on an object. + Should rather be using std::unique_ptr +*/ + +namespace { + +class AutoMem: + public loplugin::FilteringPlugin +{ +public: + explicit AutoMem(loplugin::InstantiationData const & data): FilteringPlugin(data), mbInsideDestructor(false) {} + + virtual void run() override + { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + + bool TraverseCXXDestructorDecl(CXXDestructorDecl* ); + bool VisitCXXDeleteExpr(const CXXDeleteExpr* ); +private: + bool mbInsideDestructor; +}; + +bool AutoMem::TraverseCXXDestructorDecl(CXXDestructorDecl* expr) +{ + mbInsideDestructor = true; + bool ret = RecursiveASTVisitor::TraverseCXXDestructorDecl(expr); + mbInsideDestructor = false; + return ret; +} + +bool AutoMem::VisitCXXDeleteExpr(const CXXDeleteExpr* expr) +{ + if (ignoreLocation( expr )) + return true; + StringRef aFileName = getFilenameOfLocation(compiler.getSourceManager().getSpellingLoc(expr->getBeginLoc())); + if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/include/salhelper/") + || loplugin::hasPathnamePrefix(aFileName, SRCDIR "/include/osl/") + || loplugin::hasPathnamePrefix(aFileName, SRCDIR "/salhelper/") + || loplugin::hasPathnamePrefix(aFileName, SRCDIR "/store/") + || loplugin::hasPathnamePrefix(aFileName, SRCDIR "/sal/")) + return true; + + if (mbInsideDestructor) + return true; + + const ImplicitCastExpr* pCastExpr = dyn_cast(expr->getArgument()); + if (!pCastExpr) + return true; + const MemberExpr* pMemberExpr = dyn_cast(pCastExpr->getSubExpr()); + if (!pMemberExpr) + return true; + // ignore union games + const FieldDecl* pFieldDecl = dyn_cast(pMemberExpr->getMemberDecl()); + if (!pFieldDecl) + return true; + TagDecl const * td = dyn_cast(pFieldDecl->getDeclContext()); + if (td->isUnion()) + return true; + + report( + DiagnosticsEngine::Warning, + "calling delete on object field, rather use std::unique_ptr or std::scoped_ptr", + expr->getBeginLoc()) + << expr->getSourceRange(); + return true; +} + +loplugin::Plugin::Registration< AutoMem > X("automem", false); + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/badstatics.cxx b/compilerplugins/clang/badstatics.cxx new file mode 100644 index 0000000000..3282180864 --- /dev/null +++ b/compilerplugins/clang/badstatics.cxx @@ -0,0 +1,284 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef LO_CLANG_SHARED_PLUGINS + +#include + +#include "check.hxx" +#include "plugin.hxx" + +namespace { + +class BadStatics + : public loplugin::FilteringPlugin +{ + +public: + explicit BadStatics(loplugin::InstantiationData const& rData): + FilteringPlugin(rData) {} + + bool preRun() override { + return compiler.getLangOpts().CPlusPlus; // no non-trivial dtors in C + } + + void run() override { + if (preRun()) { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + } + + static std::pair> isBadStaticType( + QualType const& rpType, std::vector & chain, + std::vector const& rParents) + { + QualType pt; + if (rpType->isAnyPointerType()) { + pt = rpType->getPointeeType(); + } else if (auto at = rpType->getAsArrayTypeUnsafe()) { + pt = at->getElementType(); + } else if (auto rt = rpType->getAs()) { + pt = rt->getPointeeType(); + } + if (!pt.isNull()) { + QualType const pPointee(pt.getUnqualifiedType().getCanonicalType()); + auto const iter(std::find(rParents.begin(), rParents.end(), pPointee)); + if (iter == rParents.end()) + { + std::vector copy(rParents); + copy.push_back(rpType.getUnqualifiedType().getCanonicalType()); + return isBadStaticType(pt, chain, copy); + } else { + return std::make_pair(false, std::vector()); + } + } + RecordType const*const pRecordType(rpType->getAs()); + if (!pRecordType) { + return std::make_pair(false, std::vector()); + } + auto const type = loplugin::TypeCheck(rpType); + if ( type.Class("Image").GlobalNamespace() + || type.Class("Bitmap").GlobalNamespace() + || type.Class("BitmapEx").GlobalNamespace() + || type.Class("VclPtr").GlobalNamespace() + ) + { + return std::make_pair(true, chain); + } + if (type.Class("array").StdNamespace() + || type.Class("deque").StdNamespace() + || type.Class("forward_list").StdNamespace() + || type.Class("initializer_list").StdNamespace() + || type.Class("list").StdNamespace() + || type.Class("multiset").StdNamespace() + || type.Class("set").StdNamespace() + || type.Class("unordered_multiset").StdNamespace() + || type.Class("unordered_set").StdNamespace() + || type.Class("vector").StdNamespace()) + { + std::vector copy(rParents); + copy.push_back(rpType.getUnqualifiedType().getCanonicalType()); + auto ctsd = dyn_cast( + pRecordType->getDecl()); + assert(ctsd != nullptr); + auto const & args = ctsd->getTemplateArgs(); + assert(args.size() >= 1); + return isBadStaticType(args.get(0).getAsType(), chain, copy); + } + if (type.Class("map").StdNamespace() + || type.Class("multimap").StdNamespace() + || type.Class("unordered_map").StdNamespace() + || type.Class("unordered_multimap").StdNamespace()) + { + std::vector copy(rParents); + copy.push_back(rpType.getUnqualifiedType().getCanonicalType()); + auto ctsd = dyn_cast( + pRecordType->getDecl()); + assert(ctsd != nullptr); + auto const & args = ctsd->getTemplateArgs(); + assert(args.size() >= 2); + auto ret = isBadStaticType(args.get(0).getAsType(), chain, copy); + if (ret.first) { + return ret; + } + return isBadStaticType(args.get(1).getAsType(), chain, copy); + } + RecordDecl const*const pDefinition(pRecordType->getDecl()->getDefinition()); + if (!pDefinition) { // maybe no definition if it's a pointer/reference + return std::make_pair(false, std::vector()); + } + if ( type.Class("DeleteOnDeinit").Namespace("vcl").GlobalNamespace() + || type.Class("weak_ptr").StdNamespace() // not owning + || type.Class("ImplWallpaper").GlobalNamespace() // very odd static instance here + || type.Class("Application").GlobalNamespace() // numerous odd subclasses in vclmain::createApplication() + || type.Class("DemoMtfApp").AnonymousNamespace().GlobalNamespace() // one of these Application with own VclPtr + ) + { + return std::make_pair(false, std::vector()); + } + std::vector copy(rParents); + copy.push_back(rpType.getUnqualifiedType().getCanonicalType()); + CXXRecordDecl const*const pDecl(dyn_cast(pDefinition)); + assert(pDecl); + for (auto it = pDecl->field_begin(); it != pDecl->field_end(); ++it) { + chain.push_back(*it); + auto const ret(isBadStaticType((*it)->getType(), chain, copy)); + chain.pop_back(); + if (ret.first) { + return ret; + } + } + for (auto it = pDecl->bases_begin(); it != pDecl->bases_end(); ++it) { + auto const ret(isBadStaticType((*it).getType(), chain, copy)); + if (ret.first) { + return ret; + } + } + for (auto it = pDecl->vbases_begin(); it != pDecl->vbases_end(); ++it) { + auto const ret(isBadStaticType((*it).getType(), chain, copy)); + if (ret.first) { + return ret; + } + } + return std::make_pair(false, std::vector()); + } + + bool VisitVarDecl(VarDecl const*const pVarDecl) + { + if (ignoreLocation(pVarDecl)) { + return true; + } + + if (pVarDecl->hasGlobalStorage() + && pVarDecl->isThisDeclarationADefinition()) + { + auto const name(pVarDecl->getName()); + if ( name == "s_pPreviousView" // not an owning pointer + || name == "s_pDefCollapsed" // SvImpLBox::~SvImpLBox() + || name == "s_pDefExpanded" // SvImpLBox::~SvImpLBox() + || name == "g_pDDSource" // SvTreeListBox::dispose() + || name == "g_pDDTarget" // SvTreeListBox::dispose() + || name == "g_pSfxApplication" // SfxApplication::~SfxApplication() + || name == "s_SidebarResourceManagerInstance" // ResourceManager::disposeDecks() + || name == "s_pGallery" // this is not entirely clear but apparently the GalleryThemeCacheEntry are deleted by GalleryBrowser2::SelectTheme() or GalleryBrowser2::dispose() + || name == "s_ExtMgr" // TheExtensionManager::disposing() + || name == "s_pDocLockedInsertingLinks" // not owning + || name == "s_pVout" // FrameFinit() + || name == "s_pPaintQueue" // SwPaintQueue::Remove() + || name == "gProp" // only owned (VclPtr) member cleared again + || name == "g_OszCtrl" // SwCrsrOszControl::Exit() + || name == "g_pSpellIter" // SwEditShell::SpellEnd() + || name == "g_pConvIter" // SwEditShell::SpellEnd() + || name == "g_pHyphIter" // SwEditShell::HyphEnd() + || name == "xFieldEditEngine" // ScGlobal::Clear() + || name == "xDrawClipDocShellRef" // ScGlobal::Clear() + || name == "s_ImageTree" + // ImageTree::get(), ImageTree::shutDown() + || name == "s_pMouseFrame" + // vcl/osx/salframeview.mm, mouseEntered/Exited, not owning + || name == "pCurrentMenuBar" + // vcl/osx/salmenu.cxx, AquaSalMenu::set/unsetMainMenu, not + // owning + || name == "s_pCaptureFrame" // vcl/osx/salframe.cxx, not owning + || name == "pBlink" + // sw/source/core/text/blink.cxx, _TextFinit() + || name == "s_pIconCache" + // sd/source/ui/tools/IconCache.cxx, leaked + || name == "maInstanceMap" + // sd/source/ui/framework/tools/FrameworkHelper.cxx, would + // leak ViewShellBase* keys if that map is not empty at exit + || name == "theAddInAsyncTbl" + // sc/source/core/tool/adiasync.cxx, would leak + // ScAddInAsync* keys if that set is not empty at exit + || name == "g_aWindowList" + //vcl/unx/gtk3/a11y/atkutil.cxx, asserted empty at exit + || name == "gFontPreviewVirDevs" + //svtools/source/control/ctrlbox.cxx, empty at exit + || name == "gStylePreviewCache" // svx/source/tbxctrls/StylesPreviewWindow.cxx + || name == "aLogger" // FormulaLogger& FormulaLogger::get() in sc/source/core/tool/formulalogger.cxx + || name == "s_aUncommittedRegistrations" // sw/source/uibase/dbui/dbmgr.cxx + || (loplugin::DeclCheck(pVarDecl).Var("aAllListeners") + .Class("ScAddInListener").GlobalNamespace()) // not owning + || (loplugin::DeclCheck(pVarDecl).Var("maThreadSpecific") + .Class("ScDocument").GlobalNamespace()) // not owning + || name == "s_aLOKWindowsMap" // LOK only, guarded by assert, and LOK never tries to perform a VCL cleanup + || name == "s_aLOKWeldBuildersMap" // LOK only, similar case as above + || name == "s_aLOKPopupsMap" // LOK only, similar case as above + || name == "m_pNotebookBarWeldedWrapper" // LOK only, warning about map's key, no VCL cleanup performed + || name == "m_pNotebookBarInstance" // LOK only case, when notebookbar is closed - VclPtr instance is removed + || name == "gStaticManager" // vcl/source/graphic/Manager.cxx - stores non-owning pointers + || name == "aThreadedInterpreterPool" // ScInterpreterContext(Pool), not owning + || name == "aNonThreadedInterpreterPool" // ScInterpreterContext(Pool), not owning + || name == "lcl_parserContext" // getParserContext(), the chain from this to a VclPtr is not owning + || name == "aReaderWriter" // /home/noel/libo/sw/source/filter/basflt/fltini.cxx, non-owning + || name == "aTwain" + // Windows-only extensions/source/scanner/scanwin.cxx, problematic + // Twain::mpThread -> ShimListenerThread::mxTopWindow released via Twain::Reset + // clearing mpThread + || name == "g_newReadOnlyDocs" + // sfx2/source/doc/docfile.cxx, warning about map's key + || name == "g_existingReadOnlyDocs" + // sfx2/source/doc/docfile.cxx, warning about map's key + || name == "gaFramesArr_Impl" + // sfx2/source/view/frame.cxx, vector of pointer, so not a problem, nothing is going to happen on shutdown + || name == "g_pOLELRU_Cache" || name == "s_aTableColumnsMap" + // TODO + || name == "SINGLETON" + // TheAquaA11yFocusTracker in vcl/osx/a11yfocustracker.cxx, + // AquaA11yFocusTracker::m_aDocumentWindowList elements symmetrically added and + // removed in AquaA11yFocusTracker::window_got_focus and + // AquaA11yFocusTracker::WindowEventHandler (TODO: is that guaranteed?) + ) // these variables appear unproblematic + { + return true; + } + // these two are fairly harmless because they're both empty objects + if ( name == "s_xEmptyController" // svx/source/fmcomp/gridcell.cxx + || name == "xCell" // svx/source/table/svdotable.cxx + ) + { + return true; + } + // ignore pointers, nothing happens to them on shutdown + QualType const pCanonical(pVarDecl->getType().getUnqualifiedType().getCanonicalType()); + if (pCanonical->isPointerType()) { + return true; + } + std::vector pad; + auto const ret(isBadStaticType(pVarDecl->getType(), pad, + std::vector())); + if (ret.first) { + report(DiagnosticsEngine::Warning, + "bad static variable causes crash on shutdown", + pVarDecl->getLocation()) + << pVarDecl->getSourceRange(); + if (!isUnitTestMode()) + { + for (auto i: ret.second) { + report(DiagnosticsEngine::Note, + "... due to this member of %0", + i->getLocation()) + << i->getParent() << i->getSourceRange(); + } + } + } + } + + return true; + } + +}; + +loplugin::Plugin::Registration badstatics("badstatics"); + +} // namespace + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/blockblock.cxx b/compilerplugins/clang/blockblock.cxx new file mode 100644 index 0000000000..bfcb0206df --- /dev/null +++ b/compilerplugins/clang/blockblock.cxx @@ -0,0 +1,109 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef LO_CLANG_SHARED_PLUGINS + +#include +#include +#include +#include +#include +#include "config_clang.h" +#include "plugin.hxx" + +/** + Check for places where we declare a block directly inside a block + */ +namespace { + +class BlockBlock: + public loplugin::FilteringPlugin +{ +public: + explicit BlockBlock(loplugin::InstantiationData const & data): + FilteringPlugin(data) {} + + virtual bool preRun() override + { + StringRef fn(handler.getMainFileName()); + if (loplugin::isSamePathname(fn, SRCDIR "/sal/osl/unx/file_misc.cxx")) + return false; + return true; + } + + void run() override { + if (preRun()) { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + } + + bool VisitCompoundStmt(CompoundStmt const * ); + bool VisitCaseStmt(CaseStmt const * ); +}; + +bool BlockBlock::VisitCompoundStmt(CompoundStmt const * compound) +{ + if (ignoreLocation(compound)) + return true; + if (compound->size() != 1) + return true; + auto inner = *compound->body_begin(); + if (!isa(inner)) + return true; + if (compiler.getSourceManager().isMacroBodyExpansion(compound->getBeginLoc())) + return true; + if (compiler.getSourceManager().isMacroBodyExpansion(inner->getBeginLoc())) + return true; + if (containsPreprocessingConditionalInclusion(compound->getSourceRange())) { + return true; + } + report( + DiagnosticsEngine::Warning, + "block directly inside block", + compound->getBeginLoc()) + << compound->getSourceRange(); + report( + DiagnosticsEngine::Note, + "inner block here", + inner->getBeginLoc()) + << inner->getSourceRange(); + return true; +} + +bool BlockBlock::VisitCaseStmt(CaseStmt const * caseStmt) +{ + if (ignoreLocation(caseStmt)) + return true; + auto compoundStmt = dyn_cast(caseStmt->getSubStmt()); + if (!compoundStmt) + return true; + if (compoundStmt->size() != 2) + return true; + auto it = compoundStmt->body_begin(); + auto inner1 = *it; + if (!isa(inner1)) + return true; + ++it; + if (!isa(*it)) + return true; + report( + DiagnosticsEngine::Warning, + "block directly inside block", + compoundStmt->getBeginLoc()) + << compoundStmt->getSourceRange(); + return true; +} + +loplugin::Plugin::Registration< BlockBlock > blockblock("blockblock", true); + +} + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/bufferadd.cxx b/compilerplugins/clang/bufferadd.cxx new file mode 100644 index 0000000000..7b3eaf7e41 --- /dev/null +++ b/compilerplugins/clang/bufferadd.cxx @@ -0,0 +1,393 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef LO_CLANG_SHARED_PLUGINS + +#include +#include +#include +#include + +#include "plugin.hxx" +#include "check.hxx" +#include "config_clang.h" +#include "clang/AST/CXXInheritance.h" +#include "clang/AST/StmtVisitor.h" + +/** + Look for *StringBuffer append sequences which can be converted to *String + sequences. +*/ + +namespace +{ +class BufferAdd : public loplugin::FilteringPlugin +{ +public: + explicit BufferAdd(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + bool preRun() override + { + std::string fn(handler.getMainFileName()); + loplugin::normalizeDotDotInFilePath(fn); + if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sal/qa/rtl/oustring/")) + return false; + if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sal/qa/rtl/oustringbuffer/")) + return false; + if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sal/qa/rtl/strings/")) + return false; + if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sal/qa/OStringBuffer/")) + return false; + // some false + + if (loplugin::isSamePathname(fn, SRCDIR "/unoidl/source/sourcetreeprovider.cxx")) + return false; + if (loplugin::isSamePathname(fn, SRCDIR "/writerfilter/source/dmapper/StyleSheetTable.cxx")) + return false; + if (loplugin::isSamePathname(fn, SRCDIR "/writerfilter/source/dmapper/GraphicImport.cxx")) + return false; + if (loplugin::isSamePathname(fn, SRCDIR "/sdext/source/pdfimport/pdfparse/pdfparse.cxx")) + return false; + return true; + } + + void postRun() override + { + for (auto const& pair : goodMap) + if (!isa(pair.first) && + // reference types have slightly weird behaviour + !pair.first->getType()->isReferenceType() + && badMap.find(pair.first) == badMap.end()) + report(DiagnosticsEngine::Warning, + "convert this append sequence into a *String + sequence", + pair.first->getBeginLoc()) + << pair.first->getSourceRange(); + } + + virtual void run() override + { + if (!preRun()) + return; + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + postRun(); + } + + bool VisitStmt(Stmt const*); + bool VisitCallExpr(CallExpr const*); + bool VisitCXXConstructExpr(CXXConstructExpr const*); + bool VisitUnaryOperator(UnaryOperator const*); + +private: + void findBufferAssignOrAdd(const Stmt* parentStmt, Stmt const*); + Expr const* ignore(Expr const*); + bool isSideEffectFree(Expr const*); + bool isMethodOkToMerge(CXXMemberCallExpr const*); + void addToGoodMap(const VarDecl* varDecl, const Stmt* parentStmt); + + std::unordered_map goodMap; + std::unordered_set badMap; +}; + +bool BufferAdd::VisitStmt(Stmt const* stmt) +{ + if (ignoreLocation(stmt)) + return true; + + if (!isa(stmt) && !isa(stmt) && !isa(stmt) + && !isa(stmt) && !isa(stmt) && !isa(stmt) && !isa(stmt) + && !isa(stmt) && !isa(stmt)) + return true; + + for (auto it = stmt->child_begin(); it != stmt->child_end(); ++it) + if (*it) + findBufferAssignOrAdd(stmt, *it); + + return true; +} + +bool BufferAdd::VisitCallExpr(CallExpr const* callExpr) +{ + if (ignoreLocation(callExpr)) + return true; + + for (unsigned i = 0; i != callExpr->getNumArgs(); ++i) + { + auto a = ignore(callExpr->getArg(i)); + if (auto declRefExpr = dyn_cast(a)) + if (auto varDecl = dyn_cast(declRefExpr->getDecl())) + badMap.insert(varDecl); + } + return true; +} + +bool BufferAdd::VisitCXXConstructExpr(CXXConstructExpr const* callExpr) +{ + if (ignoreLocation(callExpr)) + return true; + + for (unsigned i = 0; i != callExpr->getNumArgs(); ++i) + { + auto a = ignore(callExpr->getArg(i)); + if (auto declRefExpr = dyn_cast(a)) + if (auto varDecl = dyn_cast(declRefExpr->getDecl())) + badMap.insert(varDecl); + } + return true; +} + +bool BufferAdd::VisitUnaryOperator(const UnaryOperator* unaryOp) +{ + if (ignoreLocation(unaryOp)) + return true; + if (unaryOp->getOpcode() != UO_AddrOf) + return true; + auto a = ignore(unaryOp->getSubExpr()); + if (auto declRefExpr = dyn_cast(a)) + if (auto varDecl = dyn_cast(declRefExpr->getDecl())) + badMap.insert(varDecl); + return true; +} + +void BufferAdd::findBufferAssignOrAdd(const Stmt* parentStmt, Stmt const* stmt) +{ + if (auto exprCleanup = dyn_cast(stmt)) + stmt = exprCleanup->getSubExpr(); + if (auto switchCase = dyn_cast(stmt)) + stmt = switchCase->getSubStmt(); + if (auto declStmt = dyn_cast(stmt)) + { + if (declStmt->isSingleDecl()) + if (auto varDeclLHS = dyn_cast_or_null(declStmt->getSingleDecl())) + { + auto tc = loplugin::TypeCheck(varDeclLHS->getType()); + if (!tc.Class("OUStringBuffer").Namespace("rtl").GlobalNamespace() + && !tc.Class("OStringBuffer").Namespace("rtl").GlobalNamespace()) + return; + if (varDeclLHS->getStorageDuration() == SD_Static) + return; + if (!varDeclLHS->hasInit()) + return; + auto cxxConstructExpr = dyn_cast(ignore(varDeclLHS->getInit())); + if (cxxConstructExpr) + { + addToGoodMap(varDeclLHS, parentStmt); + return; + } + if (!isSideEffectFree(varDeclLHS->getInit())) + badMap.insert(varDeclLHS); + else + addToGoodMap(varDeclLHS, parentStmt); + } + return; + } + + // check for single calls to buffer method + + if (auto memberCallExpr = dyn_cast(stmt)) + { + if (auto declRefExprLHS + = dyn_cast(ignore(memberCallExpr->getImplicitObjectArgument()))) + { + auto methodDecl = memberCallExpr->getMethodDecl(); + if (methodDecl && methodDecl->getIdentifier()) + if (auto varDeclLHS = dyn_cast(declRefExprLHS->getDecl())) + { + auto tc = loplugin::TypeCheck(varDeclLHS->getType()); + if (tc.Class("OUStringBuffer").Namespace("rtl").GlobalNamespace() + || tc.Class("OStringBuffer").Namespace("rtl").GlobalNamespace()) + { + if (isMethodOkToMerge(memberCallExpr)) + addToGoodMap(varDeclLHS, parentStmt); + else + badMap.insert(varDeclLHS); + } + } + return; + } + } + + // now check for chained append calls + + auto expr = dyn_cast(stmt); + if (!expr) + return; + auto tc = loplugin::TypeCheck(expr->getType()); + if (!tc.Class("OUStringBuffer").Namespace("rtl").GlobalNamespace() + && !tc.Class("OStringBuffer").Namespace("rtl").GlobalNamespace()) + return; + + // unwrap the chain (which runs from right to left) + const VarDecl* varDeclLHS = nullptr; + bool good = true; + while (true) + { + auto memberCallExpr = dyn_cast(expr); + if (!memberCallExpr) + break; + good &= isMethodOkToMerge(memberCallExpr); + + if (auto declRefExprLHS + = dyn_cast(ignore(memberCallExpr->getImplicitObjectArgument()))) + { + varDeclLHS = dyn_cast(declRefExprLHS->getDecl()); + break; + } + expr = memberCallExpr->getImplicitObjectArgument(); + } + + if (varDeclLHS) + { + if (good) + addToGoodMap(varDeclLHS, parentStmt); + else + badMap.insert(varDeclLHS); + } +} + +void BufferAdd::addToGoodMap(const VarDecl* varDecl, const Stmt* parentStmt) +{ + // check that vars are all inside the same compoundstmt, if they are not, we cannot combine them + auto it = goodMap.find(varDecl); + if (it != goodMap.end()) + { + if (it->second == parentStmt) + return; + // don't treat these as parents, otherwise we eliminate .append.append sequences + if (isa(parentStmt)) + return; + if (isa(parentStmt)) + return; + badMap.insert(varDecl); + } + else + goodMap.emplace(varDecl, parentStmt); +} + +bool BufferAdd::isMethodOkToMerge(CXXMemberCallExpr const* memberCall) +{ + auto methodDecl = memberCall->getMethodDecl(); + if (methodDecl->getNumParams() == 0) + return true; + + if (auto const id = methodDecl->getIdentifier()) + { + auto name = id->getName(); + if (name == "appendUninitialized" || name == "setLength" || name == "remove" + || name == "insert" || name == "appendAscii" || name == "appendUtf32") + return false; + } + + auto rhs = memberCall->getArg(0); + if (!isSideEffectFree(rhs)) + return false; + return true; +} + +Expr const* BufferAdd::ignore(Expr const* expr) +{ + return expr->IgnoreImplicit()->IgnoreParens()->IgnoreImplicit(); +} + +bool BufferAdd::isSideEffectFree(Expr const* expr) +{ + expr = ignore(expr); + // I don't think the OUStringAppend functionality can handle this efficiently + if (isa(expr)) + return false; + // Multiple statements have a well defined evaluation order (sequence points between them) + // but a single expression may be evaluated in arbitrary order; + // if there are side effects in one of the sub-expressions that have an effect on another subexpression, + // the result may be incorrect, and you don't necessarily notice in tests because the order is compiler-dependent. + // for example see commit afd743141f7a7dd05914d0872c9afe079f16fe0c where such a refactoring introduced such a bug. + // So only consider simple RHS expressions. + if (!expr->HasSideEffects(compiler.getASTContext())) + return true; + + // check for chained adds which are side-effect free + if (auto operatorCall = dyn_cast(expr)) + { + auto op = operatorCall->getOperator(); + if (op == OO_PlusEqual || op == OO_Plus) + if (isSideEffectFree(operatorCall->getArg(0)) + && isSideEffectFree(operatorCall->getArg(1))) + return true; + } + + if (auto callExpr = dyn_cast(expr)) + { + // check for calls through OUString::number/OUString::unacquired + if (auto calleeMethodDecl = dyn_cast_or_null(callExpr->getCalleeDecl())) + if (calleeMethodDecl && calleeMethodDecl->getIdentifier()) + { + if (callExpr->getNumArgs() > 0) + { + auto tc = loplugin::TypeCheck(calleeMethodDecl->getParent()); + if (tc.Class("OUString") || tc.Class("OString")) + { + if (isSideEffectFree(callExpr->getArg(0))) + return true; + } + } + } + if (auto calleeFunctionDecl = dyn_cast_or_null(callExpr->getCalleeDecl())) + if (calleeFunctionDecl && calleeFunctionDecl->getIdentifier()) + { + auto name = calleeFunctionDecl->getName(); + // check for calls through OUStringToOString + if (name == "OUStringToOString" || name == "OStringToOUString") + if (isSideEffectFree(callExpr->getArg(0))) + return true; + // allowlist some known-safe methods + if (name.endswith("ResId") || name == "GetXMLToken") + if (isSideEffectFree(callExpr->getArg(0))) + return true; + } + // O[U]String::operator std::[u16]string_view: + if (auto const d = dyn_cast_or_null(callExpr->getCalleeDecl())) + { + auto tc = loplugin::TypeCheck(d->getParent()); + if (tc.Class("OString") || tc.Class("OUString")) + { + return true; + } + } + } + + // sometimes we have a constructor call on the RHS + if (auto constructExpr = dyn_cast(expr)) + { + auto dc = loplugin::DeclCheck(constructExpr->getConstructor()); + if (dc.MemberFunction().Class("OUString") || dc.MemberFunction().Class("OString") + || dc.MemberFunction().Class("OUStringBuffer") + || dc.MemberFunction().Class("OStringBuffer")) + if (constructExpr->getNumArgs() == 0 || isSideEffectFree(constructExpr->getArg(0))) + return true; + // Expr::HasSideEffects does not like stuff that passes through OUStringLiteral + auto dc2 = loplugin::DeclCheck(constructExpr->getConstructor()->getParent()); + if (dc2.Class("OUStringLiteral").Namespace("rtl").GlobalNamespace()) + return true; + } + + // when adding literals, we sometimes get this + if (auto functionalCastExpr = dyn_cast(expr)) + { + auto tc = loplugin::TypeCheck(functionalCastExpr->getType()); + if (tc.Class("OUStringLiteral").Namespace("rtl").GlobalNamespace()) + return isSideEffectFree(functionalCastExpr->getSubExpr()); + } + + return false; +} + +loplugin::Plugin::Registration bufferadd("bufferadd"); +} + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/buriedassign.cxx b/compilerplugins/clang/buriedassign.cxx new file mode 100644 index 0000000000..acc8bfe7dd --- /dev/null +++ b/compilerplugins/clang/buriedassign.cxx @@ -0,0 +1,650 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include +#include + +#include "plugin.hxx" +#include "check.hxx" +#include "config_clang.h" +#include "clang/AST/CXXInheritance.h" +#include "clang/AST/StmtVisitor.h" + +// This checker aims to pull buried assignments out of complex expressions, +// where they are quite hard to notice amidst the other conditional logic. + +namespace +{ +class BuriedAssign : public loplugin::FilteringPlugin +{ +public: + explicit BuriedAssign(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + virtual void run() override + { + std::string fn(handler.getMainFileName()); + loplugin::normalizeDotDotInFilePath(fn); + + // code where I don't have a better alternative + if (fn == SRCDIR "/sal/osl/unx/profile.cxx") + return; + if (fn == SRCDIR "/sal/rtl/uri.cxx") + return; + if (fn == SRCDIR "/sal/osl/unx/process.cxx") + return; + if (fn == SRCDIR "/sal/rtl/bootstrap.cxx") + return; + if (fn == SRCDIR "/i18npool/source/textconversion/genconv_dict.cxx") + return; + if (fn == SRCDIR "/soltools/cpp/_macro.c") + return; + if (fn == SRCDIR "/stoc/source/inspect/introspection.cxx") + return; + if (fn == SRCDIR "/tools/source/fsys/urlobj.cxx") + return; + if (fn == SRCDIR "/sax/source/tools/fastserializer.cxx") + return; + if (fn == SRCDIR "/svl/source/crypto/cryptosign.cxx") + return; + if (fn == SRCDIR "/svl/source/numbers/zforfind.cxx") + return; + if (fn == SRCDIR "/svl/source/numbers/zformat.cxx") + return; + if (fn == SRCDIR "/svl/source/numbers/zforscan.cxx") + return; + if (fn == SRCDIR "/svl/source/numbers/zforlist.cxx") + return; + if (fn == SRCDIR "/vcl/source/window/debugevent.cxx") + return; + if (fn == SRCDIR "/vcl/source/control/scrbar.cxx") + return; + if (fn == SRCDIR "/vcl/source/gdi/bitmap3.cxx") + return; + if (fn == SRCDIR "/vcl/source/window/menu.cxx") + return; + if (fn == SRCDIR "/vcl/source/fontsubset/sft.cxx") + return; + if (fn == SRCDIR "/vcl/unx/generic/print/prtsetup.cxx") + return; + if (fn == SRCDIR "/svtools/source/brwbox/brwbox1.cxx") + return; + if (fn == SRCDIR "/svtools/source/control/valueset.cxx") + return; + if (fn == SRCDIR "/basic/source/runtime/iosys.cxx") + return; + if (fn == SRCDIR "/basic/source/runtime/runtime.cxx") + return; + if (fn == SRCDIR "/basic/source/sbx/sbxvalue.cxx") + return; + if (fn == SRCDIR "/basic/source/sbx/sbxvalue.cxx") + return; + if (fn == SRCDIR "/sfx2/source/dialog/templdlg.cxx") + return; + if (fn == SRCDIR "/sfx2/source/view/viewfrm.cxx") + return; + if (fn == SRCDIR "/connectivity/source/commontools/dbtools.cxx") + return; + if (fn == SRCDIR "/xmloff/source/style/xmlnumfi.cxx") + return; + if (fn == SRCDIR "/xmloff/source/style/xmlnumfe .cxx") + return; + if (fn == SRCDIR "/editeng/source/items/textitem.cxx") + return; + if (fn == SRCDIR "/editeng/source/rtf/rtfitem.cxx") + return; + if (fn == SRCDIR "/editeng/source/rtf/svxrtf.cxx") + return; + if (fn == SRCDIR "/editeng/source/misc/svxacorr.cxx") + return; + if (fn == SRCDIR "/svx/source/items/numfmtsh.cxx") + return; + if (fn == SRCDIR "/svx/source/dialog/hdft.cxx") + return; + if (fn == SRCDIR "/cui/source/dialogs/insdlg.cxx") + return; + if (fn == SRCDIR "/cui/source/tabpages/paragrph.cxx") + return; + if (fn == SRCDIR "/cui/source/tabpages/page.cxx") + return; + if (fn == SRCDIR "/cui/source/tabpages/border.cxx") + return; + if (fn == SRCDIR "/cui/source/tabpages/chardlg.cxx") + return; + if (fn == SRCDIR "/cui/source/tabpages/numpages.cxx") + return; + if (fn == SRCDIR "/cui/source/dialogs/SpellDialog.cxx") + return; + if (fn == SRCDIR "/oox/source/drawingml/diagram/diagramlayoutatoms.cxx") + return; + if (fn == SRCDIR "/dbaccess/source/core/dataaccess/intercept.cxx") + return; + if (fn == SRCDIR "/writerfilter/source/dmapper/DomainMapper.cxx") + return; + if (fn == SRCDIR "/writerfilter/source/dmapper/DomainMapper_Impl.cxx") + return; + if (fn == SRCDIR "/lotuswordpro/source/filter/lwptablelayout.cxx") + return; + if (fn == SRCDIR "/i18npool/source/characterclassification/cclass_unicode_parser.cxx") + return; + if (fn == SRCDIR "/sd/source/filter/eppt/pptx-animations.cxx") + return; + if (fn == SRCDIR "/sc/source/core/tool/address.cxx") + return; + if (fn == SRCDIR "/sc/source/core/tool/interpr1.cxx") + return; + if (fn == SRCDIR "/sc/source/core/tool/interpr4.cxx") + return; + if (fn == SRCDIR "/sc/source/core/tool/interpr5.cxx") + return; + if (fn == SRCDIR "/sc/source/core/tool/compiler.cxx") + return; + if (fn == SRCDIR "/sc/source/core/data/table4.cxx") + return; + if (fn == SRCDIR "/sc/source/ui/drawfunc/fudraw.cxx") + return; + if (fn == SRCDIR "/sc/source/filter/xml/xmlcelli.cxx") + return; + if (fn == SRCDIR "/sc/source/ui/miscdlgs/crnrdlg.cxx") + return; + if (fn == SRCDIR "/sc/source/ui/app/inputwin.cxx") + return; + if (fn == SRCDIR "/sc/source/ui/view/viewfun2.cxx") + return; + if (fn == SRCDIR "/sc/source/ui/unoobj/docuno.cxx") + return; + if (fn == SRCDIR "/sc/source/ui/view/gridwin.cxx") + return; + if (fn == SRCDIR "/sw/source/core/crsr/callnk.cxx") + return; + if (fn == SRCDIR "/sw/source/core/crsr/findtxt.cxx") + return; + if (fn == SRCDIR "/sw/source/core/crsr/crsrsh.cxx") + return; + if (fn == SRCDIR "/sw/source/core/crsr/crstrvl.cxx") + return; + if (fn == SRCDIR "/sw/source/core/doc/doccomp.cxx") + return; + if (fn == SRCDIR "/sw/source/core/doc/docedt.cxx") + return; + if (fn == SRCDIR "/sw/source/core/doc/docfly.cxx") + return; + if (fn == SRCDIR "/sw/source/core/doc/DocumentRedlineManager.cxx") + return; + if (fn == SRCDIR "/sw/source/core/doc/notxtfrm.cxx") + return; + if (fn == SRCDIR "/sw/source/core/docnode/node.cxx") + return; + if (fn == SRCDIR "/sw/source/core/layout/ftnfrm.cxx") + return; + if (fn == SRCDIR "/sw/source/core/table/swtable.cxx") + return; + if (fn == SRCDIR "/sw/source/core/unocore/unoframe.cxx") + return; + if (fn == SRCDIR "/sw/source/filter/xml/xmlimp.cxx") + return; + if (fn == SRCDIR "/sw/source/uibase/docvw/edtwin.cxx") + return; + if (fn == SRCDIR "/sw/source/uibase/shells/langhelper.cxx") + return; + if (fn == SRCDIR "/sw/source/uibase/shells/tabsh.cxx") + return; + if (fn == SRCDIR "/sw/source/uibase/shells/textsh1.cxx") + return; + if (fn == SRCDIR "/sw/source/uibase/uiview/view2.cxx") + return; + if (fn == SRCDIR "/starmath/source/mathtype.cxx") + return; + if (fn == SRCDIR "/starmath/source/mathmlexport.cxx") + return; + if (fn == SRCDIR "/starmath/source/view.cxx") + return; + if (fn == SRCDIR "/xmlhelp/source/treeview/tvread.cxx") + return; + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + + bool VisitBinaryOperator(BinaryOperator const*); + bool VisitCXXOperatorCallExpr(CXXOperatorCallExpr const*); + bool VisitCompoundStmt(CompoundStmt const*); + bool VisitIfStmt(IfStmt const*); + bool VisitLabelStmt(LabelStmt const*); + bool VisitForStmt(ForStmt const*); + bool VisitCXXForRangeStmt(CXXForRangeStmt const*); + bool VisitWhileStmt(WhileStmt const*); + bool VisitDoStmt(DoStmt const*); + bool VisitCaseStmt(CaseStmt const*); + bool VisitDefaultStmt(DefaultStmt const*); + bool VisitVarDecl(VarDecl const*); + bool VisitCXXFoldExpr(CXXFoldExpr const*); + +private: + void MarkIfAssignment(Stmt const*); + void MarkAll(Stmt const*); + void MarkConditionForControlLoops(Expr const*); + + std::unordered_set m_handled; +}; + +static bool isAssignmentOp(clang::BinaryOperatorKind op) +{ + // We ignore BO_ShrAssign i.e. >>= because we use that everywhere for + // extracting data from css::uno::Any + return op == BO_Assign || op == BO_MulAssign || op == BO_DivAssign || op == BO_RemAssign + || op == BO_AddAssign || op == BO_SubAssign || op == BO_ShlAssign || op == BO_AndAssign + || op == BO_XorAssign || op == BO_OrAssign; +} + +static bool isAssignmentOp(clang::OverloadedOperatorKind Opc) +{ + // Same logic as CXXOperatorCallExpr::isAssignmentOp(), which our supported clang + // doesn't have yet. + // Except that we ignore OO_GreaterGreaterEqual i.e. >>= because we use that everywhere for + // extracting data from css::uno::Any + return Opc == OO_Equal || Opc == OO_StarEqual || Opc == OO_SlashEqual || Opc == OO_PercentEqual + || Opc == OO_PlusEqual || Opc == OO_MinusEqual || Opc == OO_LessLessEqual + || Opc == OO_AmpEqual || Opc == OO_CaretEqual || Opc == OO_PipeEqual; +} + +static const Expr* IgnoreImplicitAndConversionOperator(const Expr* expr) +{ + expr = expr->IgnoreImplicit(); + if (auto memberCall = dyn_cast(expr)) + { + if (auto conversionDecl = dyn_cast_or_null(memberCall->getMethodDecl())) + { + if (!conversionDecl->isExplicit()) + expr = memberCall->getImplicitObjectArgument()->IgnoreImplicit(); + } + } + return expr; +} + +bool BuriedAssign::VisitBinaryOperator(BinaryOperator const* binaryOp) +{ + if (ignoreLocation(binaryOp)) + return true; + if (binaryOp->getBeginLoc().isMacroID()) + return true; + if (!isAssignmentOp(binaryOp->getOpcode())) + return true; + auto expr = IgnoreImplicitAndConversionOperator(binaryOp->getRHS()); + if (auto rhs = dyn_cast(expr)) + { + // Ignore chained assignment. + // TODO limit this to only ordinary assignment + if (isAssignmentOp(rhs->getOpcode())) + m_handled.insert(rhs); + } + else if (auto rhs = dyn_cast(expr)) + { + // Ignore chained assignment. + // TODO limit this to only ordinary assignment + if (isAssignmentOp(rhs->getOperator())) + m_handled.insert(rhs); + } + else if (auto cxxConstruct = dyn_cast(expr)) + { + if (cxxConstruct->getNumArgs() == 1) + MarkIfAssignment(cxxConstruct->getArg(0)); + } + if (!m_handled.insert(binaryOp).second) + return true; + + // assignment in constructor + StringRef aFileName = getFilenameOfLocation( + compiler.getSourceManager().getSpellingLoc(binaryOp->getBeginLoc())); + if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/include/comphelper/flagguard.hxx")) + return true; + + report(DiagnosticsEngine::Warning, "buried assignment, rather put on own line", + binaryOp->getBeginLoc()) + << binaryOp->getSourceRange(); + //getParentStmt(getParentStmt(getParentStmt(getParentStmt(getParentStmt(getParentStmt(binaryOp))))))->dump(); + return true; +} + +bool BuriedAssign::VisitCXXOperatorCallExpr(CXXOperatorCallExpr const* cxxOper) +{ + if (ignoreLocation(cxxOper)) + return true; + if (cxxOper->getBeginLoc().isMacroID()) + return true; + if (!isAssignmentOp(cxxOper->getOperator())) + return true; + auto expr = IgnoreImplicitAndConversionOperator(cxxOper->getArg(1)); + if (auto rhs = dyn_cast(expr)) + { + // Ignore chained assignment. + // TODO limit this to only ordinary assignment + if (isAssignmentOp(rhs->getOpcode())) + m_handled.insert(rhs); + } + else if (auto rhs = dyn_cast(expr)) + { + // Ignore chained assignment. + // TODO limit this to only ordinary assignment + if (isAssignmentOp(rhs->getOperator())) + m_handled.insert(rhs); + } + else if (auto cxxConstruct = dyn_cast(expr)) + { + if (cxxConstruct->getNumArgs() == 1) + MarkIfAssignment(cxxConstruct->getArg(0)); + } + if (!m_handled.insert(cxxOper).second) + return true; + report(DiagnosticsEngine::Warning, "buried assignment, rather put on own line", + cxxOper->getBeginLoc()) + << cxxOper->getSourceRange(); + //getParentStmt(getParentStmt(getParentStmt(getParentStmt(getParentStmt(cxxOper)))))->dump(); + return true; +} + +bool BuriedAssign::VisitCompoundStmt(CompoundStmt const* compoundStmt) +{ + if (ignoreLocation(compoundStmt)) + return true; + for (auto i = compoundStmt->child_begin(); i != compoundStmt->child_end(); ++i) + { + if (auto expr = dyn_cast(*i)) + { + expr = expr->IgnoreImplicit(); + if (auto binaryOp = dyn_cast(expr)) + { + // ignore comma-chained statements at this level + if (binaryOp->getOpcode() == BO_Comma) + { + MarkIfAssignment(binaryOp->getLHS()); + MarkIfAssignment(binaryOp->getRHS()); + continue; + } + } + MarkIfAssignment(expr); + } + } + return true; +} + +void BuriedAssign::MarkIfAssignment(Stmt const* stmt) +{ + if (auto expr = dyn_cast_or_null(stmt)) + { + expr = expr->IgnoreImplicit(); + if (auto binaryOp = dyn_cast(expr)) + { + if (isAssignmentOp(binaryOp->getOpcode())) + { + m_handled.insert(expr); + MarkIfAssignment(binaryOp->getRHS()); // in case it is chained + } + else if (binaryOp->getOpcode() == BO_Comma) + { + MarkIfAssignment(binaryOp->getLHS()); + MarkIfAssignment(binaryOp->getRHS()); + } + } + else if (auto cxxOper = dyn_cast(expr)) + { + if (isAssignmentOp(cxxOper->getOperator())) + { + m_handled.insert(expr); + MarkIfAssignment(cxxOper->getArg(1)); // in case it is chained + } + } + } +} + +void BuriedAssign::MarkAll(Stmt const* stmt) +{ + m_handled.insert(stmt); + for (auto it = stmt->child_begin(); it != stmt->child_end(); ++it) + MarkAll(*it); +} + +/** + * Restrict this to cases where the buried assignment is part of the first + * condition inside the if condition. Other cases tend to be too hard + * too extract (notably in sw/) + */ +bool BuriedAssign::VisitIfStmt(IfStmt const* ifStmt) +{ + if (ignoreLocation(ifStmt)) + return true; + MarkIfAssignment(ifStmt->getThen()); + MarkIfAssignment(ifStmt->getElse()); + + auto expr = ifStmt->getCond(); + expr = IgnoreImplicitAndConversionOperator(expr); + expr = expr->IgnoreParens(); + expr = IgnoreImplicitAndConversionOperator(expr); + MarkAll(expr); + + if (auto binaryOp = dyn_cast(expr)) + { + if (isAssignmentOp(binaryOp->getOpcode())) + { + report(DiagnosticsEngine::Warning, "buried assignment, rather put on own line", + expr->getBeginLoc()) + << expr->getSourceRange(); + } + else if (binaryOp->isComparisonOp()) + { + if (auto binaryOp2 + = dyn_cast(binaryOp->getLHS()->IgnoreParenImpCasts())) + { + if (!binaryOp->getRHS()->isValueDependent() + && binaryOp->getRHS()->isCXX11ConstantExpr(compiler.getASTContext()) + && isAssignmentOp(binaryOp2->getOpcode())) + report(DiagnosticsEngine::Warning, "buried assignment, rather put on own line", + expr->getBeginLoc()) + << expr->getSourceRange(); + } + if (auto binaryOp2 + = dyn_cast(binaryOp->getRHS()->IgnoreParenImpCasts())) + { + if (!binaryOp->getLHS()->isValueDependent() + && binaryOp->getLHS()->isCXX11ConstantExpr(compiler.getASTContext()) + && isAssignmentOp(binaryOp2->getOpcode())) + report(DiagnosticsEngine::Warning, "buried assignment, rather put on own line", + expr->getBeginLoc()) + << expr->getSourceRange(); + } + } + else if (binaryOp->isLogicalOp()) + { + if (auto binaryOp2 + = dyn_cast(binaryOp->getLHS()->IgnoreParenImpCasts())) + { + if (isAssignmentOp(binaryOp2->getOpcode())) + report(DiagnosticsEngine::Warning, "buried assignment, rather put on own line", + expr->getBeginLoc()) + << expr->getSourceRange(); + } + } + } + else if (auto operCall = dyn_cast(expr)) + { + // Ignore chained assignment. + // TODO limit this to only ordinary assignment + if (isAssignmentOp(operCall->getOperator())) + { + report(DiagnosticsEngine::Warning, "buried assignment, rather put on own line", + expr->getBeginLoc()) + << expr->getSourceRange(); + } + } + + return true; +} + +bool BuriedAssign::VisitCaseStmt(CaseStmt const* stmt) +{ + if (ignoreLocation(stmt)) + return true; + MarkIfAssignment(stmt->getSubStmt()); + return true; +} + +bool BuriedAssign::VisitDefaultStmt(DefaultStmt const* stmt) +{ + if (ignoreLocation(stmt)) + return true; + MarkIfAssignment(stmt->getSubStmt()); + return true; +} + +bool BuriedAssign::VisitWhileStmt(WhileStmt const* stmt) +{ + if (ignoreLocation(stmt)) + return true; + MarkConditionForControlLoops(stmt->getCond()); + MarkIfAssignment(stmt->getBody()); + return true; +} + +bool BuriedAssign::VisitDoStmt(DoStmt const* stmt) +{ + if (ignoreLocation(stmt)) + return true; + MarkConditionForControlLoops(stmt->getCond()); + MarkIfAssignment(stmt->getBody()); + return true; +} + +/** stuff like + * while ((x = foo()) + * and + * while ((x = foo() < 0) + * is considered idiomatic. + */ +void BuriedAssign::MarkConditionForControlLoops(Expr const* expr) +{ + if (!expr) + return; + expr = expr->IgnoreImplicit(); + + if (auto binaryOp = dyn_cast(expr)) + { + // ignore comma-chained statements at this level + if (binaryOp->getOpcode() == BO_Comma) + { + MarkConditionForControlLoops(binaryOp->getLHS()); + MarkConditionForControlLoops(binaryOp->getRHS()); + return; + } + } + + // unwrap conversion to bool + if (auto memberCall = dyn_cast(expr)) + { + if (memberCall->getMethodDecl() && isa(memberCall->getMethodDecl())) + { + // TODO check that the conversion is converting to bool + expr = memberCall->getImplicitObjectArgument()->IgnoreImplicit(); + } + } + + if (auto binaryOp = dyn_cast(expr)) + { + // handle: ((xxx = foo()) != error) + if (binaryOp->isComparisonOp()) + { + MarkIfAssignment(binaryOp->getLHS()->IgnoreImplicit()->IgnoreParens()); + MarkIfAssignment(binaryOp->getRHS()->IgnoreImplicit()->IgnoreParens()); + } + } + else if (auto cxxOper = dyn_cast(expr)) + { + // handle: ((xxx = foo()) != error) + if (cxxOper->isComparisonOp()) + { + MarkIfAssignment(cxxOper->getArg(0)->IgnoreImplicit()->IgnoreParens()); + MarkIfAssignment(cxxOper->getArg(1)->IgnoreImplicit()->IgnoreParens()); + } + // handle: (!(xxx = foo())) + else if (cxxOper->getOperator() == OO_Exclaim) + MarkIfAssignment(cxxOper->getArg(0)->IgnoreImplicit()->IgnoreParens()); + } + else if (auto parenExpr = dyn_cast(expr)) + { + // handle: ((xxx = foo())) + MarkIfAssignment(parenExpr->getSubExpr()->IgnoreImplicit()); + } + else if (auto unaryOp = dyn_cast(expr)) + { + // handle: (!(xxx = foo())) + MarkIfAssignment(unaryOp->getSubExpr()->IgnoreImplicit()->IgnoreParens()); + } + else + MarkIfAssignment(expr); +} + +bool BuriedAssign::VisitForStmt(ForStmt const* stmt) +{ + if (ignoreLocation(stmt)) + return true; + MarkIfAssignment(stmt->getInit()); + MarkConditionForControlLoops(stmt->getCond()); + MarkIfAssignment(stmt->getInc()); + MarkIfAssignment(stmt->getBody()); + return true; +} + +bool BuriedAssign::VisitCXXForRangeStmt(CXXForRangeStmt const* stmt) +{ + if (ignoreLocation(stmt)) + return true; + MarkIfAssignment(stmt->getBody()); + return true; +} + +bool BuriedAssign::VisitLabelStmt(LabelStmt const* stmt) +{ + if (ignoreLocation(stmt)) + return true; + MarkIfAssignment(stmt->getSubStmt()); + return true; +} + +bool BuriedAssign::VisitVarDecl(VarDecl const* stmt) +{ + if (ignoreLocation(stmt)) + return true; + if (stmt->getInit()) + { + auto expr = IgnoreImplicitAndConversionOperator(stmt->getInit()); + MarkIfAssignment(expr); + if (auto cxxConstruct = dyn_cast(expr)) + { + if (cxxConstruct->getNumArgs() == 1) + MarkIfAssignment(cxxConstruct->getArg(0)); + } + } + return true; +} + +bool BuriedAssign::VisitCXXFoldExpr(CXXFoldExpr const* stmt) +{ + if (ignoreLocation(stmt)) + return true; + MarkConditionForControlLoops(stmt->getLHS()); + MarkConditionForControlLoops(stmt->getRHS()); + return true; +} + +// off by default because it uses getParentStmt so it's more expensive to run +loplugin::Plugin::Registration X("buriedassign", false); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/casttovoid.cxx b/compilerplugins/clang/casttovoid.cxx new file mode 100644 index 0000000000..c02cf68873 --- /dev/null +++ b/compilerplugins/clang/casttovoid.cxx @@ -0,0 +1,540 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include +#include + +#include "clang/AST/Attr.h" + +#include "check.hxx" +#include "plugin.hxx" + +namespace { + +bool isWarnUnusedType(QualType type) { + if (auto const t = type->getAs()) { + if (t->getDecl()->hasAttr()) { + return true; + } + } + if (auto const t = type->getAs()) { + if (t->getDecl()->hasAttr()) { + return true; + } + } + return loplugin::isExtraWarnUnusedType(type); +} + +Expr const * lookThroughInitListExpr(Expr const * expr) { + if (auto const ile = dyn_cast(expr->IgnoreParenImpCasts())) { + if (ile->getNumInits() == 1) { + return ile->getInit(0); + } + } + return expr; +} + +class CastToVoid final: + public loplugin::FilteringPlugin +{ +public: + explicit CastToVoid(loplugin::InstantiationData const & data): + FilteringPlugin(data) {} + + bool TraverseCStyleCastExpr(CStyleCastExpr * expr) { + auto const dre = checkCast(expr); + if (dre != nullptr) { + castToVoid_.push({expr, dre}); + } + auto const ret = RecursiveASTVisitor::TraverseCStyleCastExpr(expr); + if (dre != nullptr) { + assert(!castToVoid_.empty()); + assert(castToVoid_.top().cast == expr); + assert(castToVoid_.top().sub == dre); + castToVoid_.pop(); + } + return ret; + } + + bool TraverseCXXStaticCastExpr(CXXStaticCastExpr * expr) { + auto const dre = checkCast(expr); + if (dre != nullptr) { + castToVoid_.push({expr, dre}); + } + auto const ret = RecursiveASTVisitor::TraverseCXXStaticCastExpr(expr); + if (dre != nullptr) { + assert(!castToVoid_.empty()); + assert(castToVoid_.top().cast == expr); + assert(castToVoid_.top().sub == dre); + castToVoid_.pop(); + } + return ret; + } + + bool TraverseCXXFunctionalCastExpr(CXXFunctionalCastExpr * expr) { + auto const dre = checkCast(expr); + if (dre != nullptr) { + castToVoid_.push({expr, dre}); + } + auto const ret = RecursiveASTVisitor::TraverseCXXFunctionalCastExpr( + expr); + if (dre != nullptr) { + assert(!castToVoid_.empty()); + assert(castToVoid_.top().cast == expr); + assert(castToVoid_.top().sub == dre); + castToVoid_.pop(); + } + return ret; + } + + bool TraverseFunctionDecl(FunctionDecl * decl) { + returnTypes_.push(decl->getReturnType()); + auto const ret = RecursiveASTVisitor::TraverseFunctionDecl(decl); + assert(!returnTypes_.empty()); + assert(returnTypes_.top() == decl->getReturnType()); + returnTypes_.pop(); + return ret; + } + + bool TraverseCXXDeductionGuideDecl(CXXDeductionGuideDecl * decl) { + returnTypes_.push(decl->getReturnType()); + auto const ret = RecursiveASTVisitor::TraverseCXXDeductionGuideDecl( + decl); + assert(!returnTypes_.empty()); + assert(returnTypes_.top() == decl->getReturnType()); + returnTypes_.pop(); + return ret; + } + + bool TraverseCXXMethodDecl(CXXMethodDecl * decl) { + returnTypes_.push(decl->getReturnType()); + auto const ret = RecursiveASTVisitor::TraverseCXXMethodDecl(decl); + assert(!returnTypes_.empty()); + assert(returnTypes_.top() == decl->getReturnType()); + returnTypes_.pop(); + return ret; + } + + bool TraverseCXXConstructorDecl(CXXConstructorDecl * decl) { + returnTypes_.push(decl->getReturnType()); + auto const ret = RecursiveASTVisitor::TraverseCXXConstructorDecl(decl); + assert(!returnTypes_.empty()); + assert(returnTypes_.top() == decl->getReturnType()); + returnTypes_.pop(); + return ret; + } + + bool TraverseCXXDestructorDecl(CXXDestructorDecl * decl) { + returnTypes_.push(decl->getReturnType()); + auto const ret = RecursiveASTVisitor::TraverseCXXDestructorDecl(decl); + assert(!returnTypes_.empty()); + assert(returnTypes_.top() == decl->getReturnType()); + returnTypes_.pop(); + return ret; + } + + bool TraverseCXXConversionDecl(CXXConversionDecl * decl) { + returnTypes_.push(decl->getReturnType()); + auto const ret = RecursiveASTVisitor::TraverseCXXConversionDecl(decl); + assert(!returnTypes_.empty()); + assert(returnTypes_.top() == decl->getReturnType()); + returnTypes_.pop(); + return ret; + } + + bool TraverseObjCMethodDecl(ObjCMethodDecl * decl) { + returnTypes_.push(decl->getReturnType()); + auto const ret = RecursiveASTVisitor::TraverseObjCMethodDecl(decl); + assert(!returnTypes_.empty()); + assert(returnTypes_.top() == decl->getReturnType()); + returnTypes_.pop(); + return ret; + } + + bool TraverseConstructorInitializer(CXXCtorInitializer * init) { + if (auto const field = init->getAnyMember()) { + if (loplugin::TypeCheck(field->getType()).LvalueReference()) { + recordConsumption(lookThroughInitListExpr(init->getInit())); + } + } + return RecursiveASTVisitor::TraverseConstructorInitializer(init); + } + + bool TraverseLambdaExpr(LambdaExpr * expr, DataRecursionQueue * queue = nullptr) { + if (!shouldTraversePostOrder()) { + if (!WalkUpFromLambdaExpr(expr)) { + return false; + } + } + auto const n = expr->capture_size(); + for (unsigned i = 0; i != n; ++i) { + auto const c = expr->capture_begin() + i; + if (c->isExplicit() || shouldVisitImplicitCode()) { + if (!TraverseLambdaCapture(expr, c, expr->capture_init_begin()[i])) { + return false; + } + } + } + if (!TraverseCXXRecordDecl(expr->getLambdaClass())) { + return false; + } + if (!queue && shouldTraversePostOrder()) { + if (!WalkUpFromLambdaExpr(expr)) { + return false; + } + } + return true; + } + + bool VisitDeclRefExpr(DeclRefExpr const * expr) { + if (ignoreLocation(expr)) { + return true; + } + auto const var = dyn_cast(expr->getDecl()); + if (var == nullptr) { + return true; + } + if (var->getType().isVolatileQualified()) { + return true; + } + auto & usage = vars_[var->getCanonicalDecl()]; + if (!castToVoid_.empty() && castToVoid_.top().sub == expr) { + usage.castToVoid.push_back(castToVoid_.top().cast); + } else { + usage.mentioned = true; + } + return true; + } + + bool VisitImplicitCastExpr(ImplicitCastExpr const * expr) { + if (ignoreLocation(expr)) { + return true; + } + if (expr->getCastKind() != CK_LValueToRValue) { + return true; + } + recordConsumption(expr->getSubExpr()); + return true; + } + + bool VisitCallExpr(CallExpr const * expr) { + if (ignoreLocation(expr)) { + return true; + } + unsigned firstArg = 0; + if (auto const cmce = dyn_cast(expr)) { + if (auto const e1 = cmce->getMethodDecl()) { + if (e1->isConst() || e1->isStatic()) { + recordConsumption(cmce->getImplicitObjectArgument()); + } + } else if (auto const e2 = dyn_cast( + cmce->getCallee()->IgnoreParenImpCasts())) + { + switch (e2->getOpcode()) { + case BO_PtrMemD: + case BO_PtrMemI: + if (e2->getRHS()->getType()->getAs() + ->getPointeeType()->getAs() + ->isConst()) + { + recordConsumption(e2->getLHS()); + } + break; + default: + break; + } + } + } else if (isa(expr)) { + if (auto const cmd = dyn_cast_or_null( + expr->getDirectCallee())) + { + if (!cmd->isStatic()) { + assert(expr->getNumArgs() != 0); + if (cmd->isConst()) { + recordConsumption(expr->getArg(0)); + } + firstArg = 1; + } + } + } + auto fun = expr->getDirectCallee(); + if (fun == nullptr) { + return true; + } + unsigned const n = std::min(fun->getNumParams(), expr->getNumArgs()); + for (unsigned i = firstArg; i < n; ++i) { + if (!loplugin::TypeCheck(fun->getParamDecl(i)->getType()) + .LvalueReference().Const()) + { + continue; + } + recordConsumption(lookThroughInitListExpr(expr->getArg(i))); + } + return true; + } + + bool VisitCXXConstructExpr(CXXConstructExpr const * expr) { + if (ignoreLocation(expr)) { + return true; + } + auto const ctor = expr->getConstructor(); + unsigned const n = std::min(ctor->getNumParams(), expr->getNumArgs()); + for (unsigned i = 0; i != n; ++i) { + if (!loplugin::TypeCheck(ctor->getParamDecl(i)->getType()) + .LvalueReference().Const()) + { + continue; + } + recordConsumption(lookThroughInitListExpr(expr->getArg(i))); + } + return true; + } + + bool VisitReturnStmt(ReturnStmt const * stmt) { + if (ignoreLocation(stmt)) { + return true; + } + assert(!returnTypes_.empty()); + if (!loplugin::TypeCheck(returnTypes_.top()).LvalueReference().Const()) + { + return true; + } + auto const ret = stmt->getRetValue(); + if (ret == nullptr) { + return true; + } + recordConsumption(lookThroughInitListExpr(ret)); + return true; + } + + bool VisitVarDecl(VarDecl const * decl) { + if (ignoreLocation(decl)) { + return true; + } + if (!loplugin::TypeCheck(decl->getType()).LvalueReference()) { + return true; + } + auto const init = decl->getInit(); + if (init == nullptr) { + return true; + } + recordConsumption(lookThroughInitListExpr(init)); + return true; + } + + bool VisitFieldDecl(FieldDecl const * decl) { + if (ignoreLocation(decl)) { + return true; + } + if (!loplugin::TypeCheck(decl->getType()).LvalueReference()) { + return true; + } + auto const init = decl->getInClassInitializer(); + if (init == nullptr) { + return true; + } + recordConsumption(lookThroughInitListExpr(init)); + return true; + } + +private: + struct Usage { + std::vector castToVoid; + bool mentioned = false; + DeclRefExpr const * firstConsumption = nullptr; + }; + + struct Cast { + ExplicitCastExpr const * cast; + DeclRefExpr const * sub; + }; + + std::map vars_; + std::stack castToVoid_; + std::stack returnTypes_; + + void run() override { + if (compiler.getPreprocessor().getIdentifierInfo("NDEBUG")->hasMacroDefinition()) { + return; + } + if (!TraverseDecl(compiler.getASTContext().getTranslationUnitDecl())) { + return; + } + for (auto const & i: vars_) { + if (i.second.firstConsumption == nullptr) { + if (i.second.mentioned) { + continue; + } + if (isa(i.first)) { + if (!compiler.getLangOpts().CPlusPlus + || isSharedCAndCppCode(i.first)) + { + continue; + } + auto const ctxt = i.first->getDeclContext(); + if (dyn_cast_or_null(ctxt) != nullptr) { + continue; + } + auto const fun = dyn_cast_or_null(ctxt); + assert(fun != nullptr); + if (containsPreprocessingConditionalInclusion( + fun->getSourceRange())) + { + continue; + } + auto const meth = dyn_cast(fun); + report( + DiagnosticsEngine::Warning, + "unused%select{| virtual function}0 parameter name", + i.first->getLocation()) + << (meth != nullptr && meth->isVirtual()) + << i.first->getSourceRange(); + for (auto const j: i.second.castToVoid) { + report( + DiagnosticsEngine::Note, "cast to void here", + j->getExprLoc()) + << j->getSourceRange(); + } + } else if (!i.second.castToVoid.empty() + && !isWarnUnusedType(i.first->getType())) + { + auto const fun = dyn_cast_or_null(i.first->getDeclContext()); + assert(fun != nullptr); + if (containsPreprocessingConditionalInclusion(fun->getSourceRange())) { + continue; + } + report( + DiagnosticsEngine::Warning, + "unused variable %select{declaration|name}0", + i.first->getLocation()) + << i.first->isExceptionVariable() + << i.first->getSourceRange(); + for (auto const j: i.second.castToVoid) { + report( + DiagnosticsEngine::Note, "cast to void here", + j->getExprLoc()) + << j->getSourceRange(); + } + } + } else { + if (auto const fun = dyn_cast_or_null(i.first->getDeclContext())) { + if (containsPreprocessingConditionalInclusion(fun->getSourceRange())) { + continue; + } + } + for (auto const j: i.second.castToVoid) { + report( + DiagnosticsEngine::Warning, "unnecessary cast to void", + j->getExprLoc()) + << j->getSourceRange(); + report( + DiagnosticsEngine::Note, "first consumption is here", + i.second.firstConsumption->getExprLoc()) + << i.second.firstConsumption->getSourceRange(); + } + } + } + } + + bool isFromCIncludeFile(SourceLocation spellingLocation) const { + return !compiler.getSourceManager().isInMainFile(spellingLocation) + && (StringRef( + compiler.getSourceManager().getPresumedLoc(spellingLocation) + .getFilename()) + .endswith(".h")); + } + + bool isSharedCAndCppCode(VarDecl const * decl) const { + auto loc = decl->getLocation(); + while (compiler.getSourceManager().isMacroArgExpansion(loc)) { + loc = compiler.getSourceManager().getImmediateMacroCallerLoc(loc); + } + // Assume that code is intended to be shared between C and C++ if it + // comes from an include file ending in .h, and is either in an extern + // "C" context or the body of a macro definition: + return + isFromCIncludeFile(compiler.getSourceManager().getSpellingLoc(loc)) + && (decl->isInExternCContext() + || compiler.getSourceManager().isMacroBodyExpansion(loc)); + } + + DeclRefExpr const * checkCast(ExplicitCastExpr const * expr) { + if (!loplugin::TypeCheck(expr->getTypeAsWritten()).Void()) { + return nullptr; + } + if (compiler.getSourceManager().isMacroBodyExpansion( + expr->getBeginLoc())) + { + return nullptr; + } + return dyn_cast(expr->getSubExpr()->IgnoreParenImpCasts()); + } + + void recordConsumption(Expr const * expr) { + for (;;) { + expr = expr->IgnoreParenImpCasts(); + if (auto const e = dyn_cast(expr)) { + expr = e->getBase(); + continue; + } + if (auto const e = dyn_cast(expr)) { + expr = e->getBase(); + continue; + } + if (auto const e = dyn_cast(expr)) { + if (e->getOpcode() == BO_PtrMemD) { + expr = e->getLHS(); + continue; + } + } + break; + } + auto const dre = dyn_cast(expr); + if (dre == nullptr) { + return; + } + // In C (but not in C++) + // + // (void) x + // + // contains an implicit lvalue-to-rvalue cast, so VisitImplicitCastExpr + // would record that as a consumption if we didn't filter it out here: + if (!castToVoid_.empty() && castToVoid_.top().sub == dre) { + return; + } + auto const var = dyn_cast(dre->getDecl()); + if (var == nullptr) { + return; + } + if (var->getType().isVolatileQualified()) { + return; + } + auto & usage = vars_[var->getCanonicalDecl()]; + if (usage.firstConsumption != nullptr) { + return; + } + auto const loc = dre->getBeginLoc(); + if (compiler.getSourceManager().isMacroArgExpansion(loc) + && (Lexer::getImmediateMacroNameForDiagnostics( + loc, compiler.getSourceManager(), compiler.getLangOpts()) + == "assert")) + { + return; + } + usage.firstConsumption = dre; + } +}; + +static loplugin::Plugin::Registration reg("casttovoid"); + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/changetoolsgen.cxx b/compilerplugins/clang/changetoolsgen.cxx new file mode 100644 index 0000000000..f4b9b6168a --- /dev/null +++ b/compilerplugins/clang/changetoolsgen.cxx @@ -0,0 +1,376 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * Based on LLVM/Clang. + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + */ + +#include "plugin.hxx" +#include "check.hxx" +#include + +/** + * Changes calls to tools::Rectangle/Point/Size methods that return a ref to instead call the setter methods. + * + * run as: + * make COMPILER_PLUGIN_TOOL=changetoolsgen UPDATE_FILES=all FORCE_COMPILE=all + * or + * make COMPILER_PLUGIN_TOOL=changetoolsgen FORCE_COMPILE=all + */ + +namespace +{ +class ChangeToolsGen : public loplugin::FilteringRewritePlugin +{ +public: + explicit ChangeToolsGen(loplugin::InstantiationData const& data) + : FilteringRewritePlugin(data) + { + } + virtual void run() override; + bool VisitCXXMemberCallExpr(CXXMemberCallExpr const* call); + +private: + bool ChangeAssignment(Stmt const* parent, std::string const& methodName, + std::string const& setPrefix); + bool ChangeBinaryOperatorPlusMinus(BinaryOperator const* parent, CXXMemberCallExpr const* call, + std::string const& methodName); + bool ChangeBinaryOperatorOther(BinaryOperator const* parent, CXXMemberCallExpr const* call, + std::string const& methodName, std::string const& setPrefix); + bool ChangeUnaryOperator(UnaryOperator const* parent, CXXMemberCallExpr const* call, + std::string const& methodName); + std::string extractCode(SourceLocation startLoc, SourceLocation endLoc); +}; + +void ChangeToolsGen::run() { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } + +bool ChangeToolsGen::VisitCXXMemberCallExpr(CXXMemberCallExpr const* call) +{ + if (ignoreLocation(call)) + return true; + const CXXMethodDecl* func = call->getMethodDecl(); + if (!func) + return true; + if (func->isConst()) + return true; + auto dc = loplugin::DeclCheck(func); + std::string methodName; + std::string setPrefix; + if (dc.Function("Top").Class("Rectangle").Namespace("tools").GlobalNamespace()) + { + methodName = "Top"; + setPrefix = "Set"; + } + else if (dc.Function("Bottom").Class("Rectangle").Namespace("tools").GlobalNamespace()) + { + methodName = "Bottom"; + setPrefix = "Set"; + } + else if (dc.Function("Left").Class("Rectangle").Namespace("tools").GlobalNamespace()) + { + methodName = "Left"; + setPrefix = "Set"; + } + else if (dc.Function("Right").Class("Rectangle").Namespace("tools").GlobalNamespace()) + { + methodName = "Right"; + setPrefix = "Set"; + } + else if (dc.Function("X").Class("Point").GlobalNamespace()) + { + methodName = "X"; + setPrefix = "set"; + } + else if (dc.Function("Y").Class("Point").GlobalNamespace()) + { + methodName = "Y"; + setPrefix = "set"; + } + else if (dc.Function("Width").Class("Size").GlobalNamespace()) + { + methodName = "Width"; + setPrefix = "set"; + } + else if (dc.Function("Height").Class("Size").GlobalNamespace()) + { + methodName = "Height"; + setPrefix = "set"; + } + else + return true; + if (!loplugin::TypeCheck(func->getReturnType()).LvalueReference()) + return true; + + auto parent = getParentStmt(call); + if (!parent) + return true; + if (auto unaryOp = dyn_cast(parent)) + { + if (!ChangeUnaryOperator(unaryOp, call, methodName)) + report(DiagnosticsEngine::Warning, "Could not fix, unary", call->getBeginLoc()); + return true; + } + auto binaryOp = dyn_cast(parent); + if (!binaryOp) + { + // normal getter + return true; + } + auto opcode = binaryOp->getOpcode(); + if (opcode == BO_Assign) + { + // Check for assignments embedded inside other expressions + auto parent2 = getParentStmt(parent); + if (dyn_cast_or_null(parent2)) + parent2 = getParentStmt(parent2); + if (parent2 && isa(parent2)) + { + report(DiagnosticsEngine::Warning, "Could not fix, embedded assign", + call->getBeginLoc()); + return true; + } + // Check for + // X.Width() = X.Height() = 1; + if (auto rhs = dyn_cast(binaryOp->getRHS()->IgnoreParenImpCasts())) + if (rhs->getOpcode() == BO_Assign) + { + report(DiagnosticsEngine::Warning, "Could not fix, double assign", + call->getBeginLoc()); + return true; + } + if (!ChangeAssignment(parent, methodName, setPrefix)) + report(DiagnosticsEngine::Warning, "Could not fix, assign", call->getBeginLoc()); + return true; + } + if (opcode == BO_AddAssign || opcode == BO_SubAssign) + { + if (!ChangeBinaryOperatorPlusMinus(binaryOp, call, methodName)) + report(DiagnosticsEngine::Warning, "Could not fix, assign-and-change", + call->getBeginLoc()); + return true; + } + else if (opcode == BO_RemAssign || opcode == BO_MulAssign || opcode == BO_DivAssign) + { + if (!ChangeBinaryOperatorOther(binaryOp, call, methodName, setPrefix)) + report(DiagnosticsEngine::Warning, "Could not fix, assign-and-change", + call->getBeginLoc()); + return true; + } + else + assert(false); + return true; +} + +bool ChangeToolsGen::ChangeAssignment(Stmt const* parent, std::string const& methodName, + std::string const& setPrefix) +{ + // Look for expressions like + // aRect.Left() = ...; + // and replace with + // aRect.SetLeft( ... ); + SourceManager& SM = compiler.getSourceManager(); + SourceLocation startLoc = SM.getExpansionLoc(parent->getBeginLoc()); + SourceLocation endLoc = SM.getExpansionLoc(parent->getEndLoc()); + const char* p1 = SM.getCharacterData(startLoc); + const char* p2 = SM.getCharacterData(endLoc); + unsigned n = Lexer::MeasureTokenLength(endLoc, SM, compiler.getLangOpts()); + if (p2 < p1) // clang is misbehaving, appears to be macro constant related + return false; + std::string callText(p1, p2 - p1 + n); + auto originalLength = callText.size(); + + auto newText = std::regex_replace(callText, std::regex(methodName + " *\\( *\\) *="), + setPrefix + methodName + "("); + if (newText == callText) + return false; + newText += " )"; + + return replaceText(startLoc, originalLength, newText); +} + +bool ChangeToolsGen::ChangeBinaryOperatorPlusMinus(BinaryOperator const* binaryOp, + CXXMemberCallExpr const* call, + std::string const& methodName) +{ + // Look for expressions like + // aRect.Left() += ...; + // and replace with + // aRect.MoveLeft( ... ); + SourceManager& SM = compiler.getSourceManager(); + SourceLocation startLoc = SM.getExpansionLoc(binaryOp->getBeginLoc()); + SourceLocation endLoc = SM.getExpansionLoc(binaryOp->getEndLoc()); + const char* p1 = SM.getCharacterData(startLoc); + const char* p2 = SM.getCharacterData(endLoc); + if (p2 < p1) // clang is misbehaving, appears to be macro constant related + return false; + unsigned n = Lexer::MeasureTokenLength(endLoc, SM, compiler.getLangOpts()); + std::string callText(p1, p2 - p1 + n); + auto originalLength = callText.size(); + + std::string newText; + if (binaryOp->getOpcode() == BO_AddAssign) + { + newText = std::regex_replace(callText, std::regex(methodName + " *\\( *\\) *\\+= *"), + "Adjust" + methodName + "("); + newText += " )"; + } + else + { + newText = std::regex_replace(callText, std::regex(methodName + " *\\( *\\) *\\-= *"), + "Adjust" + methodName + "( -("); + newText += ") )"; + } + + if (newText == callText) + { + report(DiagnosticsEngine::Warning, "binaryop-plusminus regex match failed", + call->getBeginLoc()); + return false; + } + + return replaceText(startLoc, originalLength, newText); +} + +bool ChangeToolsGen::ChangeBinaryOperatorOther(BinaryOperator const* binaryOp, + CXXMemberCallExpr const* call, + std::string const& methodName, + std::string const& setPrefix) +{ + // Look for expressions like + // aRect.Left() += ...; + // and replace with + // aRect.SetLeft( aRect.GetLeft() + ... ); + SourceManager& SM = compiler.getSourceManager(); + SourceLocation startLoc = SM.getExpansionLoc(binaryOp->getBeginLoc()); + SourceLocation endLoc = SM.getExpansionLoc(binaryOp->getEndLoc()); + const char* p1 = SM.getCharacterData(startLoc); + const char* p2 = SM.getCharacterData(endLoc); + if (p2 < p1) // clang is misbehaving, appears to be macro constant related + return false; + unsigned n = Lexer::MeasureTokenLength(endLoc, SM, compiler.getLangOpts()); + std::string callText(p1, p2 - p1 + n); + auto originalLength = callText.size(); + + std::string regexOpname; + std::string replaceOpname; + switch (binaryOp->getOpcode()) + { + case BO_RemAssign: + regexOpname = "\\%="; + replaceOpname = "%"; + break; + case BO_MulAssign: + regexOpname = "\\*="; + replaceOpname = "*"; + break; + case BO_DivAssign: + regexOpname = "\\/="; + replaceOpname = "/"; + break; + default: + assert(false); + } + + auto implicitObjectText = extractCode(call->getImplicitObjectArgument()->getExprLoc(), + call->getImplicitObjectArgument()->getExprLoc()); + std::string reString(methodName + " *\\( *\\) *" + regexOpname); + auto newText = std::regex_replace(callText, std::regex(reString), + setPrefix + methodName + "( " + implicitObjectText + "." + + methodName + "() " + replaceOpname + " ("); + if (newText == callText) + { + report(DiagnosticsEngine::Warning, "binaryop-other regex match failed %0", + call->getBeginLoc()) + << reString; + return false; + } + // sometimes we end up with duplicate spaces after the opname + newText + = std::regex_replace(newText, std::regex(methodName + "\\(\\) \\" + replaceOpname + " "), + methodName + "() " + replaceOpname + " "); + newText += ") )"; + + return replaceText(startLoc, originalLength, newText); +} + +bool ChangeToolsGen::ChangeUnaryOperator(UnaryOperator const* unaryOp, + CXXMemberCallExpr const* call, + std::string const& methodName) +{ + // Look for expressions like + // aRect.Left()++; + // ++aRect.Left(); + // and replace with + // aRect.MoveLeft( 1 ); + + SourceManager& SM = compiler.getSourceManager(); + SourceLocation startLoc = SM.getExpansionLoc(unaryOp->getBeginLoc()); + SourceLocation endLoc = SM.getExpansionLoc(unaryOp->getEndLoc()); + const char* p1 = SM.getCharacterData(startLoc); + const char* p2 = SM.getCharacterData(endLoc); + if (p2 < p1) // clang is misbehaving, appears to be macro constant related + return false; + unsigned n = Lexer::MeasureTokenLength(endLoc, SM, compiler.getLangOpts()); + std::string callText(p1, p2 - p1 + n); + auto originalLength = callText.size(); + + auto implicitObjectText = extractCode(call->getImplicitObjectArgument()->getExprLoc(), + call->getImplicitObjectArgument()->getExprLoc()); + auto op = unaryOp->getOpcode(); + std::string regexOpname; + std::string replaceOp; + switch (op) + { + case UO_PostInc: + case UO_PreInc: + replaceOp = "1"; + regexOpname = "\\+\\+"; + break; + case UO_PostDec: + case UO_PreDec: + replaceOp = "-1"; + regexOpname = "\\-\\-"; + break; + default: + assert(false); + } + std::string newText; + std::string reString; + if (op == UO_PostInc || op == UO_PostDec) + { + reString = methodName + " *\\( *\\) *" + regexOpname; + newText = std::regex_replace(callText, std::regex(reString), + "Adjust" + methodName + "( " + replaceOp); + } + else + { + newText = implicitObjectText + "." + "Adjust" + methodName + "( " + replaceOp; + } + if (newText == callText) + { + report(DiagnosticsEngine::Warning, "unaryop regex match failed %0", call->getBeginLoc()) + << reString; + return false; + } + newText += " )"; + return replaceText(startLoc, originalLength, newText); +} + +std::string ChangeToolsGen::extractCode(SourceLocation startLoc, SourceLocation endLoc) +{ + SourceManager& SM = compiler.getSourceManager(); + const char* p1 = SM.getCharacterData(SM.getExpansionLoc(startLoc)); + const char* p2 = SM.getCharacterData(SM.getExpansionLoc(endLoc)); + unsigned n = Lexer::MeasureTokenLength(endLoc, SM, compiler.getLangOpts()); + return std::string(p1, p2 - p1 + n); +} + +static loplugin::Plugin::Registration X("changetoolsgen", false); + +} // namespace + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/charrightshift.cxx b/compilerplugins/clang/charrightshift.cxx new file mode 100644 index 0000000000..4168826aeb --- /dev/null +++ b/compilerplugins/clang/charrightshift.cxx @@ -0,0 +1,65 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef LO_CLANG_SHARED_PLUGINS + +#include "check.hxx" +#include "plugin.hxx" + +namespace { + +class CharRightShift: + public loplugin::FilteringPlugin +{ +public: + explicit CharRightShift(loplugin::InstantiationData const & data): + FilteringPlugin(data) {} + + void run() override + { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } + + bool VisitBinaryOperator(BinaryOperator const * expr) { + if (expr->getOpcode() != BO_Shr) { + return true; + } + if (ignoreLocation(expr)) { + return true; + } + auto t = expr->getLHS()->IgnoreParenImpCasts()->getType(); + if (!loplugin::TypeCheck(t).Char()) { + return true; + } + if (!expr->getRHS()->getType()->isBuiltinType()) { + //TODO: in which case the expression should be an + // CXXOperatorCallExpr instead of a BinaryOperator? but at least + // recent Clang trunk reports + // + // '(' >> orExpression + // + // (connectivity/source/commontools/RowFunctionParser.cxx, the RHS + // being of type boost::spirit::rule) here + return true; + } + report( + DiagnosticsEngine::Warning, + ("right shift of %0 is implementation-defined when 'char' is signed" + " and value is negative"), + expr->getLHS()->getExprLoc()) + << t << expr->getSourceRange(); + return true; + } +}; + +loplugin::Plugin::Registration charrightshift("charrightshift"); + +} + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/check.cxx b/compilerplugins/clang/check.cxx new file mode 100644 index 0000000000..4ff081b692 --- /dev/null +++ b/compilerplugins/clang/check.cxx @@ -0,0 +1,396 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include + +#include +#include + +#include "check.hxx" + +namespace loplugin { + +TypeCheck TypeCheck::NonConst() const { + return !type_.isNull() && !type_.isConstQualified() + ? *this : TypeCheck(); + // returning TypeCheck(type_.getUnqualifiedType()) instead of *this + // may look tempting, but could remove sugar we might be interested in + // checking for +} + +TypeCheck TypeCheck::NonConstVolatile() const { + return + (!type_.isNull() && !type_.isConstQualified() + && !type_.isVolatileQualified()) + ? *this : TypeCheck(); + // returning TypeCheck(type_.getUnqualifiedType()) instead of *this + // may look tempting, but could remove sugar we might be interested in + // checking for +} + +TypeCheck TypeCheck::Const() const { + return + (!type_.isNull() && type_.isConstQualified() + && !type_.isVolatileQualified()) + ? *this : TypeCheck(); + // returning TypeCheck(type_.getUnqualifiedType()) instead of *this + // may look tempting, but could remove sugar we might be interested in + // checking for +} + +TypeCheck TypeCheck::Volatile() const { + return + (!type_.isNull() && !type_.isConstQualified() + && type_.isVolatileQualified()) + ? *this : TypeCheck(); + // returning TypeCheck(type_.getUnqualifiedType()) instead of *this + // may look tempting, but could remove sugar we might be interested in + // checking for +} + +TypeCheck TypeCheck::ConstVolatile() const { + return + (!type_.isNull() && type_.isConstQualified() + && type_.isVolatileQualified()) + ? *this : TypeCheck(); + // returning TypeCheck(type_.getUnqualifiedType()) instead of *this + // may look tempting, but could remove sugar we might be interested in + // checking for +} + +TypeCheck TypeCheck::ConstNonVolatile() const { + return + (!type_.isNull() && type_.isConstQualified() + && !type_.isVolatileQualified()) + ? *this : TypeCheck(); + // returning TypeCheck(type_.getUnqualifiedType()) instead of *this + // may look tempting, but could remove sugar we might be interested in + // checking for +} + +TerminalCheck TypeCheck::Void() const { + return TerminalCheck( + !type_.isNull() + && type_->isSpecificBuiltinType(clang::BuiltinType::Void)); +} + +TerminalCheck TypeCheck::Char() const { + return TerminalCheck( + !type_.isNull() + && (type_->isSpecificBuiltinType(clang::BuiltinType::Char_S) + || type_->isSpecificBuiltinType(clang::BuiltinType::Char_U))); +} + +TerminalCheck TypeCheck::AnyBoolean() const { + if (type_->isBooleanType()) { + return TerminalCheck(true); + } + auto t = type_->getAs(); + if (t == nullptr) { + return TerminalCheck(false); + } + auto n =t->getDecl()->getName(); + return TerminalCheck( + n == "sal_Bool" || n == "BOOL" || n == "Boolean" || n == "FT_Bool" + || n == "FcBool" || n == "GLboolean" || n == "NPBool" || n == "TW_BOOL" + || n == "UBool" || n == "boolean" || n == "dbus_bool_t" + || n == "gboolean" || n == "hb_bool_t" || n == "jboolean" || n == "my_bool"); +} + +TypeCheck TypeCheck::LvalueReference() const { + if (!type_.isNull()) { + auto const t = type_->getAs(); + if (t != nullptr) { + return TypeCheck(t->getPointeeType()); + } + } + return TypeCheck(); +} + +TypeCheck TypeCheck::RvalueReference() const { + if (!type_.isNull()) { + auto const t = type_->getAs(); + if (t != nullptr) { + return TypeCheck(t->getPointeeType()); + } + } + return TypeCheck(); +} + +TypeCheck TypeCheck::Pointer() const { + if (!type_.isNull()) { + auto const t = type_->getAs(); + if (t != nullptr) { + return TypeCheck(t->getPointeeType()); + } + } + return TypeCheck(); +} + +TerminalCheck TypeCheck::Enum() const { + if (!type_.isNull()) { + auto const t = type_->getAs(); + if (t != nullptr) { + return TerminalCheck(true); + } + } + return TerminalCheck(false); +} + +TypeCheck TypeCheck::Typedef() const { + if (!type_.isNull()) { + if (auto const t = type_->getAs()) { + return TypeCheck(t->desugar()); + } + } + return TypeCheck(); +} + +DeclCheck TypeCheck::TemplateSpecializationClass() const { + if (!type_.isNull()) { + if (auto const t = type_->getAs()) { + if (!t->isTypeAlias()) { + if (auto const d = llvm::dyn_cast_or_null( + t->getTemplateName().getAsTemplateDecl())) + { + return DeclCheck(d->getTemplatedDecl()); + } + } + } + } + return DeclCheck(); +} + +TypeCheck TypeCheck::NotSubstTemplateTypeParmType() const { + return + (!type_.isNull() + && type_->getAs() == nullptr) + ? *this : TypeCheck(); +} + +ContextCheck DeclCheck::Operator(clang::OverloadedOperatorKind op) const { + assert(op != clang::OO_None); + auto f = llvm::dyn_cast_or_null(decl_); + return ContextCheck( + f != nullptr && f->getOverloadedOperator() == op + ? f->getDeclContext() : nullptr); +} + +ContextCheck DeclCheck::MemberFunction() const { + auto m = llvm::dyn_cast_or_null(decl_); + return ContextCheck(m == nullptr ? nullptr : m->getParent()); +} + +namespace { + +bool isGlobalNamespace(clang::DeclContext const * context) { + assert(context != nullptr); + return context->getEnclosingNamespaceContext()->isTranslationUnit(); +} + +} + +TerminalCheck ContextCheck::GlobalNamespace() const { + return TerminalCheck(context_ != nullptr && isGlobalNamespace(context_)); +} + +TerminalCheck ContextCheck::StdNamespace() const { + return TerminalCheck( + context_ != nullptr && lookThroughLinkageSpec()->isStdNamespace()); +} + +namespace { + +bool isStdOrNestedNamespace(clang::DeclContext const * context) { + assert(context != nullptr); + if (!context->isNamespace()) { + return false; + } + if (isGlobalNamespace(context)) { + return false; + } + if (context->isStdNamespace()) { + return true; + } + return isStdOrNestedNamespace(context->getParent()); +} + +} + +TerminalCheck ContextCheck::StdOrNestedNamespace() const { + return TerminalCheck(context_ != nullptr && isStdOrNestedNamespace(lookThroughLinkageSpec())); +} + +ContextCheck ContextCheck::AnonymousNamespace() const { + auto n = llvm::dyn_cast_or_null(lookThroughLinkageSpec()); + return ContextCheck( + n != nullptr && n->isAnonymousNamespace() ? n->getParent() : nullptr); +} + +clang::DeclContext const * ContextCheck::lookThroughLinkageSpec() const { + if (context_ != nullptr && context_->getDeclKind() == clang::Decl::LinkageSpec) { + return context_->getParent(); + } + return context_; +} + +namespace { + +bool BaseCheckNotSomethingInterestingSubclass(const clang::CXXRecordDecl *BaseDefinition) { + if (BaseDefinition) { + auto tc = TypeCheck(BaseDefinition); + if (tc.Class("Dialog").GlobalNamespace() || tc.Class("SfxPoolItem").GlobalNamespace()) { + return false; + } + } + return true; +} + +bool isDerivedFromSomethingInteresting(const clang::CXXRecordDecl *decl) { + if (!decl) + return false; + auto tc = TypeCheck(decl); + if (tc.Class("Dialog")) + return true; + if (tc.Class("SfxPoolItem")) + return true; + if (!decl->hasDefinition()) { + return false; + } + if (// not sure what hasAnyDependentBases() does, + // but it avoids classes we don't want, e.g. WeakAggComponentImplHelper1 + !decl->hasAnyDependentBases() && + !decl->forallBases(BaseCheckNotSomethingInterestingSubclass)) { + return true; + } + return false; +} + +} + +bool isExtraWarnUnusedType(clang::QualType type) { + auto const rec = type->getAsCXXRecordDecl(); + if (rec == nullptr) { + return false; + } + auto const tc = TypeCheck(rec); + // Check some common non-LO types: + if (tc.Class("basic_string").StdNamespace() + || tc.Class("deque").StdNamespace() + || tc.Class("list").StdNamespace() + || tc.Class("map").StdNamespace() + || tc.Class("pair").StdNamespace() + || tc.Class("queue").StdNamespace() + || tc.Class("set").StdNamespace() + || tc.Class("stack").StdNamespace() + || tc.Class("unordered_map").StdNamespace() + || tc.Class("unordered_set").StdNamespace() + || tc.Class("vector").StdNamespace()) + { + return true; + } + return isDerivedFromSomethingInteresting(rec); +} + +namespace { + +// Make sure Foo and ::Foo are considered equal: +bool areSameSugaredType(clang::QualType type1, clang::QualType type2) { + auto t1 = type1.getLocalUnqualifiedType(); + if (auto const et = llvm::dyn_cast(t1)) { + t1 = et->getNamedType(); + } + auto t2 = type2.getLocalUnqualifiedType(); + if (auto const et = llvm::dyn_cast(t2)) { + t2 = et->getNamedType(); + } + return t1 == t2; +} + +bool isArithmeticOp(clang::Expr const * expr) { + expr = expr->IgnoreParenImpCasts(); + if (auto const e = llvm::dyn_cast(expr)) { + switch (e->getOpcode()) { + case clang::BO_Mul: + case clang::BO_Div: + case clang::BO_Rem: + case clang::BO_Add: + case clang::BO_Sub: + case clang::BO_Shl: + case clang::BO_Shr: + case clang::BO_And: + case clang::BO_Xor: + case clang::BO_Or: + return true; + case clang::BO_Comma: + return isArithmeticOp(e->getRHS()); + default: + return false; + } + } + return llvm::isa(expr) + || llvm::isa(expr); +} + +} + +bool isOkToRemoveArithmeticCast( + clang::ASTContext & context, clang::QualType t1, clang::QualType t2, const clang::Expr* subExpr) +{ + // Don't warn if the types are arithmetic (in the C++ meaning), and: either + // at least one is a typedef or decltype (and if both are, they're different), + // or the sub-expression involves some operation that is likely to change + // types through promotion, or the sub-expression is an integer literal (so + // its type generally depends on its value and suffix if any---even with a + // suffix like L it could still be either long or long long): + if ((t1->isIntegralType(context) + || t1->isRealFloatingType()) + && ((!areSameSugaredType(t1, t2) + && (loplugin::TypeCheck(t1).Typedef() + || loplugin::TypeCheck(t2).Typedef() + || llvm::isa(t1) || llvm::isa(t2))) + || isArithmeticOp(subExpr) + || llvm::isa(subExpr->IgnoreParenImpCasts()))) + { + return false; + } + return true; +} + + +static bool BaseCheckNotSubclass(const clang::CXXRecordDecl *BaseDefinition, void *p) { + if (!BaseDefinition) + return true; + auto const & base = *static_cast(p); + if (base(BaseDefinition)) { + return false; + } + return true; +} + +bool isDerivedFrom(const clang::CXXRecordDecl *decl, DeclChecker base, bool checkSelf) { + if (!decl) + return false; + if (checkSelf && base(decl)) + return true; + if (!decl->hasDefinition()) { + return false; + } + if (!decl->forallBases( + [&base](const clang::CXXRecordDecl *BaseDefinition) -> bool + { return BaseCheckNotSubclass(BaseDefinition, &base); })) + { + return true; + } + return false; +} + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/check.hxx b/compilerplugins/clang/check.hxx new file mode 100644 index 0000000000..af6cd355a4 --- /dev/null +++ b/compilerplugins/clang/check.hxx @@ -0,0 +1,316 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#pragma once + +#include + +#include +#include +#include +#include + +#include "compat.hxx" + +namespace loplugin { + +class ContextCheck; +class TerminalCheck; + +namespace detail { + +inline ContextCheck checkRecordDecl( + clang::Decl const * decl, clang::TagTypeKind tag, llvm::StringRef id); + +} + +class DeclCheck; + +class TypeCheck { +public: + explicit TypeCheck(clang::QualType type): type_(type) {} + + explicit TypeCheck(clang::Type const * type): type_(type, 0) {} + + explicit TypeCheck(clang::TypeDecl const * decl): type_(decl->getTypeForDecl(), 0) {} + + explicit operator bool() const { return !type_.isNull(); } + + TypeCheck NonConst() const; + + TypeCheck NonConstVolatile() const; + + TypeCheck Const() const; + + TypeCheck Volatile() const; + + TypeCheck ConstVolatile() const; + + TypeCheck ConstNonVolatile() const; + + TerminalCheck Void() const; + + TerminalCheck Char() const; + + TerminalCheck AnyBoolean() const; + + TypeCheck Pointer() const; + + TerminalCheck Enum() const; + + TypeCheck LvalueReference() const; + + TypeCheck RvalueReference() const; + + inline ContextCheck Class(llvm::StringRef id) const; + + inline ContextCheck Struct(llvm::StringRef id) const; + + inline ContextCheck ClassOrStruct(llvm::StringRef id) const; + + TypeCheck Typedef() const; + + inline ContextCheck Typedef(llvm::StringRef id) const; + + DeclCheck TemplateSpecializationClass() const; + + TypeCheck NotSubstTemplateTypeParmType() const; + +private: + TypeCheck() = default; + + clang::QualType const type_{}; +}; + +class DeclCheck { + friend TypeCheck; + +public: + explicit DeclCheck(clang::Decl const * decl): decl_(decl) {} + + explicit operator bool() const { return decl_ != nullptr; } + + inline ContextCheck Class(llvm::StringRef id) const; + + inline ContextCheck Struct(llvm::StringRef id) const; + + inline ContextCheck ClassOrStruct(llvm::StringRef id) const; + + inline ContextCheck Union(llvm::StringRef id) const; + + inline ContextCheck Function(llvm::StringRef id) const; + + ContextCheck Operator(clang::OverloadedOperatorKind op) const; + + inline ContextCheck Var(llvm::StringRef id) const; + + ContextCheck MemberFunction() const; + +private: + DeclCheck() = default; + + clang::Decl const * const decl_ = nullptr; +}; + +class ContextCheck { +public: + explicit ContextCheck(clang::DeclContext const * context = nullptr): + context_(context) {} + + explicit operator bool() const { return context_ != nullptr; } + + TerminalCheck GlobalNamespace() const; + + inline ContextCheck Namespace(llvm::StringRef id) const; + + TerminalCheck StdNamespace() const; + + TerminalCheck StdOrNestedNamespace() const; + + ContextCheck AnonymousNamespace() const; + + inline ContextCheck Class(llvm::StringRef id) const; + + inline ContextCheck Struct(llvm::StringRef id) const; + + explicit ContextCheck(const clang::NamespaceDecl * decl ) : context_( decl ) {} + +private: + clang::DeclContext const * lookThroughLinkageSpec() const; + + clang::DeclContext const * const context_; +}; + +class TerminalCheck { +public: + explicit operator bool() const { return satisfied_; } + +private: + friend ContextCheck; + friend TypeCheck; + + explicit TerminalCheck(bool satisfied): satisfied_(satisfied) {} + + bool const satisfied_; +}; + + +typedef std::function DeclChecker; +// Returns true if the class has a base matching the checker, or, when checkSelf is true, if the +// class itself matches. +bool isDerivedFrom(const clang::CXXRecordDecl *decl, DeclChecker base, bool checkSelf = true); + + +namespace detail { + +ContextCheck checkRecordDecl( + clang::Decl const * decl, clang::TagTypeKind tag, llvm::StringRef id) +{ + auto r = llvm::dyn_cast_or_null(decl); + if (r != nullptr && r->getTagKind() == tag) { + auto const i = r->getIdentifier(); + if (i != nullptr && i->getName() == id) { + return ContextCheck(r->getDeclContext()); + } + } + return ContextCheck(); +} + +} + +ContextCheck TypeCheck::Class(llvm::StringRef id) + const +{ + if (!type_.isNull()) { + auto const t = type_->getAs(); + if (t != nullptr) { + return detail::checkRecordDecl(t->getDecl(), compat::TagTypeKind::Class, id); + } + } + return ContextCheck(); +} + +ContextCheck TypeCheck::Struct(llvm::StringRef id) const +{ + if (!type_.isNull()) { + auto const t = type_->getAs(); + if (t != nullptr) { + return detail::checkRecordDecl(t->getDecl(), compat::TagTypeKind::Struct, id); + } + } + return ContextCheck(); +} + +ContextCheck TypeCheck::ClassOrStruct(llvm::StringRef id) const +{ + auto const c1 = Class(id); + if (c1) { + return c1; + } + return Struct(id); +} + +ContextCheck TypeCheck::Typedef(llvm::StringRef id) const +{ + if (!type_.isNull()) { + if (auto const t = type_->getAs()) { + auto const d = t->getDecl(); + auto const i = d->getIdentifier(); + assert(i != nullptr); + if (i->getName() == id) { + return ContextCheck(d->getDeclContext()); + } + } + } + return ContextCheck(); +} + +ContextCheck DeclCheck::Class(llvm::StringRef id) const +{ + return detail::checkRecordDecl(decl_, compat::TagTypeKind::Class, id); +} + +ContextCheck DeclCheck::Struct(llvm::StringRef id) const +{ + return detail::checkRecordDecl(decl_, compat::TagTypeKind::Struct, id); +} + +ContextCheck DeclCheck::ClassOrStruct(llvm::StringRef id) const +{ + auto const c1 = Class(id); + if (c1) { + return c1; + } + return Struct(id); +} + +ContextCheck DeclCheck::Union(llvm::StringRef id) const +{ + return detail::checkRecordDecl(decl_, compat::TagTypeKind::Union, id); +} + +ContextCheck DeclCheck::Function(llvm::StringRef id) const +{ + auto f = llvm::dyn_cast_or_null(decl_); + if (f != nullptr) { + auto const i = f->getIdentifier(); + if (i != nullptr && i->getName() == id) { + return ContextCheck(f->getDeclContext()); + } + } + return ContextCheck(); +} + +ContextCheck DeclCheck::Var(llvm::StringRef id) const +{ + auto f = llvm::dyn_cast_or_null(decl_); + if (f != nullptr) { + auto const i = f->getIdentifier(); + if (i != nullptr && i->getName() == id) { + return ContextCheck(f->getDeclContext()); + } + } + return ContextCheck(); +} + +ContextCheck ContextCheck::Namespace(llvm::StringRef id) const +{ + if (context_) { + auto n = llvm::dyn_cast(lookThroughLinkageSpec()); + if (n != nullptr) { + auto const i = n->getIdentifier(); + if (i != nullptr && i->getName() == id) { + return ContextCheck(n->getParent()); + } + } + } + return ContextCheck(); +} + +ContextCheck ContextCheck::Class(llvm::StringRef id) const +{ + return detail::checkRecordDecl( + llvm::dyn_cast_or_null(context_), compat::TagTypeKind::Class, id); +} + +ContextCheck ContextCheck::Struct(llvm::StringRef id) const +{ + return detail::checkRecordDecl( + llvm::dyn_cast_or_null(context_), compat::TagTypeKind::Struct, id); +} + +bool isExtraWarnUnusedType(clang::QualType type); + +bool isOkToRemoveArithmeticCast( + clang::ASTContext & context, clang::QualType t1, clang::QualType t2, + const clang::Expr* subExpr); + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/checkconfigmacros.cxx b/compilerplugins/clang/checkconfigmacros.cxx new file mode 100644 index 0000000000..aea60ed561 --- /dev/null +++ b/compilerplugins/clang/checkconfigmacros.cxx @@ -0,0 +1,120 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * Based on LLVM/Clang. + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + */ + +#include +#include + +#include "plugin.hxx" + +#include "config_clang.h" + +#include + +namespace loplugin +{ + +/* +This is a compile check. + +Feature macros from config_XXX.h headers are always #defined (to 1 or 0 in case of yes/no +settings). It is a mistake to use #ifdef/#ifndef/defined to check them. + +Using 1/0 instead of defined/undefined avoids undetected problems when e.g. the necessary +#include of the config_XXX.h file is missing. +*/ + +class CheckConfigMacros + : public PPCallbacks + , public Plugin + { + public: + explicit CheckConfigMacros( const InstantiationData& data ); + virtual void run() override; + virtual void MacroDefined( const Token& macroToken, const MacroDirective* info ) override; + virtual void MacroUndefined( const Token& macroToken, MacroDefinition const &, MacroDirective const * ) override; + virtual void Ifdef( SourceLocation location, const Token& macroToken, MacroDefinition const & ) override; + virtual void Ifndef( SourceLocation location, const Token& macroToken, MacroDefinition const & ) override; + virtual void Defined( const Token& macroToken, MacroDefinition const &, SourceRange Range ) override; + enum { isPPCallback = true }; + private: + void checkMacro( const Token& macroToken, SourceLocation location ); + std::set< std::string > configMacros; + }; + +CheckConfigMacros::CheckConfigMacros( const InstantiationData& data ) + : Plugin( data ) + { + compiler.getPreprocessor().addPPCallbacks(std::unique_ptr(this)); + } + +void CheckConfigMacros::run() + { + // nothing, only check preprocessor usage + } + +void CheckConfigMacros::MacroDefined( const Token& macroToken, const MacroDirective* info ) + { + SourceLocation location = info->getLocation(); + const char* filename = compiler.getSourceManager().getPresumedLoc( location ).getFilename(); + if( filename != NULL + && ( hasPathnamePrefix(filename, BUILDDIR "/config_host/") + || hasPathnamePrefix(filename, BUILDDIR "/config_build/") )) + { +// fprintf(stderr,"DEF: %s %s\n", macroToken.getIdentifierInfo()->getName().data(), filename ); + StringRef macro = macroToken.getIdentifierInfo()->getName(); + // Skia #defines do not have values, but we set them in config_skia.h . + if( macro.startswith( "SK_" ) && loplugin::isSamePathname(filename, BUILDDIR "/config_host/config_skia.h")) + return; + configMacros.insert( macro.str()); + } + } + +void CheckConfigMacros::MacroUndefined( const Token& macroToken, MacroDefinition const &, MacroDirective const * ) + { + configMacros.erase( macroToken.getIdentifierInfo()->getName().str()); + } + +void CheckConfigMacros::Ifdef( SourceLocation location, const Token& macroToken, MacroDefinition const & ) + { + checkMacro( macroToken, location ); + } + +void CheckConfigMacros::Ifndef( SourceLocation location, const Token& macroToken, MacroDefinition const & ) + { + checkMacro( macroToken, location ); + } + +void CheckConfigMacros::Defined( const Token& macroToken, MacroDefinition const &, SourceRange ) + { + checkMacro( macroToken, macroToken.getLocation()); + } + +void CheckConfigMacros::checkMacro( const Token& macroToken, SourceLocation location ) + { + if( configMacros.find( macroToken.getIdentifierInfo()->getName().str()) != configMacros.end()) + { + const char* filename = compiler.getSourceManager().getPresumedLoc( location ).getFilename(); + if( filename == NULL + || ( !hasPathnamePrefix(filename, SRCDIR "/include/LibreOfficeKit/") + && !hasPathnamePrefix(filename, WORKDIR "/UnpackedTarball/" ))) + { + report( DiagnosticsEngine::Error, "checking whether a config macro %0 is defined", + location ) << macroToken.getIdentifierInfo()->getName(); + report( DiagnosticsEngine::Note, "use #if instead of #ifdef/#ifndef/defined", location ); + } + } + } + +static Plugin::Registration< CheckConfigMacros > X( "checkconfigmacros" ); + +} // namespace + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/classmemaccess.cxx b/compilerplugins/clang/classmemaccess.cxx new file mode 100644 index 0000000000..40132c36e1 --- /dev/null +++ b/compilerplugins/clang/classmemaccess.cxx @@ -0,0 +1,133 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef LO_CLANG_SHARED_PLUGINS + +#include "check.hxx" +#include "plugin.hxx" + +// Similar to GCC "warning: ‘void* memset(void*, int, size_t)’ writing to an object of non-trivial +// type ‘...’; use assignment instead [-Wclass-memaccess]", but looking through toplevel cast to +// void* and taking arrays into account in addition to pointers. (Clang has +// -Wdynamic-class-memaccess, but that only warns about memset overwriting a vtable pointer. GCC +// deliberately does not warn when there is a toplevel cast to void*, see +// "[8 Regression] cast to void* does not +// suppress -Wclass-memaccess".) + +namespace +{ +class ClassMemAccess final : public loplugin::FilteringPlugin +{ +public: + explicit ClassMemAccess(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + bool VisitCallExpr(CallExpr const* expr) + { + if (ignoreLocation(expr)) + { + return true; + } + auto const fdecl = expr->getDirectCallee(); + if (fdecl == nullptr) + { + return true; + } + auto dc = loplugin::DeclCheck(fdecl).Function("memset"); + if (!(dc.GlobalNamespace() || dc.StdNamespace())) + { + return true; + } + if (expr->getNumArgs() != 3) + { + if (isDebugMode()) + { + report(DiagnosticsEngine::Fatal, + "unexpected call to %0 with %1 instead of 3 arguments", expr->getExprLoc()) + << fdecl << expr->getNumArgs() << expr->getSourceRange(); + report(DiagnosticsEngine::Note, "%0 declared here", fdecl->getLocation()) + << fdecl << fdecl->getSourceRange(); + } + return true; + } + auto e = expr->getArg(0)->IgnoreParenImpCasts(); + while (auto const cast = dyn_cast(e)) + { + if (!loplugin::TypeCheck(cast->getTypeAsWritten()).Pointer().Void()) + { + break; + } + e = cast->getSubExprAsWritten()->IgnoreParenImpCasts(); + } + QualType t; + if (auto const t1 = e->getType()->getAs()) + { + t = t1->getPointeeType(); + } + else if (e->getType()->isArrayType()) + { + t = e->getType(); + while (auto const t2 = t->getAsArrayTypeUnsafe()) + { + t = t2->getElementType(); + } + } + else + { + if (isDebugMode()) + { + report(DiagnosticsEngine::Fatal, + "unexpected call to %0 with first argument of non-pointer type %1", + expr->getExprLoc()) + << fdecl << e->getType() << expr->getSourceRange(); + report(DiagnosticsEngine::Note, "%0 declared here", fdecl->getLocation()) + << fdecl << fdecl->getSourceRange(); + } + return true; + } + auto const decl = t->getAsCXXRecordDecl(); + if (decl == nullptr) + { + return true; + } + if (!decl->isCompleteDefinition()) + { + return true; // conservatively assume it may be trivial + } + if (decl->isTrivial()) + { + return true; + } + report(DiagnosticsEngine::Warning, + "%0 writing to an object of non-trivial type %1; use assignment instead", + expr->getExprLoc()) + << fdecl << decl << expr->getSourceRange(); + return true; + } + + bool preRun() override { return compiler.getLangOpts().CPlusPlus; } + +private: + void run() override + { + if (preRun()) + { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + } +}; + +loplugin::Plugin::Registration classmemaccess("classmemaccess"); +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/collapseif.cxx b/compilerplugins/clang/collapseif.cxx new file mode 100644 index 0000000000..aecf10f5e0 --- /dev/null +++ b/compilerplugins/clang/collapseif.cxx @@ -0,0 +1,107 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include +#include +#include + +#include "plugin.hxx" +#include "check.hxx" +#include "clang/AST/CXXInheritance.h" +#include "clang/AST/StmtVisitor.h" + +/** + Look for nested if statements with relatively small conditions, where they can be collapsed into + one if statement. +*/ +namespace +{ +class CollapseIf : public loplugin::FilteringPlugin +{ +public: + explicit CollapseIf(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } + + bool VisitIfStmt(IfStmt const*); + +private: + int getNoCharsInSourceCodeOfExpr(IfStmt const*); +}; + +bool CollapseIf::VisitIfStmt(IfStmt const* ifStmt) +{ + if (ignoreLocation(ifStmt)) + return true; + if (ifStmt->getElse()) + return true; + + IfStmt const* secondIfStmt = nullptr; + if (auto compoundStmt = dyn_cast(ifStmt->getThen())) + { + if (compoundStmt->size() != 1) + return true; + secondIfStmt = dyn_cast(*compoundStmt->body_begin()); + if (!secondIfStmt) + return true; + if (secondIfStmt->getElse()) + return true; + } + else + { + secondIfStmt = dyn_cast(ifStmt->getThen()); + if (!secondIfStmt) + return true; + } + + int noChars1 = getNoCharsInSourceCodeOfExpr(ifStmt); + int noChars2 = getNoCharsInSourceCodeOfExpr(secondIfStmt); + if (noChars1 + noChars2 > 40) + return true; + + // Sometimes there is a comment between the first and second if, so + // merging them would make the comment more awkward to write. + if (containsComment(ifStmt->getSourceRange())) + return true; + + report(DiagnosticsEngine::Warning, "nested if should be collapsed into one statement %0 %1", + ifStmt->getBeginLoc()) + << noChars1 << noChars2 << ifStmt->getSourceRange(); + return true; +} + +int CollapseIf::getNoCharsInSourceCodeOfExpr(IfStmt const* ifStmt) +{ + // Measure the space between the "if" the beginning of the "then" block because + // measuring the size of the condition expression is unreliable, because clang + // does not report the location of the last token accurately. + SourceManager& SM = compiler.getSourceManager(); + SourceLocation startLoc = ifStmt->getBeginLoc(); + SourceLocation endLoc = ifStmt->getThen()->getBeginLoc(); + char const* p1 = SM.getCharacterData(startLoc); + char const* p2 = SM.getCharacterData(endLoc); + + int count = 0; + for (auto p = p1; p < p2; ++p) + if (*p != ' ') + ++count; + + return count; +} + +/** Off by default because some places are a judgement call if it should be collapsed or not. */ +loplugin::Plugin::Registration X("collapseif", false); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/colorcheck.cxx b/compilerplugins/clang/colorcheck.cxx new file mode 100644 index 0000000000..69bcaa0cd9 --- /dev/null +++ b/compilerplugins/clang/colorcheck.cxx @@ -0,0 +1,98 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef LO_CLANG_SHARED_PLUGINS + +#include +#include +#include +#include +#include +#include + +#include "config_clang.h" + +#include "check.hxx" +#include "compat.hxx" +#include "plugin.hxx" + +/** +*/ + +namespace +{ +class ColorCheck : public loplugin::FilteringPlugin +{ +public: + explicit ColorCheck(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + virtual void run() override + { + if (preRun()) + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + + bool VisitCXXConstructExpr(const CXXConstructExpr*); +}; + +bool ColorCheck::VisitCXXConstructExpr(const CXXConstructExpr* constructExpr) +{ + if (ignoreLocation(constructExpr)) + return true; + + if (constructExpr->getNumArgs() != 1) + return true; + + auto tc = loplugin::TypeCheck(constructExpr->getType()); + if (!tc.Class("Color").GlobalNamespace()) + return true; + + StringRef aFileName = getFilenameOfLocation( + compiler.getSourceManager().getSpellingLoc(constructExpr->getBeginLoc())); + if (loplugin::isSamePathname(aFileName, SRCDIR "/include/tools/color.hxx")) + return true; + + const CXXConstructorDecl* constructorDecl = constructExpr->getConstructor(); + constructorDecl = constructorDecl->getCanonicalDecl(); + + if (!loplugin::TypeCheck(constructorDecl->getParamDecl(0)->getType()) + .Typedef("sal_uInt32") + .GlobalNamespace()) + return true; + + auto arg0 = constructExpr->getArg(0); + if (arg0->isCXX11ConstantExpr(compiler.getASTContext())) + { + if (!arg0->isValueDependent()) + { + compat::optional xVal + = arg0->getIntegerConstantExpr(compiler.getASTContext()); + if (xVal && *xVal > 0xffffff) + report(DiagnosticsEngine::Warning, + "Rather use the ColorTransparency or ColorAlpha version of this constructor", + arg0->getExprLoc()); + return true; + } + } + report(DiagnosticsEngine::Warning, + "Rather use the ColorTransparency or ColorAlpha version of this constructor", + arg0->getExprLoc()); + + return true; +} + +loplugin::Plugin::Registration colorcheck("colorcheck"); + +} // namespace + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/commaoperator.cxx b/compilerplugins/clang/commaoperator.cxx new file mode 100644 index 0000000000..3ba1c89c4b --- /dev/null +++ b/compilerplugins/clang/commaoperator.cxx @@ -0,0 +1,130 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include +#include +#include + +#include "plugin.hxx" + +/** +the comma operator is best used sparingly +*/ + +namespace { + +Stmt const * lookThroughExprWithCleanups(Stmt const * stmt) { + if (auto const e = dyn_cast_or_null(stmt)) { + return e->getSubExpr(); + } + return stmt; +} + +class CommaOperator: + public loplugin::FilteringPlugin +{ +public: + explicit CommaOperator(loplugin::InstantiationData const & data): + FilteringPlugin(data) {} + + virtual void run() override + { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + + bool TraverseForStmt(ForStmt * stmt) { + auto const saved1 = ignore1_; + ignore1_ = lookThroughExprWithCleanups(stmt->getInit()); + auto const saved2 = ignore2_; + ignore2_ = lookThroughExprWithCleanups(stmt->getInc()); + auto const ret = RecursiveASTVisitor::TraverseForStmt(stmt); + ignore1_ = saved1; + ignore2_ = saved2; + return ret; + } + + bool TraverseWhileStmt(WhileStmt * stmt) { + auto const saved1 = ignore1_; + ignore1_ = lookThroughExprWithCleanups(stmt->getCond()); + auto const ret = RecursiveASTVisitor::TraverseWhileStmt(stmt); + ignore1_ = saved1; + return ret; + } + + bool TraverseParenExpr(ParenExpr * expr) { + auto const saved1 = ignore1_; + ignore1_ = expr->getSubExpr(); + auto const ret = RecursiveASTVisitor::TraverseParenExpr(expr); + ignore1_ = saved1; + return ret; + } + + bool TraverseBinaryOperator(BinaryOperator * expr) { + if (expr->getOpcode() != BO_Comma) { + return RecursiveASTVisitor::TraverseBinaryOperator(expr); + } + if (!WalkUpFromBinaryOperator(expr)) { + return false; + } + auto const saved1 = ignore1_; + ignore1_ = expr->getLHS(); + auto const ret = TraverseStmt(expr->getLHS()) + && TraverseStmt(expr->getRHS()); + ignore1_ = saved1; + return ret; + } + + bool VisitBinaryOperator(const BinaryOperator* ); + +private: + Stmt const * ignore1_ = nullptr; + Stmt const * ignore2_ = nullptr; +}; + +bool CommaOperator::VisitBinaryOperator(const BinaryOperator* binaryOp) +{ + if (binaryOp->getOpcode() != BO_Comma) { + return true; + } + if (binaryOp == ignore1_ || binaryOp == ignore2_) { + return true; + } + if (ignoreLocation(binaryOp)) { + return true; + } + // Ignore FD_SET expanding to "...} while(0, 0)" in some Microsoft + // winsock2.h (TODO: improve heuristic of determining that the whole + // binaryOp is part of a single macro body expansion): + if (compiler.getSourceManager().isMacroBodyExpansion( + binaryOp->getBeginLoc()) + && compiler.getSourceManager().isMacroBodyExpansion( + binaryOp->getOperatorLoc()) + && compiler.getSourceManager().isMacroBodyExpansion( + binaryOp->getEndLoc()) + && ignoreLocation( + compiler.getSourceManager().getSpellingLoc( + binaryOp->getOperatorLoc()))) + { + return true; + } + report( + DiagnosticsEngine::Warning, "comma operator hides code", + binaryOp->getOperatorLoc()) + << binaryOp->getSourceRange(); + return true; +} + + +loplugin::Plugin::Registration< CommaOperator > X("commaoperator", true); + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/compat.hxx b/compilerplugins/clang/compat.hxx new file mode 100644 index 0000000000..d122933eea --- /dev/null +++ b/compilerplugins/clang/compat.hxx @@ -0,0 +1,252 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#pragma once + +#include +#include + +#include "clang/AST/Expr.h" +#include "clang/AST/ExprCXX.h" +#include "clang/Basic/SourceManager.h" +#include "clang/Basic/Specifiers.h" +#include "llvm/ADT/StringExtras.h" +#include "llvm/Support/FileSystem.h" + +#include "config_clang.h" + +#if CLANG_VERSION >= 170000 +#include +#else +#include "llvm/ADT/Optional.h" +#endif + +// Compatibility wrapper to abstract over (trivial) changes in the Clang API: +namespace compat { + +template +#if CLANG_VERSION >= 170000 +using optional = std::optional; +#else +using optional = llvm::Optional; +#endif + +template +constexpr bool has_value(optional const & o) { +#if CLANG_VERSION >= 150000 + return o.has_value(); +#else + return o.hasValue(); +#endif +} + +template +constexpr T const & value(optional const & o) { +#if CLANG_VERSION >= 150000 + return *o; +#else + return o.getValue(); +#endif +} + +inline std::string toString(llvm::APSInt const & i, unsigned radix) { +#if CLANG_VERSION >= 130000 + return llvm::toString(i, radix); +#else + return i.toString(radix); +#endif +} + +inline std::pair getImmediateExpansionRange( + clang::SourceManager const & SM, clang::SourceLocation Loc) +{ + auto const csr = SM.getImmediateExpansionRange(Loc); + if (csr.isCharRange()) { /*TODO*/ } + return {csr.getBegin(), csr.getEnd()}; +} + +/// Utility method +inline clang::Expr const * IgnoreParenImplicit(clang::Expr const * expr) { + return expr->IgnoreImplicit()->IgnoreParens()->IgnoreImplicit(); +} + +#if CLANG_VERSION >= 130000 +constexpr clang::ExprValueKind VK_PRValue = clang::VK_PRValue; +#else +constexpr clang::ExprValueKind VK_PRValue = clang::VK_RValue; +#endif + +namespace CXXConstructionKind +{ +#if CLANG_VERSION >= 180000 +constexpr clang::CXXConstructionKind Complete = clang::CXXConstructionKind::Complete; +#else +constexpr clang::CXXConstructExpr::ConstructionKind Complete = clang::CXXConstructExpr::CK_Complete; +#endif +} + +namespace CharacterLiteralKind +{ +#if CLANG_VERSION >= 180000 +constexpr clang::CharacterLiteralKind Ascii = clang::CharacterLiteralKind::Ascii; +#else +constexpr clang::CharacterLiteral::CharacterKind Ascii = clang::CharacterLiteral::Ascii; +#endif +} + +namespace ElaboratedTypeKeyword +{ +#if CLANG_VERSION >= 180000 +constexpr clang::ElaboratedTypeKeyword None = clang::ElaboratedTypeKeyword::None; +#else +constexpr clang::ElaboratedTypeKeyword None = clang::ETK_None; +#endif +} + +namespace Linkage +{ +#if CLANG_VERSION >= 180000 +constexpr clang::Linkage External = clang::Linkage::External; +constexpr clang::Linkage Module = clang::Linkage::Module; +#else +constexpr clang::Linkage External = clang::ExternalLinkage; +constexpr clang::Linkage Module = clang::ModuleLinkage; +#endif +} + +namespace StringLiteralKind +{ +#if CLANG_VERSION >= 180000 +constexpr clang::StringLiteralKind UTF8 = clang::StringLiteralKind::UTF8; +#else +constexpr clang::StringLiteral::StringKind UTF8 = clang::StringLiteral::UTF8; +#endif +} + +namespace TagTypeKind +{ +#if CLANG_VERSION >= 180000 +constexpr clang::TagTypeKind Class = clang::TagTypeKind::Class; +constexpr clang::TagTypeKind Struct = clang::TagTypeKind::Struct; +constexpr clang::TagTypeKind Union = clang::TagTypeKind::Union; +#else +constexpr clang::TagTypeKind Class = clang::TTK_Class; +constexpr clang::TagTypeKind Struct = clang::TTK_Struct; +constexpr clang::TagTypeKind Union = clang::TTK_Union; +#endif +} + +inline bool EvaluateAsInt(clang::Expr const * expr, llvm::APSInt& intRes, const clang::ASTContext& ctx) { + clang::Expr::EvalResult res; + bool b = expr->EvaluateAsInt(res, ctx); + if (b && res.Val.isInt()) + intRes = res.Val.getInt(); + return b; +} + +// Work around CastExpr::getSubExprAsWritten firing +// +// include/llvm/Support/Casting.h:269: typename llvm::cast_retty::ret_type llvm::cast(Y*) +// [with X = clang::CXXConstructExpr; Y = clang::Expr; +// typename llvm::cast_retty::ret_type = clang::CXXConstructExpr*]: Assertion +// `isa(Val) && "cast() argument of incompatible type!"' failed. +// +// for CastExprs involving ConstantExpr (introduced with +// "Create +// ConstantExpr class" towards LLVM 8) like +// +// CXXFunctionalCastExpr 0xc01c4e8 'class rtl::OStringLiteral<9>':'class rtl::OStringLiteral<9>' functional cast to OStringLiteral +// `-ConstantExpr 0xc01c380 'class rtl::OStringLiteral<9>':'class rtl::OStringLiteral<9>' +// |-value: Struct +// | |-fields: Int 1073741824, Int 8 +// | `-field: Array size=9 +// | |-elements: Int 46, Int 111, Int 115, Int 108 +// | |-elements: Int 45, Int 116, Int 109, Int 112 +// | `-element: Int 0 +// `-CXXConstructExpr 0xc01c350 'class rtl::OStringLiteral<9>':'class rtl::OStringLiteral<9>' 'void (const char (&)[9])' +// `-StringLiteral 0xc019ad8 'const char [9]' lvalue ".osl-tmp" +// +// Copies code from Clang's lib/AST/Expr.cpp: +namespace detail { + inline clang::Expr *skipImplicitTemporary(clang::Expr *expr) { + // Skip through reference binding to temporary. + if (clang::MaterializeTemporaryExpr *Materialize + = clang::dyn_cast(expr)) + expr = Materialize->getSubExpr(); + + // Skip any temporary bindings; they're implicit. + if (clang::CXXBindTemporaryExpr *Binder = clang::dyn_cast(expr)) + expr = Binder->getSubExpr(); + + return expr; + } +} +inline clang::Expr *getSubExprAsWritten(clang::CastExpr *This) { + clang::Expr *SubExpr = nullptr; + clang::CastExpr *E = This; + do { + SubExpr = detail::skipImplicitTemporary(E->getSubExpr()); + + // Conversions by constructor and conversion functions have a + // subexpression describing the call; strip it off. + if (E->getCastKind() == clang::CK_ConstructorConversion) + SubExpr = + detail::skipImplicitTemporary(clang::cast(SubExpr->IgnoreImplicit())->getArg(0)); + else if (E->getCastKind() == clang::CK_UserDefinedConversion) { + assert((clang::isa(SubExpr) || + clang::isa(SubExpr)) && + "Unexpected SubExpr for CK_UserDefinedConversion."); + if (clang::isa(SubExpr)) + SubExpr = clang::cast(SubExpr)->getImplicitObjectArgument(); + } + + // If the subexpression we're left with is an implicit cast, look + // through that, too. + } while ((E = clang::dyn_cast(SubExpr))); + + return SubExpr; +} +inline const clang::Expr *getSubExprAsWritten(const clang::CastExpr *This) { + return getSubExprAsWritten(const_cast(This)); +} + +inline bool isOrdinary(clang::StringLiteral const * expr) { +#if CLANG_VERSION >= 150000 + return expr->isOrdinary(); +#else + return expr->isAscii(); +#endif +} + +inline clang::TemplateTypeParmDecl const * getReplacedParameter( + clang::SubstTemplateTypeParmType const * type) +{ +#if CLANG_VERSION >= 160000 + return type->getReplacedParameter(); +#else + return type->getReplacedParameter()->getDecl(); +#endif +} + +// Printing `std::size_t n` via `report(...) << n` is ambiguous prior to +// "[clang] +// Allow printing 64 bit ints in diagnostics" (in Clang 14.x) and its follow-up +// "Resolve +// overload ambiguity on Mac OS when printing size_t in diagnostics" (in Clang 15.x): +inline +#if CLANG_VERSION >= 150000 +std::size_t +#else +unsigned +#endif +diagnosticSize(std::size_t n) { return n; } + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/conditionalstring.cxx b/compilerplugins/clang/conditionalstring.cxx new file mode 100644 index 0000000000..cf858601ea --- /dev/null +++ b/compilerplugins/clang/conditionalstring.cxx @@ -0,0 +1,459 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef LO_CLANG_SHARED_PLUGINS + +#include + +#include "check.hxx" +#include "plugin.hxx" + +// Find uses of OUString in conditional expressions that could be rewritten as std::u16string_view, +// as in +// +// s += (b ? OUString("xy") : OUString(z"); + +namespace +{ +// Like Expr::IgnoreImplicit, but for an ImplicitCastExpr skips to getSubExprAsWritten (so skips a +// CXXConstructExpr where Expr::IgnoreImplicit would stop): +Expr const* ignoreImplicit(Expr const* expr) +{ + for (auto e = expr;;) + { + if (auto const e1 = dyn_cast(e)) + { + e = e1->getSubExprAsWritten(); + } + else if (auto const e2 = dyn_cast(e)) + { + e = e2->getSubExpr(); + } + else if (auto const e3 = dyn_cast(e)) + { + e = e3->getSubExpr(); + } + else if (auto const e4 = dyn_cast(e)) + { + e = e4->getSubExpr(); + } + else + { + return e; + } + } +} + +class ConditionalString final : public loplugin::FilteringPlugin +{ +public: + explicit ConditionalString(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + bool VisitCallExpr(CallExpr const* expr) + { + if (ignoreLocation(expr)) + { + return true; + } + auto const fn = expr->getDirectCallee(); + if (fn == nullptr) + { + return true; + } + //TODO: Instead of a hardcoded list of functions, check that `fn` has overloads taking + // OUString and std::u16string_view, respectively (and operator + is even more complicated + // than that, going via ToStringHelper specialization; the getNumArgs + // checks for the various functions are meant to guard against the unlikely case that the + // affected parameters get defaulted in the future; overloaded operators cannot generally + // have defaulted parameters): + loplugin::DeclCheck const dc(fn); + if (dc.Operator(OO_Equal).Class("OUString").Namespace("rtl").GlobalNamespace()) + { + assert(fn->getNumParams() == 1); + if (isa(expr)) + { + assert(expr->getNumArgs() == 2); + check(expr->getArg(1)); + } + else + { + assert(expr->getNumArgs() == 1); + check(expr->getArg(0)); + } + return true; + } + if (dc.Operator(OO_PlusEqual).Class("OUString").Namespace("rtl").GlobalNamespace()) + { + assert(fn->getNumParams() == 1); + if (isa(expr)) + { + assert(expr->getNumArgs() == 2); + check(expr->getArg(1)); + } + else + { + assert(expr->getNumArgs() == 1); + check(expr->getArg(0)); + } + return true; + } + if (dc.Function("reverseCompareTo").Class("OUString").Namespace("rtl").GlobalNamespace() + && fn->getNumParams() == 1) + { + if (expr->getNumArgs() >= 1) + { + check(expr->getArg(0)); + } + return true; + } + if (dc.Function("equalsIgnoreAsciiCase") + .Class("OUString") + .Namespace("rtl") + .GlobalNamespace() + && fn->getNumParams() == 1) + { + if (expr->getNumArgs() >= 1) + { + check(expr->getArg(0)); + } + return true; + } + if (dc.Function("match").Class("OUString").Namespace("rtl").GlobalNamespace() + && fn->getNumParams() == 2) + { + if (expr->getNumArgs() >= 1) + { + check(expr->getArg(0)); + } + return true; + } + if (dc.Function("matchIgnoreAsciiCase").Class("OUString").Namespace("rtl").GlobalNamespace() + && fn->getNumParams() == 2) + { + if (expr->getNumArgs() >= 1) + { + check(expr->getArg(0)); + } + return true; + } + if (dc.Function("startsWith").Class("OUString").Namespace("rtl").GlobalNamespace() + && fn->getNumParams() == 2) + { + if (expr->getNumArgs() >= 1) + { + check(expr->getArg(0)); + } + return true; + } + if (dc.Function("startsWithIgnoreAsciiCase") + .Class("OUString") + .Namespace("rtl") + .GlobalNamespace() + && fn->getNumParams() == 2) + { + if (expr->getNumArgs() >= 1) + { + check(expr->getArg(0)); + } + return true; + } + if (dc.Function("endsWith").Class("OUString").Namespace("rtl").GlobalNamespace() + && fn->getNumParams() == 2) + { + if (expr->getNumArgs() >= 1) + { + check(expr->getArg(0)); + } + return true; + } + if (dc.Function("endsWithIgnoreAsciiCase") + .Class("OUString") + .Namespace("rtl") + .GlobalNamespace() + && fn->getNumParams() == 2) + { + if (expr->getNumArgs() >= 1) + { + check(expr->getArg(0)); + } + return true; + } + if (dc.Operator(OO_EqualEqual) + .Namespace("rtl") + .GlobalNamespace()) //TODO: more precicse check + { + assert(fn->getNumParams() == 2); + assert(expr->getNumArgs() == 2); + check(expr->getArg(0)); + check(expr->getArg(1)); + return true; + } + if (dc.Operator(OO_ExclaimEqual) + .Namespace("rtl") + .GlobalNamespace()) //TODO: more precicse check + { + assert(fn->getNumParams() == 2); + assert(expr->getNumArgs() == 2); + check(expr->getArg(0)); + check(expr->getArg(1)); + return true; + } + if (dc.Operator(OO_Less).Namespace("rtl").GlobalNamespace()) //TODO: more precicse check + { + assert(fn->getNumParams() == 2); + assert(expr->getNumArgs() == 2); + check(expr->getArg(0)); + check(expr->getArg(1)); + return true; + } + if (dc.Operator(OO_LessEqual) + .Namespace("rtl") + .GlobalNamespace()) //TODO: more precicse check + { + assert(fn->getNumParams() == 2); + assert(expr->getNumArgs() == 2); + check(expr->getArg(0)); + check(expr->getArg(1)); + return true; + } + if (dc.Operator(OO_Greater).Namespace("rtl").GlobalNamespace()) //TODO: more precicse check + { + assert(fn->getNumParams() == 2); + assert(expr->getNumArgs() == 2); + check(expr->getArg(0)); + check(expr->getArg(1)); + return true; + } + if (dc.Operator(OO_GreaterEqual) + .Namespace("rtl") + .GlobalNamespace()) //TODO: more precicse check + { + assert(fn->getNumParams() == 2); + assert(expr->getNumArgs() == 2); + check(expr->getArg(0)); + check(expr->getArg(1)); + return true; + } + if (dc.Function("indexOf").Class("OUString").Namespace("rtl").GlobalNamespace() + && fn->getNumParams() == 2) + { + if (expr->getNumArgs() >= 1) + { + check(expr->getArg(0)); + } + return true; + } + if (dc.Function("lastIndexOf").Class("OUString").Namespace("rtl").GlobalNamespace() + && fn->getNumParams() == 1) + { + if (expr->getNumArgs() >= 1) + { + check(expr->getArg(0)); + } + return true; + } + if (dc.Function("replaceFirst").Class("OUString").Namespace("rtl").GlobalNamespace() + && fn->getNumParams() == 3) + { + if (expr->getNumArgs() >= 1) + { + check(expr->getArg(0)); + } + if (expr->getNumArgs() >= 2) + { + check(expr->getArg(1)); + } + return true; + } + if (dc.Function("replaceAll").Class("OUString").Namespace("rtl").GlobalNamespace() + && fn->getNumParams() == 2) + { + if (expr->getNumArgs() >= 1) + { + check(expr->getArg(0)); + } + if (expr->getNumArgs() >= 2) + { + check(expr->getArg(1)); + } + return true; + } + if (dc.Operator(OO_Plus).Namespace("rtl").GlobalNamespace() + && fn->getNumParams() == 2) //TODO: more precicse check + { + assert(expr->getNumArgs() == 2); + check(expr->getArg(0)); + check(expr->getArg(1)); + return true; + } + if (dc.Operator(OO_Equal).Class("OUStringBuffer").Namespace("rtl").GlobalNamespace()) + { + assert(fn->getNumParams() == 1); + if (isa(expr)) + { + assert(expr->getNumArgs() == 2); + check(expr->getArg(1)); + } + else + { + assert(expr->getNumArgs() == 1); + check(expr->getArg(0)); + } + return true; + } + if (dc.Function("append").Class("OUStringBuffer").Namespace("rtl").GlobalNamespace() + && fn->getNumParams() == 1) + { + if (expr->getNumArgs() >= 1) + { + check(expr->getArg(0)); + } + return true; + } + if (dc.Function("insert").Class("OUStringBuffer").Namespace("rtl").GlobalNamespace() + && fn->getNumParams() == 2) + { + if (expr->getNumArgs() >= 2) + { + check(expr->getArg(1)); + } + return true; + } + if (dc.Function("indexOf").Class("OUStringBuffer").Namespace("rtl").GlobalNamespace() + && fn->getNumParams() == 2) + { + if (expr->getNumArgs() >= 1) + { + check(expr->getArg(0)); + } + return true; + } + if (dc.Function("lastIndexOf").Class("OUStringBuffer").Namespace("rtl").GlobalNamespace() + && fn->getNumParams() == 1) + { + if (expr->getNumArgs() >= 1) + { + check(expr->getArg(0)); + } + return true; + } + return true; + } + + bool preRun() override { return compiler.getLangOpts().CPlusPlus; } + +private: + enum class Kind + { + OUStringFromLiteral, + StringViewOrVoid, + Other + }; + + void run() override + { + if (preRun()) + { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + } + + Kind getKind(Expr const* expr) + { + auto const tc = loplugin::TypeCheck(ignoreImplicit(expr)->getType()); + if (tc.ClassOrStruct("basic_string_view").StdNamespace() //TODO: check explicitly for + // std::basic_string_view + || tc.Void()) + { + return Kind::StringViewOrVoid; + } + if (loplugin::TypeCheck(expr->getType()) + .Class("OUString") + .Namespace("rtl") + .GlobalNamespace()) + { + // Check for both explicit + // + // OUString("...") + // + // and implicit + // + // "..." + // + // expressions: + auto e = expr->IgnoreParens(); + if (auto const e1 = dyn_cast(e)) + { + e = e1->getSubExpr(); + } + if (auto const e1 = dyn_cast(e->IgnoreImplicit()->IgnoreParens())) + { + if (e1->getNumArgs() != 0 //TODO + && isa(e1->getArg(0)->IgnoreParenImpCasts())) + { + return Kind::OUStringFromLiteral; + } + } + } + return Kind::Other; + } + + void check(Expr const* expr) + { + //TODO: skip `,`; handle ?: chains + auto const cond = dyn_cast(expr->IgnoreParenImpCasts()); + if (cond == nullptr) + { + return; + } + auto const k1 = getKind(cond->getTrueExpr()); + if (k1 == Kind::Other) + { + return; + } + auto const k2 = getKind(cond->getFalseExpr()); + if (k2 == Kind::Other || (k1 == Kind::StringViewOrVoid && k2 == Kind::StringViewOrVoid)) + { + return; + } + if (k1 == Kind::OUStringFromLiteral && k2 == Kind::OUStringFromLiteral) + { + report(DiagnosticsEngine::Warning, + ("replace both 2nd and 3rd operands of conditional expression with" + " `std::u16string_view`"), + cond->getExprLoc()) + << cond->getSourceRange(); + } + else + { + assert((k1 == Kind::OUStringFromLiteral && k2 == Kind::StringViewOrVoid) + || (k1 == Kind::StringViewOrVoid && k2 == Kind::OUStringFromLiteral)); + auto const second = k1 == Kind::OUStringFromLiteral; + auto const sub + = (second ? cond->getTrueExpr() : cond->getFalseExpr())->IgnoreParenImpCasts(); + report(DiagnosticsEngine::Warning, + ("replace %select{2nd|3rd}0 operand of conditional expression with" + " `std::u16string_view`"), + sub->getExprLoc()) + << (second ? 0 : 1) << sub->getSourceRange(); + report(DiagnosticsEngine::Note, "conditional expression is here", cond->getExprLoc()) + << cond->getSourceRange(); + } + } +}; + +loplugin::Plugin::Registration conditionalstring("conditionalstring"); +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/constantparam.bitmask.results b/compilerplugins/clang/constantparam.bitmask.results new file mode 100644 index 0000000000..5a78a996d7 --- /dev/null +++ b/compilerplugins/clang/constantparam.bitmask.results @@ -0,0 +1,54 @@ +codemaker/source/javamaker/classfile.hxx:152 + void codemaker::javamaker::ClassFile::ClassFile(enum codemaker::javamaker::ClassFile::AccessFlags,const class rtl::OString &,const class rtl::OString &,const class rtl::OString &) + enum codemaker::javamaker::ClassFile::AccessFlags accessFlags setBits=0x1 +codemaker/source/javamaker/classfile.hxx:167 + void codemaker::javamaker::ClassFile::addField(enum codemaker::javamaker::ClassFile::AccessFlags,const class rtl::OString &,const class rtl::OString &,unsigned short,const class rtl::OString &) + enum codemaker::javamaker::ClassFile::AccessFlags accessFlags setBits=0x1 +dbaccess/source/filter/xml/xmlExport.hxx:163 + void dbaxml::ODBExport::ODBExport(const class com::sun::star::uno::Reference &,const class rtl::OUString &,enum SvXMLExportFlags) + enum SvXMLExportFlags nExportFlag setBits=0x400 clearBits=0x200 +include/basegfx/polygon/b2dpolygontools.hxx:145 + enum CutFlagValue findCut(const class basegfx::B2DPoint &,const class basegfx::B2DVector &,const class basegfx::B2DPoint &,const class basegfx::B2DVector &,enum CutFlagValue,double *,double *) + enum CutFlagValue aCutFlags setBits=0x1 +include/framework/framelistanalyzer.hxx:185 + void framework::FrameListAnalyzer::FrameListAnalyzer(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,enum FrameAnalyzerFlags) + enum FrameAnalyzerFlags eDetectMode setBits=0x4 +include/sfx2/objsh.hxx:467 + void SfxObjectShell::FinishedLoading(enum SfxLoadedFlags) + enum SfxLoadedFlags nWhich setBits=0x1 +include/svtools/brwbox.hxx:510 + void BrowseBox::InsertDataColumn(unsigned short,const class rtl::OUString &,long,enum HeaderBarItemBits,unsigned short) + enum HeaderBarItemBits nBits setBits=0x400 clearBits=0x3ec +include/vcl/wizardmachine.hxx:139 + void vcl::WizardMachine::WizardMachine(class weld::Window *,enum WizardButtonFlags) + enum WizardButtonFlags _nButtonFlags setBits=0xf +sc/inc/rangelst.hxx:47 + void ScRangeList::Format(class rtl::OUString &,enum ScRefFlags,const class ScDocument &,enum formula::FormulaGrammar::AddressConvention,char16_t,_Bool) const + enum ScRefFlags nFlags setBits=0x8000 clearBits=0x7f80 +sc/inc/rangeutl.hxx:168 + void ScRangeStringConverter::GetStringFromAddress(class rtl::OUString &,const class ScAddress &,const class ScDocument *,enum formula::FormulaGrammar::AddressConvention,char16_t,_Bool,enum ScRefFlags) + enum ScRefFlags nFormatFlags setBits=0x8008 clearBits=0x7ff0 +sc/inc/xmlwrap.hxx:88 + _Bool ScXMLImportWrapper::Import(enum ImportFlags,class ErrCode &) + enum ImportFlags nMode setBits=0x1 +sc/source/ui/view/cellsh1.cxx:103 + enum InsertDeleteFlags FlagsFromString(const class rtl::OUString &,enum InsertDeleteFlags) + enum InsertDeleteFlags nFlagsMask setBits=0x87f clearBits=0x700 +sc/source/ui/view/cellsh1.cxx:126 + class rtl::OUString FlagsToString(enum InsertDeleteFlags,enum InsertDeleteFlags) + enum InsertDeleteFlags nFlagsMask setBits=0x87f clearBits=0x700 +sw/source/core/view/viewsh.cxx:719 + void lcl_InvalidateAllContent(class SwViewShell &,enum SwInvalidateFlags) + enum SwInvalidateFlags nInv setBits=0x2 +sw/source/filter/html/swhtml.hxx:689 + void SwHTMLParser::SetFrameFormatAttrs(class SfxItemSet &,enum HtmlFrameFormatFlags,class SfxItemSet &) + enum HtmlFrameFormatFlags nFlags setBits=0x1 +sw/source/filter/ww8/wrtw8esh.cxx:1545 + enum ShapeFlag AddMirrorFlags(enum ShapeFlag,const class SwMirrorGrf &) + enum ShapeFlag nFlags setBits=0xa00 clearBits=0x5ef +xmloff/inc/MetaExportComponent.hxx:31 + void XMLMetaExportComponent::XMLMetaExportComponent(const class com::sun::star::uno::Reference &,const class rtl::OUString &,enum SvXMLExportFlags) + enum SvXMLExportFlags nFlags setBits=0x1 +xmloff/source/text/XMLAutoTextEventExport.hxx:50 + void XMLAutoTextEventExport::XMLAutoTextEventExport(const class com::sun::star::uno::Reference &,const class rtl::OUString &,enum SvXMLExportFlags) + enum SvXMLExportFlags nFlags setBits=0x5ff clearBits=0x200 diff --git a/compilerplugins/clang/constantparam.booleans.results b/compilerplugins/clang/constantparam.booleans.results new file mode 100644 index 0000000000..763d19b7c2 --- /dev/null +++ b/compilerplugins/clang/constantparam.booleans.results @@ -0,0 +1,4304 @@ +accessibility/inc/standard/vclxaccessiblemenuitem.hxx:58 + void VCLXAccessibleMenuItem::VCLXAccessibleMenuItem(class Menu *,unsigned short,class Menu *) + class Menu * pMenu + 0 +accessibility/source/standard/vclxaccessibletoolbox.cxx:101 + void (anonymous namespace)::OToolBoxWindowItem::OToolBoxWindowItem(int,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &) + int _nIndexInParent + 0 +basctl/source/basicide/moduldlg.hxx:107 + void basctl::LibDialog::EnableReference(_Bool) + _Bool b + 0 +basctl/source/inc/scriptdocument.hxx:88 + void basctl::ScriptDocument::ScriptDocument(enum basctl::ScriptDocument::SpecialDocument) + enum basctl::ScriptDocument::SpecialDocument _eType + 0 +basegfx/source/polygon/b2dpolygon.cxx:61 + void (anonymous namespace)::CoordinateDataArray2D::CoordinateDataArray2D(unsigned int) + unsigned int nCount + 0 +basegfx/source/polygon/b3dpolygon.cxx:78 + void (anonymous namespace)::CoordinateDataArray3D::CoordinateDataArray3D(unsigned int) + unsigned int nCount + 0 +basic/source/inc/runtime.hxx:324 + void SbiRuntime::StepRESUME(unsigned int) + unsigned int + 1 +basic/source/inc/runtime.hxx:355 + _Bool SbiRuntime::IsMissing(class SbxVariable *,unsigned short) + unsigned short + 1 +basic/source/runtime/iosys.cxx:62 + void (anonymous namespace)::SbiInputDialog::SbiInputDialog(class weld::Window *,const class rtl::OUString &) + class weld::Window * + 0 +canvas/inc/parametricpolypolygon.hxx:139 + void canvas::ParametricPolyPolygon::ParametricPolyPolygon(const class com::sun::star::uno::Reference &,enum canvas::ParametricPolyPolygon::GradientType,const class com::sun::star::uno::Sequence > &,const class com::sun::star::uno::Sequence &) + enum canvas::ParametricPolyPolygon::GradientType eType + 0 +canvas/inc/spriteredrawmanager.hxx:108 + void canvas::SpriteRedrawManager::SpriteInfo::SpriteInfo(const class rtl::Reference &,const class basegfx::B2DRange &,_Bool,_Bool) + _Bool bNeedsUpdate + 1 +canvas/inc/verifyinput.hxx:147 + void verifyInput(const struct com::sun::star::geometry::RealBezierSegment2D &,const char *,const class com::sun::star::uno::Reference &,short) + short nArgPos + 0 +canvas/inc/verifyinput.hxx:279 + void verifyInput(const struct com::sun::star::rendering::IntegerBitmapLayout &,const char *,const class com::sun::star::uno::Reference &,short) + short nArgPos + 0 +canvas/inc/verifyinput.hxx:520 + void verifyRange(type-parameter-?-?,type-parameter-?-?,_Bool) + type-parameter-?-? bound + 1 +canvas/inc/verifyinput.hxx:520 + void verifyRange(type-parameter-?-?,type-parameter-?-?,_Bool) + _Bool bLowerBound + 1 +canvas/source/cairo/cairo_canvashelper.hxx:248 + void cairocanvas::CanvasHelper::useStates(const struct com::sun::star::rendering::ViewState &,const struct com::sun::star::rendering::RenderState &,_Bool) + _Bool setColor + 1 +canvas/source/vcl/spritecanvashelper.hxx:44 + void vclcanvas::SpriteCanvasHelper::init(const class std::shared_ptr &,class vclcanvas::SpriteCanvas &,class canvas::SpriteRedrawManager &,_Bool,_Bool) + _Bool bProtect + 0 +canvas/source/vcl/spritecanvashelper.hxx:44 + void vclcanvas::SpriteCanvasHelper::init(const class std::shared_ptr &,class vclcanvas::SpriteCanvas &,class canvas::SpriteRedrawManager &,_Bool,_Bool) + _Bool bHaveAlpha + 0 +chart2/qa/extras/chart2dump/chart2dump.cxx:91 + void Chart2DumpTest::Chart2DumpTest(_Bool) + _Bool bDumpMode + 0 +chart2/qa/extras/chart2export.cxx:452 + void checkCommonTrendline(const class com::sun::star::uno::Reference &,double,double,_Bool,double,_Bool,_Bool) + _Bool aExpectedShowEquation + 1 +chart2/qa/extras/charttest.hxx:244 + class com::sun::star::uno::Reference getPivotChartDocFromSheet(int,const class com::sun::star::uno::Reference &) + int nSheet + 1 +chart2/qa/extras/charttest.hxx:250 + class com::sun::star::uno::Reference getPivotChartDocFromSheet(const class com::sun::star::uno::Reference &,int) + int nIndex + 0 +chart2/qa/extras/charttest.hxx:284 + class com::sun::star::uno::Reference getAxisFromDoc(const class com::sun::star::uno::Reference &,int,int,int) + int nCooSys + 0 +chart2/qa/extras/charttest.hxx:304 + int getNumberOfDataSeries(const class com::sun::star::uno::Reference &,int,int) + int nChartType + 0 +chart2/qa/extras/charttest.hxx:304 + int getNumberOfDataSeries(const class com::sun::star::uno::Reference &,int,int) + int nCooSys + 0 +chart2/qa/extras/charttest.hxx:314 + class com::sun::star::uno::Reference getDataSeriesFromDoc(const class com::sun::star::uno::Reference &,int,int,int) + int nCooSys + 0 +chart2/qa/extras/charttest.hxx:329 + class com::sun::star::uno::Reference getLabelDataSequenceFromDoc(const class com::sun::star::uno::Reference &,int,int) + int nChartType + 0 +chart2/qa/extras/charttest.hxx:351 + class com::sun::star::uno::Reference getDataSequenceFromDocByRole(const class com::sun::star::uno::Reference &,class std::basic_string_view >,int,int) + int nChartType + 0 +chart2/qa/extras/PivotChartTest.cxx:134 + void lclModifyColumnGrandTotal(const class com::sun::star::uno::Reference &,_Bool) + _Bool bTotal + 1 +chart2/qa/extras/PivotChartTest.cxx:140 + void lclModifyRowGrandTotal(const class com::sun::star::uno::Reference &,_Bool) + _Bool bTotal + 1 +chart2/qa/extras/PivotChartTest.cxx:177 + class com::sun::star::uno::Reference lclGetPivotTableByName(int,const class rtl::OUString &,const class com::sun::star::uno::Reference &) + int nIndex + 1 +chart2/qa/extras/PivotChartTest.cxx:219 + class com::sun::star::uno::Reference lclGetDataPilotTables(int,const class com::sun::star::uno::Reference &) + int nIndex + 0 +chart2/source/controller/dialogs/DialogModel.cxx:170 + struct (anonymous namespace)::lcl_DataSeriesContainerAppend & (anonymous namespace)::lcl_DataSeriesContainerAppend::operator++(int) + int + 0 +chart2/source/controller/dialogs/DialogModel.cxx:229 + struct (anonymous namespace)::lcl_RolesWithRangeAppend & (anonymous namespace)::lcl_RolesWithRangeAppend::operator++(int) + int + 0 +chart2/source/controller/inc/ChartController.hxx:367 + class chart::ChartController::TheModelRef & chart::ChartController::TheModelRef::operator=(class chart::ChartController::TheModel *) + ###1 + 0 +chart2/source/controller/inc/ViewElementListProvider.hxx:51 + class Graphic chart::ViewElementListProvider::GetSymbolGraphic(int,const class SfxItemSet *) const + int nStandardSymbol + 0 +chart2/source/inc/AxisHelper.hxx:193 + class com::sun::star::uno::Reference chart::AxisHelper::getChartTypeByIndex(const class com::sun::star::uno::Reference &,int) + int nIndex + 0 +chart2/source/inc/ChartTypeDialogController.hxx:64 + void chart::ChartTypeParameter::ChartTypeParameter(int,_Bool,_Bool,enum chart::GlobalStackMode,_Bool,_Bool,enum com::sun::star::chart2::CurveStyle) + enum com::sun::star::chart2::CurveStyle eCurveStyle + 0 +chart2/source/model/template/ColumnLineChartTypeTemplate.hxx:37 + void chart::ColumnLineChartTypeTemplate::ColumnLineChartTypeTemplate(const class com::sun::star::uno::Reference &,const class rtl::OUString &,enum chart::StackMode,int) + int nNumberOfLines + 1 +chart2/source/tools/InternalDataProvider.cxx:244 + void chart::(anonymous namespace)::lcl_setAnyAtLevelFromStringSequence::lcl_setAnyAtLevelFromStringSequence(int) + int nLevel + 0 +chart2/source/view/axes/VAxisProperties.hxx:149 + struct chart::TickmarkProperties chart::AxisProperties::makeTickmarkPropertiesForComplexCategories(int,int) const + int nTickStartDistanceToAxis + 0 +chart2/source/view/axes/VCartesianAxis.hxx:31 + void chart::VCartesianAxis::VCartesianAxis(const struct chart::AxisProperties &,const class com::sun::star::uno::Reference &,int,int,class chart::PlottingPositionHelper *) + int nDimensionIndex + 1 +chart2/source/view/charttypes/CategoryPositionHelper.hxx:27 + void chart::CategoryPositionHelper::CategoryPositionHelper(double,double) + double fSeriesCount + 1 +chart2/source/view/inc/PlottingPositionHelper.hxx:111 + void chart::PlottingPositionHelper::AllowShiftXAxisPos(_Bool) + _Bool bAllowShift + 1 +chart2/source/view/inc/PlottingPositionHelper.hxx:112 + void chart::PlottingPositionHelper::AllowShiftZAxisPos(_Bool) + _Bool bAllowShift + 1 +chart2/source/view/inc/Stripe.hxx:52 + void chart::Stripe::InvertNormal(_Bool) + _Bool bInvertNormal + 1 +chart2/source/view/main/ShapeFactory.cxx:705 + void appendAndCloseBezierCoords(struct com::sun::star::drawing::PolyPolygonBezierCoords &,const struct com::sun::star::drawing::PolyPolygonBezierCoords &,_Bool) + _Bool bAppendInverse + 1 +chart2/source/view/main/VButton.hxx:50 + void chart::VButton::showArrow(_Bool) + _Bool bShowArrow + 0 +codemaker/source/javamaker/classfile.hxx:119 + void codemaker::javamaker::ClassFile::Code::storeLocalReference(unsigned short) + unsigned short index + 1 +comphelper/source/misc/backupfilehelper.cxx:58 + unsigned int createCrc32(const class std::shared_ptr &,unsigned int) + unsigned int nOffset + 0 +connectivity/inc/sdbcx/VIndex.hxx:62 + void connectivity::sdbcx::OIndex::OIndex(_Bool) + _Bool _bCase + 1 +connectivity/inc/sdbcx/VIndex.hxx:63 + void connectivity::sdbcx::OIndex::OIndex(const class rtl::OUString &,const class rtl::OUString &,_Bool,_Bool,_Bool,_Bool) + _Bool _bCase + 1 +connectivity/inc/sdbcx/VKey.hxx:77 + void connectivity::sdbcx::OKey::OKey(_Bool) + _Bool _bCase + 1 +connectivity/inc/sdbcx/VKey.hxx:78 + void connectivity::sdbcx::OKey::OKey(const class rtl::OUString &,const class std::shared_ptr &,_Bool) + _Bool _bCase + 1 +connectivity/inc/sdbcx/VUser.hxx:61 + void connectivity::sdbcx::OUser::OUser(_Bool) + _Bool _bCase + 1 +connectivity/inc/sdbcx/VUser.hxx:62 + void connectivity::sdbcx::OUser::OUser(const class rtl::OUString &,_Bool) + _Bool _bCase + 1 +connectivity/source/drivers/postgresql/pq_connection.cxx:345 + void pq_sdbc_driver::(anonymous namespace)::cstr_vector::push_back(const char *,enum __sal_NoAcquire) + enum __sal_NoAcquire + 0 +connectivity/source/drivers/postgresql/pq_resultsetmetadata.hxx:88 + _Bool pq_sdbc_driver::ResultSetMetaData::getBoolColumnProperty(const class rtl::OUString &,int,_Bool) + _Bool def + 0 +connectivity/source/inc/dbase/DIndex.hxx:112 + _Bool connectivity::dbase::ODbaseIndex::Find(unsigned int,const class connectivity::ORowSetValue &) + unsigned int nRec + 0 +connectivity/source/inc/OColumn.hxx:67 + void connectivity::OColumn::OColumn(const class rtl::OUString &,const class rtl::OUString &,int,int,int,int,int) + int _aScale + 0 +connectivity/source/inc/odbc/OTools.hxx:179 + void connectivity::odbc::OTools::getBindTypes(_Bool,_Bool,short,short &,short &) + _Bool _bUseWChar + 0 +connectivity/source/inc/odbc/OTools.hxx:216 + void connectivity::odbc::OTools::bindValue(const class connectivity::odbc::OConnection *,void *,int,short,short,const void *,void *,long *,const class com::sun::star::uno::Reference &,unsigned short,_Bool) + short _nMaxLen + 0 +cppcanvas/source/mtfrenderer/mtftools.cxx:285 + void appendRect(class basegfx::B2DPolyPolygon &,const class basegfx::B2DPoint &,const double,const double,const double,const double) + const double nX1 + 0 +cppu/qa/test_reference.cxx:88 + const class com::sun::star::uno::Type & (anonymous namespace)::Base1::static_type(void *) + void * + 0 +cppu/qa/test_unotype.cxx:63 + void (anonymous namespace)::DerivedInterface1::dummy(struct (anonymous namespace)::DerivedInterface1 *) + struct (anonymous namespace)::DerivedInterface1 * p + 0 +cppu/qa/test_unotype.cxx:74 + void (anonymous namespace)::DerivedInterface2::dummy(struct (anonymous namespace)::DerivedInterface2 *) + struct (anonymous namespace)::DerivedInterface2 * p + 0 +cui/source/inc/acccfg.hxx:43 + void TAccInfo::TAccInfo(int,int,const class vcl::KeyCode &) + int nListPos + 0 +cui/source/inc/cfg.hxx:336 + void SvxMenuEntriesListBox::set_text(int,const class rtl::OUString &,int) + int col + 0 +cui/source/inc/cfg.hxx:456 + void SvxConfigPage::InsertEntryIntoUI(class SvxConfigEntry *,class weld::TreeView &,class weld::TreeIter &,_Bool) + _Bool bMenu + 1 +cui/source/inc/cfgutil.hxx:130 + void CuiConfigFunctionListBox::append(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class weld::TreeIter *) + const class weld::TreeIter * pParent + 0 +cui/source/inc/cfgutil.hxx:145 + class std::unique_ptr > CuiConfigFunctionListBox::make_iterator(const class weld::TreeIter *) const + const class weld::TreeIter * pOrig + 0 +cui/source/inc/cuitabarea.hxx:725 + void SvxColorTabPage::SetPropertyList(enum XPropertyListType,const class rtl::Reference &) + enum XPropertyListType t + 0 +cui/source/inc/hangulhanjadlg.hxx:54 + void svx::SuggestionDisplay::SelectEntryPos(unsigned short) + unsigned short nPos + 0 +cui/source/inc/hangulhanjadlg.hxx:58 + class rtl::OUString svx::SuggestionDisplay::GetEntry(unsigned short) const + unsigned short nPos + 0 +cui/source/inc/scriptdlg.hxx:122 + void SvxScriptOrgDialog::insertEntry(const class rtl::OUString &,const class rtl::OUString &,const class weld::TreeIter *,_Bool,class std::unique_ptr > &&,const class rtl::OUString &,_Bool) + const class weld::TreeIter * pParent + 0 +cui/source/inc/scriptdlg.hxx:122 + void SvxScriptOrgDialog::insertEntry(const class rtl::OUString &,const class rtl::OUString &,const class weld::TreeIter *,_Bool,class std::unique_ptr > &&,const class rtl::OUString &,_Bool) + _Bool bChildrenOnDemand + 1 +cui/source/inc/scriptdlg.hxx:122 + void SvxScriptOrgDialog::insertEntry(const class rtl::OUString &,const class rtl::OUString &,const class weld::TreeIter *,_Bool,class std::unique_ptr > &&,const class rtl::OUString &,_Bool) + _Bool bSelect + 0 +cui/source/options/optjsearch.hxx:65 + void SvxJSearchOptionsPage::EnableSaveOptions(_Bool) + _Bool bVal + 0 +dbaccess/source/core/dataaccess/databasedocument.hxx:674 + void dbaccess::DocumentGuard::DocumentGuard(const class dbaccess::ODatabaseDocument &,enum dbaccess::DocumentGuard::DefaultMethod_) + enum dbaccess::DocumentGuard::DefaultMethod_ + 0 +dbaccess/source/core/dataaccess/databasedocument.hxx:692 + void dbaccess::DocumentGuard::DocumentGuard(const class dbaccess::ODatabaseDocument &,enum dbaccess::DocumentGuard::InitMethod_) + enum dbaccess::DocumentGuard::InitMethod_ + 0 +dbaccess/source/core/dataaccess/databasedocument.hxx:711 + void dbaccess::DocumentGuard::DocumentGuard(const class dbaccess::ODatabaseDocument &,enum dbaccess::DocumentGuard::MethodUsedDuringInit_) + enum dbaccess::DocumentGuard::MethodUsedDuringInit_ + 0 +dbaccess/source/core/dataaccess/databasedocument.hxx:726 + void dbaccess::DocumentGuard::DocumentGuard(const class dbaccess::ODatabaseDocument &,enum dbaccess::DocumentGuard::MethodWithoutInit_) + enum dbaccess::DocumentGuard::MethodWithoutInit_ + 0 +dbaccess/source/core/inc/column.hxx:167 + void dbaccess::OColumns::OColumns(class cppu::OWeakObject &,class osl::Mutex &,_Bool,const class std::__debug::vector > &,class dbaccess::IColumnFactory *,class connectivity::sdbcx::IRefreshableColumns *,_Bool,_Bool,_Bool) + _Bool _bDropColumn + 0 +dbaccess/source/core/inc/column.hxx:178 + void dbaccess::OColumns::OColumns(class cppu::OWeakObject &,class osl::Mutex &,const class com::sun::star::uno::Reference &,_Bool,const class std::__debug::vector > &,class dbaccess::IColumnFactory *,class connectivity::sdbcx::IRefreshableColumns *,_Bool,_Bool,_Bool) + _Bool _bUseHardRef + 1 +dbaccess/source/ui/control/tabletree.cxx:167 + class std::__debug::vector > lcl_getMetaDataStrings_throw(const class com::sun::star::uno::Reference &,int) + int _nColumnIndex + 1 +dbaccess/source/ui/inc/charsets.hxx:45 + class dbaui::OCharsetDisplay::ExtendedCharsetIterator dbaui::OCharsetDisplay::findEncoding(const unsigned short) const + const unsigned short _eEncoding + 0 +dbaccess/source/ui/inc/FieldDescControl.hxx:121 + void dbaui::OFieldDescControl::InitializeControl(class dbaui::OPropListBoxCtrl *,const class rtl::OString &,_Bool) + _Bool _bAddChangeHandler + 1 +dbaccess/source/ui/inc/imageprovider.hxx:77 + class com::sun::star::uno::Reference dbaui::ImageProvider::getXGraphic(const class rtl::OUString &,const int) + const int _nDatabaseObjectType + 0 +dbaccess/source/ui/inc/IUpdateHelper.hxx:32 + void dbaui::IUpdateHelper::updateInt(int,int) + int _nPos + 1 +dbaccess/source/ui/inc/WCopyTable.hxx:310 + void dbaui::OCopyTableWizard::OCopyTableWizard(class weld::Window *,const class rtl::OUString &,short,const class std::__debug::map > > &,const class std::__debug::vector >, class std::__debug::map > >, struct std::bidirectional_iterator_tag>, class std::allocator >, class std::__debug::map > >, struct std::bidirectional_iterator_tag> > > &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,class std::unique_ptr > (*)(class weld::Container *, class dbaui::OCopyTableWizard *, class SvStream &),class SvStream &,const class com::sun::star::uno::Reference &) + class weld::Window * pParent + 0 +dbaccess/source/ui/inc/WTypeSelect.hxx:122 + void dbaui::OWizTypeSelect::EnableAuto(_Bool) + _Bool bEnable + 0 +desktop/source/deployment/gui/dp_gui_updatedialog.hxx:102 + void dp_gui::UpdateDialog::addAdditional(struct dp_gui::UpdateDialog::Index *,_Bool) + _Bool bEnableCheckBox + 0 +desktop/source/lib/init.cxx:6412 + struct _LibreOfficeKit * libreofficekit_hook_2(const char *,const char *) + const char * user_profile_url + 0 +drawinglayer/source/processor2d/vclhelperbufferdevice.cxx:70 + class VclPtr (anonymous namespace)::VDevBuffer::alloc(class OutputDevice &,const class Size &,_Bool,_Bool) + _Bool bMonoChrome + 0 +editeng/source/editeng/editstt2.hxx:28 + void InternalEditStatus::TurnOnFlags(enum EEControlBits) + enum EEControlBits nFlags + 1 +editeng/source/editeng/editstt2.hxx:31 + void InternalEditStatus::TurnOffFlags(enum EEControlBits) + enum EEControlBits nFlags + 1 +editeng/source/editeng/impedit.hxx:896 + unsigned short ImpEditEngine::GetLineHeight(int,int) + int nLine + 0 +extensions/source/propctrlr/browserline.hxx:95 + void pcr::OBrowserLine::Show(_Bool) + _Bool bFlag + 0 +extensions/source/propctrlr/newdatatype.hxx:39 + void pcr::NewDataTypeDialog::NewDataTypeDialog(class weld::Window *,const class rtl::OUString &,const class std::__debug::vector > &) + class weld::Window * _pParent + 0 +extensions/source/propctrlr/propertyhandler.hxx:184 + void pcr::PropertyHandler::addDoublePropertyDescription(class std::__debug::vector > &,const class rtl::OUString &,short) const + short _nAttribs + 1 +extensions/source/propctrlr/propertyhandler.hxx:192 + void pcr::PropertyHandler::addDatePropertyDescription(class std::__debug::vector > &,const class rtl::OUString &,short) const + short _nAttribs + 1 +extensions/source/propctrlr/propertyhandler.hxx:200 + void pcr::PropertyHandler::addTimePropertyDescription(class std::__debug::vector > &,const class rtl::OUString &,short) const + short _nAttribs + 1 +extensions/source/propctrlr/propertyhandler.hxx:208 + void pcr::PropertyHandler::addDateTimePropertyDescription(class std::__debug::vector > &,const class rtl::OUString &,short) const + short _nAttribs + 1 +extensions/source/propctrlr/usercontrol.hxx:41 + void pcr::OFormatSampleControl::OFormatSampleControl(class std::unique_ptr >,class std::unique_ptr >,_Bool) + _Bool bReadOnly + 0 +extensions/source/propctrlr/usercontrol.hxx:91 + void pcr::OFormattedNumericControl::OFormattedNumericControl(class std::unique_ptr >,class std::unique_ptr >,_Bool) + _Bool bReadOnly + 0 +extensions/source/propctrlr/usercontrol.hxx:124 + void pcr::OFileUrlControl::OFileUrlControl(class std::unique_ptr >,class std::unique_ptr >,_Bool) + _Bool bReadOnly + 0 +extensions/source/scanner/grid.cxx:130 + void GridWindow::Init(double *,double *,int,_Bool,const class BitmapEx &) + _Bool bCutValues + 1 +extensions/source/scanner/grid.hxx:47 + void GridDialog::setBoundings(double,double,double,double) + double fMinX + 0 +filter/source/graphicfilter/icgm/cgm.hxx:88 + unsigned char CGM::ImplGetByte(unsigned int,unsigned int) + unsigned int nPrecision + 1 +filter/source/svg/svgfilter.hxx:258 + _Bool SVGFilter::implExportMasterPages(const class std::__debug::vector, class std::allocator > > &,int,int) + int nFirstPage + 0 +filter/source/svg/svgfilter.hxx:260 + void SVGFilter::implExportDrawPages(const class std::__debug::vector, class std::allocator > > &,int,int) + int nFirstPage + 0 +filter/source/svg/svgwriter.hxx:258 + void SVGTextWriter::startTextPosition(_Bool,_Bool) + _Bool bExportY + 1 +forms/source/component/DatabaseForm.hxx:232 + void frm::ODatabaseForm::fire(int *,const class com::sun::star::uno::Any *,const class com::sun::star::uno::Any *,int) + int nCount + 1 +forms/source/component/GroupManager.hxx:143 + const class com::sun::star::uno::Reference & frm::OGroup::GetObject(unsigned short) const + unsigned short nP + 0 +forms/source/inc/featuredispatcher.hxx:50 + void frm::IFeatureDispatcher::dispatchWithArgument(short,const char *,const class com::sun::star::uno::Any &) const + short _nFeatureId + 1 +formula/source/ui/dlg/structpg.hxx:58 + _Bool formula::StructPage::InsertEntry(const class rtl::OUString &,const class weld::TreeIter *,unsigned short,int,const class formula::FormulaToken *,class weld::TreeIter &) + int nPos + 0 +fpicker/source/office/autocmpledit.hxx:39 + void AutocompleteEdit::select_region(int,int) + int nStartPos + 0 +fpicker/source/office/fileview.hxx:161 + void SvtFileView::EnableDelete(_Bool) + _Bool bEnable + 1 +framework/inc/uielement/uicommanddescription.hxx:83 + void framework::UICommandDescription::UICommandDescription(const class com::sun::star::uno::Reference &,_Bool) + _Bool + 1 +helpcompiler/inc/HelpCompiler.hxx:58 + void fs::path::path(const class std::__cxx11::basic_string, class std::allocator > &,enum fs::convert) + enum fs::convert + 0 +hwpfilter/source/hfont.h:63 + const char * HWPFont::GetFontName(int,int) + int lang + 0 +hwpfilter/source/hwpfile.h:145 + void HWPFile::Read4b(void *,unsigned long) + unsigned long nmemb + 1 +i18npool/source/localedata/LocaleNode.hxx:74 + const class rtl::OUString & Attr::getValueByIndex(int) const + int idx + 0 +idlc/inc/errorhandler.hxx:86 + void ErrorHandler::warning0(enum WarningCode,const char *) + enum WarningCode e + 0 +idlc/source/errorhandler.cxx:399 + void errorHeader(enum ErrorCode,unsigned int) + enum ErrorCode eCode + 0 +include/avmedia/mediaplayer.hxx:51 + void avmedia::MediaFloater::setURL(const class rtl::OUString &,const class rtl::OUString &,_Bool) + _Bool bPlayImmediately + 1 +include/basegfx/DrawCommands.hxx:58 + void gfx::GradientInfo::GradientInfo(enum gfx::GradientType) + enum gfx::GradientType eType + 0 +include/basegfx/polygon/b2dpolygon.hxx:84 + void basegfx::B2DPolygon::insert(unsigned int,const class basegfx::B2DPoint &,unsigned int) + unsigned int nCount + 1 +include/basegfx/polygon/b2dpolygontools.hxx:91 + _Bool isInside(const class basegfx::B2DPolygon &,const class basegfx::B2DPolygon &,_Bool) + _Bool bWithBorder + 1 +include/basegfx/polygon/b2dpolygontools.hxx:299 + class basegfx::B2DPolygon createPolygonFromEllipse(const class basegfx::B2DPoint &,double,double,unsigned int) + unsigned int nStartQuadrant + 0 +include/basegfx/polygon/b2dpolygontools.hxx:367 + enum basegfx::B2VectorOrientation getOrientationForIndex(const class basegfx::B2DPolygon &,unsigned int) + unsigned int nIndex + 0 +include/basegfx/polygon/b2dpolygontools.hxx:374 + _Bool isPointOnPolygon(const class basegfx::B2DPolygon &,const class basegfx::B2DPoint &,_Bool) + _Bool bWithPoints + 1 +include/basegfx/polygon/b2dpolygontools.hxx:377 + _Bool isPointInTriangle(const class basegfx::B2DPoint &,const class basegfx::B2DPoint &,const class basegfx::B2DPoint &,const class basegfx::B2DPoint &,_Bool) + _Bool bWithBorder + 1 +include/basegfx/polygon/b2dpolypolygon.hxx:76 + void basegfx::B2DPolyPolygon::insert(unsigned int,const class basegfx::B2DPolygon &,unsigned int) + unsigned int nIndex + 0 +include/basegfx/polygon/b2dpolypolygon.hxx:76 + void basegfx::B2DPolyPolygon::insert(unsigned int,const class basegfx::B2DPolygon &,unsigned int) + unsigned int nCount + 1 +include/basegfx/polygon/b2dpolypolygon.hxx:77 + void basegfx::B2DPolyPolygon::append(const class basegfx::B2DPolygon &,unsigned int) + unsigned int nCount + 1 +include/basegfx/polygon/b2dpolypolygon.hxx:102 + void basegfx::B2DPolyPolygon::remove(unsigned int,unsigned int) + unsigned int nCount + 1 +include/basegfx/polygon/b2dpolypolygon.hxx:137 + shared_ptr basegfx::B2DPolyPolygon::addOrReplaceSystemDependentData(class basegfx::SystemDependentDataManager &,type-parameter-?-? &&...) const + ###3 + 0 +include/basegfx/polygon/b2dpolypolygon.hxx:137 + shared_ptr basegfx::B2DPolyPolygon::addOrReplaceSystemDependentData(class basegfx::SystemDependentDataManager &,type-parameter-?-? &&...) const + ###4 + 0 +include/basegfx/polygon/b2dpolypolygon.hxx:137 + shared_ptr basegfx::B2DPolyPolygon::addOrReplaceSystemDependentData(class basegfx::SystemDependentDataManager &,type-parameter-?-? &&...) const + ###5 + 0 +include/basegfx/polygon/b3dpolygon.hxx:71 + void basegfx::B3DPolygon::append(const class basegfx::B3DPoint &,unsigned int) + unsigned int nCount + 1 +include/basegfx/polygon/b3dpolygon.hxx:95 + void basegfx::B3DPolygon::append(const class basegfx::B3DPolygon &,unsigned int,unsigned int) + unsigned int nIndex + 0 +include/basegfx/polygon/b3dpolygon.hxx:95 + void basegfx::B3DPolygon::append(const class basegfx::B3DPolygon &,unsigned int,unsigned int) + unsigned int nCount + 0 +include/basegfx/polygon/b3dpolygon.hxx:98 + void basegfx::B3DPolygon::remove(unsigned int,unsigned int) + unsigned int nCount + 1 +include/basegfx/polygon/b3dpolygontools.hxx:100 + _Bool isInside(const class basegfx::B3DPolygon &,const class basegfx::B3DPoint &,_Bool) + _Bool bWithBorder + 0 +include/basegfx/polygon/b3dpolygontools.hxx:103 + _Bool isPointOnLine(const class basegfx::B3DPoint &,const class basegfx::B3DPoint &,const class basegfx::B3DPoint &,_Bool) + _Bool bWithPoints + 1 +include/basegfx/polygon/b3dpolypolygon.hxx:82 + void basegfx::B3DPolyPolygon::append(const class basegfx::B3DPolygon &,unsigned int) + unsigned int nCount + 1 +include/basegfx/range/b2ibox.hxx:71 + void basegfx::B2IBox::B2IBox(int,int,int,int) + int x1 + 0 +include/basegfx/range/b2ibox.hxx:71 + void basegfx::B2IBox::B2IBox(int,int,int,int) + int y1 + 0 +include/basegfx/utils/tools.hxx:118 + class basegfx::B2DPolyPolygon number2PolyPolygon(double,int,int,_Bool) + _Bool bLitSegments + 1 +include/basic/basmgr.hxx:138 + void BasicManager::BasicManager(class SotStorage &,const class rtl::OUString &,class StarBASIC *,const class rtl::OUString *,_Bool) + _Bool bDocMgr + 1 +include/basic/basrdll.hxx:37 + void BasicDLL::EnableBreak(_Bool) + _Bool bEnable + 1 +include/basic/sbstar.hxx:146 + class SbxVariable * StarBASIC::VBAFind(const class rtl::OUString &,enum SbxClassType) + enum SbxClassType t + 1 +include/basic/sbxobj.hxx:61 + class SbxVariable * SbxObject::FindQualified(const class rtl::OUString &,enum SbxClassType) + enum SbxClassType + 1 +include/basic/sbxobj.hxx:72 + void SbxObject::Remove(const class rtl::OUString &,enum SbxClassType) + enum SbxClassType + 1 +include/comphelper/configurationhelper.hxx:211 + class com::sun::star::uno::Any comphelper::ConfigurationHelper::readDirectKey(const class com::sun::star::uno::Reference &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,enum comphelper::EConfigurationModes) + enum comphelper::EConfigurationModes eMode + 1 +include/comphelper/configurationhelper.hxx:227 + void comphelper::ConfigurationHelper::writeDirectKey(const class com::sun::star::uno::Reference &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class com::sun::star::uno::Any &,enum comphelper::EConfigurationModes) + enum comphelper::EConfigurationModes eMode + 0 +include/comphelper/lok.hxx:47 + void setLocalRendering(_Bool) + _Bool bLocalRendering + 1 +include/comphelper/lok.hxx:72 + void setRangeHeaders(_Bool) + _Bool bTiledAnnotations + 1 +include/comphelper/parallelsort.hxx:285 + void s3sort(const type-parameter-?-?,const type-parameter-?-?,type-parameter-?-?,_Bool) + _Bool bThreaded + 1 +include/comphelper/profilezone.hxx:62 + void comphelper::ProfileZone::ProfileZone(const char *,_Bool) + _Bool bConsole + 0 +include/comphelper/property.hxx:52 + void ModifyPropertyAttributes(class com::sun::star::uno::Sequence &,const class rtl::OUString &,short,short) + short _nAddAttrib + 0 +include/comphelper/storagehelper.hxx:187 + class com::sun::star::uno::Reference comphelper::OStorageHelper::GetStorageAtPath(const class com::sun::star::uno::Reference &,const class rtl::OUString &,unsigned int,const class comphelper::LifecycleProxy &) + unsigned int nOpenMode + 1 +include/comphelper/unique_disposing_ptr.hxx:164 + void comphelper::unique_disposing_solar_mutex_reset_ptr::unique_disposing_solar_mutex_reset_ptr(const class com::sun::star::uno::Reference &,type-parameter-?-? *,_Bool) + _Bool bComponent + 1 +include/comphelper/unique_disposing_ptr.hxx:169 + void comphelper::unique_disposing_solar_mutex_reset_ptr::reset(type-parameter-?-? *) + type-parameter-?-? * p + 0 +include/connectivity/dbexception.hxx:312 + void throwSQLException(const class rtl::OUString &,enum dbtools::StandardSQLState,const class com::sun::star::uno::Reference &,const int) + const int _nErrorCode + 0 +include/connectivity/dbtools.hxx:331 + _Bool isDataSourcePropertyEnabled(const class com::sun::star::uno::Reference &,const class rtl::OUString &,_Bool) + _Bool _bDefault + 1 +include/connectivity/dbtools.hxx:623 + class rtl::OUString createStandardCreateStatement(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,class dbtools::ISQLStatementHelper *,class std::basic_string_view >) + class dbtools::ISQLStatementHelper * _pHelper + 0 +include/connectivity/sqlscan.hxx:49 + void connectivity::OSQLScanner::prepareScan(const class rtl::OUString &,const class connectivity::IParseContext *,_Bool) + _Bool bInternational + 1 +include/cppcanvas/color.hxx:61 + int makeColorARGB(unsigned char,unsigned char,unsigned char,unsigned char) + unsigned char nAlpha + 0 +include/cui/cuicharmap.hxx:147 + void SvxCharacterMap::SvxCharacterMap(class weld::Widget *,const class SfxItemSet *,const class com::sun::star::uno::Reference &) + const class SfxItemSet * pSet + 0 +include/drawinglayer/processor2d/hittestprocessor2d.hxx:78 + void drawinglayer::processor2d::HitTestProcessor2D::collectHitStack(_Bool) + _Bool bCollect + 1 +include/drawinglayer/XShapeDumper.hxx:23 + class rtl::OUString XShapeDumper::dump(const class com::sun::star::uno::Reference &,_Bool) + _Bool bDumpInteropProperties + 0 +include/drawinglayer/XShapeDumper.hxx:24 + class rtl::OUString XShapeDumper::dump(const class com::sun::star::uno::Reference &,_Bool) + _Bool bDumpInteropProperties + 0 +include/editeng/borderline.hxx:169 + class Color editeng::SvxBorderLine::GetColorOut(_Bool) const + _Bool bLeftOrTop + 1 +include/editeng/borderline.hxx:170 + class Color editeng::SvxBorderLine::GetColorIn(_Bool) const + _Bool bLeftOrTop + 1 +include/editeng/boxitem.hxx:114 + _Bool SvxBoxItem::HasBorder(_Bool) const + _Bool bTreatPaddingAsBorder + 1 +include/editeng/editeng.hxx:548 + void EditEngine::dumpAsXmlEditDoc(struct _xmlTextWriter *) const + struct _xmlTextWriter * pWriter + 0 +include/editeng/editeng.hxx:573 + class EditPaM EditEngine::CursorLeft(const class EditPaM &,unsigned short) + unsigned short nCharacterIteratorMode + 0 +include/editeng/editobj.hxx:120 + const class SvxFieldData * EditTextObject::GetFieldData(int,unsigned long,int) const + int nPara + 0 +include/editeng/editobj.hxx:120 + const class SvxFieldData * EditTextObject::GetFieldData(int,unsigned long,int) const + unsigned long nPos + 0 +include/editeng/editobj.hxx:120 + const class SvxFieldData * EditTextObject::GetFieldData(int,unsigned long,int) const + int nType + 1 +include/editeng/edtdlg.hxx:79 + enum editeng::HangulHanjaConversion::ConversionDirection AbstractHangulHanjaConversionDialog::GetDirection(enum editeng::HangulHanjaConversion::ConversionDirection) const + enum editeng::HangulHanjaConversion::ConversionDirection _eDefaultDirection + 0 +include/editeng/outliner.hxx:241 + void OutlinerView::SelectRange(int,int) + int nFirst + 0 +include/editeng/outliner.hxx:625 + _Bool Outliner::ImpCanDeleteSelectedPages(class OutlinerView *,int,int) + int nPages + 1 +include/editeng/pmdlitem.hxx:40 + void SvxPageModelItem::SvxPageModelItem(unsigned short) + unsigned short nWh + 0 +include/editeng/splwrap.hxx:73 + void SvxSpellWrapper::SvxSpellWrapper(class weld::Widget *,const _Bool,const _Bool) + const _Bool bIsAllRight + 0 +include/editeng/txtrange.hxx:61 + void TextRanger::TextRanger(const class basegfx::B2DPolyPolygon &,const class basegfx::B2DPolyPolygon *,unsigned short,unsigned short,unsigned short,_Bool,_Bool,_Bool) + _Bool bInner + 1 +include/editeng/txtrange.hxx:61 + void TextRanger::TextRanger(const class basegfx::B2DPolyPolygon &,const class basegfx::B2DPolyPolygon *,unsigned short,unsigned short,unsigned short,_Bool,_Bool,_Bool) + _Bool bVert + 0 +include/filter/msfilter/escherex.hxx:493 + void EscherExAtom::EscherExAtom(class SvStream &,const unsigned short,const unsigned short,const unsigned char) + const unsigned char nVersion + 0 +include/filter/msfilter/escherex.hxx:585 + void EscherGraphicProvider::WriteBlibStoreEntry(class SvStream &,unsigned int,unsigned int) + unsigned int nBlipId + 1 +include/filter/msfilter/escherex.hxx:795 + void EscherPropertyContainer::CreateFillProperties(const class com::sun::star::uno::Reference &,_Bool,const class com::sun::star::uno::Reference &) + _Bool bEdge + 1 +include/filter/msfilter/escherex.hxx:1139 + void EscherEx::EndAtom(unsigned short,int,int) + int nRecVersion + 0 +include/filter/msfilter/msdffimp.hxx:711 + void SvxMSDffManager::ExchangeInShapeOrder(const class SdrObject *,unsigned long,class SdrObject *) const + unsigned long nTxBx + 0 +include/filter/msfilter/msdffimp.hxx:764 + void SvxMSDffShapeInfo::SvxMSDffShapeInfo(unsigned long,unsigned int,unsigned short,unsigned short) + unsigned int nId + 0 +include/filter/msfilter/msdffimp.hxx:764 + void SvxMSDffShapeInfo::SvxMSDffShapeInfo(unsigned long,unsigned int,unsigned short,unsigned short) + unsigned short nSeqId + 0 +include/filter/msfilter/msdffimp.hxx:764 + void SvxMSDffShapeInfo::SvxMSDffShapeInfo(unsigned long,unsigned int,unsigned short,unsigned short) + unsigned short nBoxId + 0 +include/formula/FormulaCompiler.hxx:325 + void formula::FormulaCompiler::PushTokenArray(class formula::FormulaTokenArray *,_Bool) + _Bool + 1 +include/formula/token.hxx:234 + void formula::FormulaByteToken::FormulaByteToken(enum OpCode,unsigned char,enum formula::StackVar,enum formula::ParamClass) + enum formula::ParamClass c + 0 +include/formula/tokenarray.hxx:168 + void formula::FormulaTokenArrayReferencesIterator::FormulaTokenArrayReferencesIterator(const class formula::FormulaTokenArrayStandardRange &,enum formula::FormulaTokenArrayReferencesIterator::Dummy) + enum formula::FormulaTokenArrayReferencesIterator::Dummy + 0 +include/formula/vectortoken.hxx:50 + void formula::VectorRefArray::VectorRefArray(enum formula::VectorRefArray::InitInvalid) + enum formula::VectorRefArray::InitInvalid + 0 +include/i18nutil/widthfolding.hxx:48 + class rtl::OUString i18nutil::widthfolding::compose_ja_voiced_sound_marks(const class rtl::OUString &,int,int,class com::sun::star::uno::Sequence &,_Bool,int) + int startPos + 0 +include/linguistic/misc.hxx:131 + _Bool IsUpper(const class rtl::OUString &,int,int,struct o3tl::strong_int) + int nPos + 0 +include/o3tl/strong_int.hxx:86 + void o3tl::strong_int::strong_int(type-parameter-?-?,typename enable_if::value, int>::type) + typename enable_if::value, int>::type + 0 +include/o3tl/strong_int.hxx:110 + strong_int o3tl::strong_int::operator++(int) + ###1 + 0 +include/o3tl/unit_conversion.hxx:205 + auto convert(type-parameter-?-?,type-parameter-?-?,type-parameter-?-?,_Bool &,long) + long nDefault + 0 +include/o3tl/unit_conversion.hxx:213 + auto convertSaturate(type-parameter-?-?,type-parameter-?-?,type-parameter-?-?) + type-parameter-?-? from + 0 +include/oox/drawingml/shape.hxx:108 + void oox::drawingml::Shape::Shape(const char *,_Bool) + _Bool bDefaultHeight + 1 +include/oox/export/vmlexport.hxx:152 + const class rtl::OString & oox::vml::VMLExport::AddInlineSdrObject(const class SdrObject &,const _Bool) + const _Bool bOOxmlExport + 1 +include/oox/helper/attributelist.hxx:162 + long oox::AttributeList::getHyper(int,long) const + long nDefault + 0 +include/oox/helper/containerhelper.hxx:98 + void oox::Matrix::Matrix(typename vector >::size_type,typename vector >::size_type) + typename vector >::size_type nHeight + 1 +include/oox/helper/containerhelper.hxx:114 + typename vector >::const_reference oox::Matrix::operator()(typename vector >::size_type,typename vector >::size_type) const + typename vector >::size_type nY + 0 +include/oox/helper/helper.hxx:115 + type-parameter-?-? getIntervalValue(type-parameter-?-?,type-parameter-?-?,type-parameter-?-?) + type-parameter-?-? nBegin + 0 +include/oox/mathml/importutils.hxx:212 + void oox::formulaimport::XmlStream::skipElementInternal(int,_Bool) + _Bool silent + 0 +include/oox/ole/olestorage.hxx:46 + void oox::ole::OleStorage::OleStorage(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,_Bool) + _Bool bBaseStreamAccess + 0 +include/oox/ole/olestorage.hxx:59 + void oox::ole::OleStorage::OleStorage(const class oox::ole::OleStorage &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,_Bool) + _Bool bReadOnly + 1 +include/oox/ole/vbacontrol.hxx:189 + void oox::ole::VbaUserForm::VbaUserForm(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class oox::GraphicHelper &,_Bool) + _Bool bDefaultColorBgr + 1 +include/oox/ole/vbaexport.hxx:90 + void VBACompressionChunk::SetFlagBit(unsigned long,_Bool,unsigned char &) + _Bool bVal + 1 +include/oox/vml/vmldrawing.hxx:69 + void oox::vml::OleObjectInfo::OleObjectInfo(_Bool) + _Bool bDmlShape + 0 +include/oox/vml/vmldrawing.hxx:96 + void oox::vml::Drawing::Drawing(class oox::core::XmlFilterBase &,const class com::sun::star::uno::Reference &,enum oox::vml::DrawingType) + enum oox::vml::DrawingType eType + 1 +include/oox/vml/vmlformatting.hxx:126 + int decodeMeasureToHmm(const class oox::GraphicHelper &,const class rtl::OUString &,int,_Bool,_Bool) + int nRefValue + 0 +include/opencl/openclwrapper.hxx:61 + _Bool buildProgramFromBinary(const char *,struct openclwrapper::GPUEnv *,const char *,int) + int idx + 0 +include/opencl/openclwrapper.hxx:86 + void setOpenCLCmdQueuePosition(int) + int nPos + 0 +include/package/Deflater.hxx:42 + int ZipUtils::Deflater::doDeflateBytes(class com::sun::star::uno::Sequence &,int,int) + int nNewOffset + 0 +include/sax/tools/converter.hxx:266 + _Bool sax::Converter::parseDateOrDateTime(struct com::sun::star::util::Date *,struct com::sun::star::util::DateTime &,_Bool &,class std::optional *,class std::basic_string_view >) + struct com::sun::star::util::Date * pDate + 0 +include/sax/tools/converter.hxx:266 + _Bool sax::Converter::parseDateOrDateTime(struct com::sun::star::util::Date *,struct com::sun::star::util::DateTime &,_Bool &,class std::optional *,class std::basic_string_view >) + class std::optional * pTimeZoneOffset + 0 +include/sax/tools/converter.hxx:280 + short sax::Converter::GetUnitFromString(class std::basic_string_view >,short) + short nDefaultUnit + 0 +include/sfx2/app.hxx:107 + void SfxApplication::RegisterInterface(const class SfxModule *) + const class SfxModule * pMod + 0 +include/sfx2/dispatch.hxx:151 + enum ToolbarId SfxDispatcher::GetObjectBarId(unsigned short) const + unsigned short nPos + 1 +include/sfx2/docfile.hxx:167 + void SfxMedium::DisableFileSync(_Bool) + _Bool bDisableFileSync + 1 +include/sfx2/event.hxx:239 + void SfxPrintingHint::SfxPrintingHint(enum com::sun::star::view::PrintableState,const class com::sun::star::uno::Sequence &,class SfxObjectShell *,const class com::sun::star::uno::Reference &) + enum com::sun::star::view::PrintableState nState + 0 +include/sfx2/fcontnr.hxx:109 + void SfxFilterMatcherIter::SfxFilterMatcherIter(const class SfxFilterMatcher &,enum SfxFilterFlags,enum SfxFilterFlags) + enum SfxFilterFlags nMask + 0 +include/sfx2/filedlghelper.hxx:96 + void sfx2::FileDialogHelper::FileDialogHelper(short,enum FileDialogFlags,const class rtl::OUString &,enum SfxFilterFlags,enum SfxFilterFlags,class weld::Window *) + enum SfxFilterFlags nDont + 0 +include/sfx2/lokhelper.hxx:106 + void SfxLokHelper::notifyDocumentSizeChangedAllViews(class vcl::ITiledRenderable *,_Bool) + _Bool bInvalidateAll + 1 +include/sfx2/module.hxx:61 + void SfxModule::RegisterInterface(const class SfxModule *) + const class SfxModule * pMod + 0 +include/sfx2/notebookbar/SfxNotebookBar.hxx:68 + void sfx2::SfxNotebookBar::ShowMenubar(const class SfxViewFrame *,_Bool) + _Bool bShow + 1 +include/sfx2/objsh.hxx:224 + void SfxObjectShell::RegisterInterface(const class SfxModule *) + const class SfxModule * pMod + 0 +include/sfx2/objsh.hxx:675 + void SfxObjectShell::AppendInfoBarWhenReady(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,enum InfobarType,_Bool) + _Bool bShowCloseButton + 1 +include/sfx2/opengrf.hxx:44 + void SvxOpenGraphicDialog::SetPath(const class rtl::OUString &,_Bool) + _Bool bLinkState + 1 +include/sfx2/opengrf.hxx:49 + void SvxOpenGraphicDialog::EnableLink(_Bool) + _Bool + 0 +include/sfx2/passwd.hxx:125 + void SfxPasswordDialog::ShowMinLengthText(_Bool) + _Bool bShow + 0 +include/sfx2/request.hxx:61 + void SfxRequest::SfxRequest(const class SfxSlot *,const class com::sun::star::uno::Sequence &,enum SfxCallMode,class SfxItemPool &) + enum SfxCallMode nCallMode + 1 +include/sfx2/request.hxx:64 + void SfxRequest::SfxRequest(unsigned short,enum SfxCallMode,const class SfxAllItemSet &,const class SfxAllItemSet &) + enum SfxCallMode nCallMode + 1 +include/sfx2/request.hxx:99 + void SfxRequest::AllowRecording(_Bool) + _Bool + 1 +include/sfx2/sfxdlg.hxx:133 + class VclPtr SfxAbstractDialogFactory::CreateEditObjectDialog(class weld::Window *,const class rtl::OUString &,const class com::sun::star::uno::Reference &) + class weld::Window * pParent + 0 +include/sfx2/sfxdlg.hxx:142 + void SfxAbstractDialogFactory::ShowAsyncScriptErrorDialog(class weld::Window *,const class com::sun::star::uno::Any &) + class weld::Window * pParent + 0 +include/sfx2/sidebar/FocusManager.hxx:110 + _Bool sfx2::sidebar::FocusManager::IsPanelTitleVisible(const int) const + const int nPanelIndex + 0 +include/sfx2/thumbnailview.hxx:228 + void ThumbnailView::ShowTooltips(_Bool) + _Bool bShowTooltips + 1 +include/sfx2/thumbnailview.hxx:230 + void ThumbnailView::DrawMnemonics(_Bool) + _Bool bDrawMnemonics + 1 +include/sfx2/viewfrm.hxx:77 + void SfxViewFrame::RegisterInterface(const class SfxModule *) + const class SfxModule * pMod + 0 +include/sfx2/viewsh.hxx:194 + void SfxViewShell::RegisterInterface(const class SfxModule *) + const class SfxModule * pMod + 0 +include/sfx2/weldutils.hxx:52 + void ToolbarUnoDispatcher::ToolbarUnoDispatcher(class weld::Toolbar &,class weld::Builder &,const class com::sun::star::uno::Reference &,_Bool) + _Bool bSideBar + 1 +include/sot/stg.hxx:158 + void Storage::Storage(const class rtl::OUString &,enum StreamMode,_Bool) + _Bool bDirect + 1 +include/sot/stg.hxx:250 + void UCBStorage::UCBStorage(const class ucbhelper::Content &,const class rtl::OUString &,enum StreamMode,_Bool,_Bool) + enum StreamMode nMode + 1 +include/sot/stg.hxx:250 + void UCBStorage::UCBStorage(const class ucbhelper::Content &,const class rtl::OUString &,enum StreamMode,_Bool,_Bool) + _Bool bDirect + 0 +include/sot/stg.hxx:250 + void UCBStorage::UCBStorage(const class ucbhelper::Content &,const class rtl::OUString &,enum StreamMode,_Bool,_Bool) + _Bool bIsRoot + 1 +include/sot/stg.hxx:256 + void UCBStorage::UCBStorage(const class rtl::OUString &,enum StreamMode,_Bool,_Bool) + _Bool bDirect + 1 +include/sot/stg.hxx:256 + void UCBStorage::UCBStorage(const class rtl::OUString &,enum StreamMode,_Bool,_Bool) + _Bool bIsRoot + 1 +include/sot/stg.hxx:261 + void UCBStorage::UCBStorage(const class rtl::OUString &,enum StreamMode,_Bool,_Bool,_Bool,const class com::sun::star::uno::Reference &) + _Bool bIsRoot + 0 +include/sot/stg.hxx:271 + void UCBStorage::UCBStorage(class SvStream &,_Bool) + _Bool bDirect + 0 +include/store/store.hxx:103 + storeError store::OStoreStream::writeAt(unsigned int,const void *,unsigned int,unsigned int &) + unsigned int nOffset + 0 +include/svl/adrparse.hxx:42 + const class rtl::OUString & SvAddressParser::GetEmailAddress(int) const + int nIndex + 0 +include/svl/gridprinter.hxx:29 + void svl::GridPrinter::GridPrinter(unsigned long,unsigned long,_Bool) + _Bool bPrint + 0 +include/svl/itempool.hxx:151 + const type-parameter-?-? & SfxItemPool::Put(unique_ptr >,unsigned short) + unsigned short nWhich + 0 +include/svl/itemset.hxx:172 + const type-parameter-?-? * SfxItemSet::GetItem(const class SfxItemSet *,TypedWhichId,_Bool) + _Bool bSearchInParent + 0 +include/svl/svdde.hxx:131 + void DdeLink::DdeLink(class DdeConnection &,const class rtl::OUString &,long) + long + 0 +include/svl/urihelper.hxx:51 + class rtl::OUString SmartRel2Abs(const class INetURLObject &,const class rtl::OUString &,const class Link &,_Bool,_Bool,enum INetURLObject::EncodeMechanism,enum INetURLObject::DecodeMechanism,unsigned short,enum FSysStyle) + enum INetURLObject::EncodeMechanism eEncodeMechanism + 1 +include/svl/urihelper.hxx:116 + class rtl::OUString FindFirstURLInText(const class rtl::OUString &,int &,int &,const class CharClass &,enum INetURLObject::EncodeMechanism,unsigned short) + enum INetURLObject::EncodeMechanism eMechanism + 1 +include/svl/urihelper.hxx:148 + class rtl::OUString removePassword(const class rtl::OUString &,enum INetURLObject::EncodeMechanism,enum INetURLObject::DecodeMechanism,unsigned short) + enum INetURLObject::EncodeMechanism eEncodeMechanism + 1 +include/svl/zforlist.hxx:906 + const class NfKeywordTable & SvNumberFormatter::GetKeywords(unsigned int) + unsigned int nKey + 0 +include/svl/zformat.hxx:300 + class rtl::OUString SvNumberformat::GetPercentString(unsigned short) const + unsigned short nNumFor + 0 +include/svl/zformat.hxx:411 + int SvNumberformat::GetQuoteEnd(const class rtl::OUString &,int,char16_t,char16_t) + char16_t cEscIn + 0 +include/svl/zformat.hxx:421 + int SvNumberformat::InsertBlanks(class rtl::OUString &,int,char16_t) + int nPos + 0 +include/svl/zformat.hxx:487 + _Bool SvNumberformat::IsIso8601(unsigned short) const + unsigned short nNumFor + 0 +include/svtools/HtmlWriter.hxx:37 + void HtmlWriter::prettyPrint(_Bool) + _Bool b + 0 +include/svtools/inettbc.hxx:80 + void SvtURLBox::select_entry_region(int,int) + int nStartPos + 0 +include/svtools/ruler.hxx:731 + void Ruler::SetWinPos(long,long) + long nWidth + 0 +include/svtools/stringtransfer.hxx:61 + void svt::OStringTransfer::StartStringDrag(const class rtl::OUString &,class vcl::Window *,signed char) + signed char _nDragSourceActions + 1 +include/svtools/valueset.hxx:320 + void ValueSet::EnableFullItemMode(_Bool) + _Bool bFullMode + 0 +include/svtools/valueset.hxx:358 + void ValueSet::SetItemColor(unsigned short,const class Color &) + unsigned short nItemId + 1 +include/svx/algitem.hxx:36 + void SvxOrientationItem::SvxOrientationItem(const enum SvxCellOrientation,const unsigned short) + const unsigned short nId + 0 +include/svx/algitem.hxx:40 + void SvxOrientationItem::SvxOrientationItem(struct o3tl::strong_int,_Bool,const unsigned short) + const unsigned short nId + 0 +include/svx/ctredlin.hxx:219 + void SvxTPFilter::SelectedAuthorPos(int) + int nPos + 0 +include/svx/ctredlin.hxx:242 + void SvxTPFilter::CheckAction(_Bool) + _Bool bFlag + 0 +include/svx/dlgctrl.hxx:137 + void SvxRectCtl::DoCompletelyDisable(_Bool) + _Bool bNew + 1 +include/svx/extrusionbar.hxx:39 + void svx::ExtrusionBar::RegisterInterface(const class SfxModule *) + const class SfxModule * pMod + 0 +include/svx/fmshell.hxx:93 + void FmFormShell::RegisterInterface(const class SfxModule *) + const class SfxModule * pMod + 0 +include/svx/fmtools.hxx:76 + void CursorWrapper::CursorWrapper(const class com::sun::star::uno::Reference &,_Bool) + _Bool bUseCloned + 0 +include/svx/fmtools.hxx:141 + void FmXDisposeListener::disposing(short) + short _nId + 0 +include/svx/fmview.hxx:88 + void FmFormView::createControlLabelPair(const class OutputDevice *,int,int,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,enum SdrObjKind,enum SdrInventor,enum SdrObjKind,class SdrModel &,class std::unique_ptr &,class std::unique_ptr &) + int _nYOffsetMM + 0 +include/svx/fontworkbar.hxx:41 + void svx::FontworkBar::RegisterInterface(const class SfxModule *) + const class SfxModule * pMod + 0 +include/svx/framelink.hxx:117 + void svx::frame::Style::Style(double,double,double,enum SvxBorderLineStyle,double) + double nD + 0 +include/svx/framelink.hxx:117 + void svx::frame::Style::Style(double,double,double,enum SvxBorderLineStyle,double) + double nS + 0 +include/svx/framelink.hxx:117 + void svx::frame::Style::Style(double,double,double,enum SvxBorderLineStyle,double) + enum SvxBorderLineStyle nType + 0 +include/svx/frmsel.hxx:144 + void svx::FrameSelector::SelectAllBorders(_Bool) + _Bool bSelect + 0 +include/svx/gridctrl.hxx:395 + void DbGridControl::RemoveRows(_Bool) + _Bool bNewCursor + 0 +include/svx/IAccessibleParent.hxx:81 + _Bool accessibility::IAccessibleParent::ReplaceChild(class accessibility::AccessibleShape *,const class com::sun::star::uno::Reference &,const long,const class accessibility::AccessibleShapeTreeInfo &) + const long _nIndex + 0 +include/svx/nbdtmg.hxx:130 + unsigned short svx::sidebar::NBOTypeMgrBase::GetNBOIndexForNumRule(class SvxNumRule &,unsigned short,unsigned short) + unsigned short nFromIndex + 0 +include/svx/nbdtmg.hxx:131 + void svx::sidebar::NBOTypeMgrBase::ReplaceNumRule(class SvxNumRule &,unsigned short,unsigned short) + unsigned short mLevel + 1 +include/svx/nbdtmg.hxx:133 + class rtl::OUString svx::sidebar::NBOTypeMgrBase::GetDescription(unsigned short,_Bool) + _Bool isDefault + 1 +include/svx/postattr.hxx:33 + void SvxPostItAuthorItem::SvxPostItAuthorItem(unsigned short) + unsigned short nWhich + 0 +include/svx/postattr.hxx:53 + void SvxPostItDateItem::SvxPostItDateItem(unsigned short) + unsigned short nWhich + 0 +include/svx/postattr.hxx:72 + void SvxPostItTextItem::SvxPostItTextItem(unsigned short) + unsigned short nWhich + 0 +include/svx/postattr.hxx:93 + void SvxPostItIdItem::SvxPostItIdItem(unsigned short) + unsigned short nWhich + 0 +include/svx/relfld.hxx:43 + void SvxRelativeField::EnableRelativeMode(unsigned short,unsigned short) + unsigned short nMin + 0 +include/svx/relfld.hxx:51 + int SvxRelativeField::get_min(enum FieldUnit) const + enum FieldUnit eValueUnit + 0 +include/svx/relfld.hxx:64 + void SvxRelativeField::SetFieldUnit(enum FieldUnit,_Bool) + _Bool bAll + 0 +include/svx/rulritem.hxx:123 + void SvxColumnDescription::SvxColumnDescription(long,long,_Bool) + _Bool bVis + 1 +include/svx/sdr/overlay/overlayobject.hxx:120 + void sdr::overlay::OverlayObject::allowAntiAliase(_Bool) + _Bool bNew + 0 +include/svx/sdr/primitive2d/sdrframeborderprimitive2d.hxx:104 + void drawinglayer::primitive2d::SdrFrameBorderPrimitive2D::SdrFrameBorderPrimitive2D(class std::shared_ptr > > &,_Bool) + _Bool bForceToSingleDiscreteUnit + 1 +include/svx/svdhlpln.hxx:43 + void SdrHelpLine::SdrHelpLine(enum SdrHelpLineKind) + enum SdrHelpLineKind eNewKind + 0 +include/svx/svditer.hxx:51 + void SdrObjListIter::SdrObjListIter(const class SdrObjList *,_Bool,enum SdrIterMode,_Bool) + enum SdrIterMode eMode + 0 +include/svx/svditer.hxx:51 + void SdrObjListIter::SdrObjListIter(const class SdrObjList *,_Bool,enum SdrIterMode,_Bool) + _Bool bReverse + 0 +include/svx/svditer.hxx:55 + void SdrObjListIter::SdrObjListIter(const class SdrObject &,enum SdrIterMode,_Bool) + _Bool bReverse + 0 +include/svx/svdundo.hxx:101 + class SdrUndoAction * SdrUndoGroup::GetAction(int) const + int nNum + 0 +include/svx/svdview.hxx:178 + void SdrView::EnableExtendedKeyInputDispatcher(_Bool) + _Bool bOn + 0 +include/svx/svx3ditems.hxx:66 + void Svx3DReducedLineGeometryItem::Svx3DReducedLineGeometryItem(_Bool) + _Bool bVal + 0 +include/svx/svxdlg.hxx:82 + void AbstractSvxZoomDialog::HideButton(enum ZoomButtonId) + enum ZoomButtonId nBtnId + 1 +include/svx/SvxPresetListBox.hxx:57 + void SvxPresetListBox::FillPresetListBox(class XGradientList &,unsigned int) + unsigned int nStartIndex + 1 +include/svx/SvxPresetListBox.hxx:58 + void SvxPresetListBox::FillPresetListBox(class XHatchList &,unsigned int) + unsigned int nStartIndex + 1 +include/svx/SvxPresetListBox.hxx:59 + void SvxPresetListBox::FillPresetListBox(class XBitmapList &,unsigned int) + unsigned int nStartIndex + 1 +include/svx/SvxPresetListBox.hxx:60 + void SvxPresetListBox::FillPresetListBox(class XPatternList &,unsigned int) + unsigned int nStartIndex + 1 +include/svx/sxenditm.hxx:60 + void SdrEdgeNode1GlueDistItem::SdrEdgeNode1GlueDistItem(long) + long nVal + 0 +include/svx/sxenditm.hxx:66 + void SdrEdgeNode2GlueDistItem::SdrEdgeNode2GlueDistItem(long) + long nVal + 0 +include/svx/sxmtfitm.hxx:32 + void SdrMeasureTextIsFixedAngleItem::SdrMeasureTextIsFixedAngleItem(_Bool) + _Bool bOn + 0 +include/svx/sxmtritm.hxx:42 + void SdrMeasureTextUpsideDownItem::SdrMeasureTextUpsideDownItem(_Bool) + _Bool bOn + 0 +include/svx/unopool.hxx:44 + void SvxUnoDrawPool::SvxUnoDrawPool(class SdrModel *,int) + int nServiceId + 1 +include/svx/unoshtxt.hxx:54 + void SvxTextEditSource::SvxTextEditSource(class SdrObject &,class SdrText *,class SdrView &,const class OutputDevice &) + class SdrText * pText + 0 +include/svx/verttexttbxctrl.hxx:31 + void SvxVertCTLTextTbxCtrl_Base::ImplInheritanceHelper(const class com::sun::star::uno::Reference &,nullptr_t &&,class rtl::OUString &&) + nullptr_t && + 0 +include/svx/xflbmsli.hxx:29 + void XFillBmpSizeLogItem::XFillBmpSizeLogItem(_Bool) + _Bool bLog + 1 +include/svx/xflftrit.hxx:40 + void XFillFloatTransparenceItem::XFillFloatTransparenceItem(const class rtl::OUString &,const class XGradient &,_Bool) + _Bool bEnable + 1 +include/svx/xtable.hxx:217 + class rtl::Reference XPropertyList::CreatePropertyListFromURL(enum XPropertyListType,const class rtl::OUString &) + enum XPropertyListType t + 0 +include/test/sheet/xactivationbroadcaster.hxx:24 + class com::sun::star::uno::Reference apitest::XActivationBroadcaster::getXSpreadsheet(const short) + const short nNumber + 1 +include/test/sheet/xdocumentauditing.hxx:36 + _Bool apitest::XDocumentAuditing::hasRightAmountOfShapes(const class com::sun::star::uno::Reference &,int,int) + int nShapes + 1 +include/test/sheet/xnamedranges.hxx:39 + class com::sun::star::uno::Reference apitest::XNamedRanges::getXNamedRanges(int) + int nSheet + 1 +include/test/text/textcontent.hxx:25 + void apitest::TextContent::TextContent(const enum com::sun::star::text::TextContentAnchorType,const enum com::sun::star::text::TextContentAnchorType,const enum com::sun::star::text::WrapTextMode,const enum com::sun::star::text::WrapTextMode) + const enum com::sun::star::text::TextContentAnchorType aExpectedTCAT + 1 +include/test/text/textcontent.hxx:25 + void apitest::TextContent::TextContent(const enum com::sun::star::text::TextContentAnchorType,const enum com::sun::star::text::TextContentAnchorType,const enum com::sun::star::text::WrapTextMode,const enum com::sun::star::text::WrapTextMode) + const enum com::sun::star::text::TextContentAnchorType aNewTCAT + 1 +include/test/text/textcontent.hxx:25 + void apitest::TextContent::TextContent(const enum com::sun::star::text::TextContentAnchorType,const enum com::sun::star::text::TextContentAnchorType,const enum com::sun::star::text::WrapTextMode,const enum com::sun::star::text::WrapTextMode) + const enum com::sun::star::text::WrapTextMode aExpectedWTM + 0 +include/test/text/textcontent.hxx:25 + void apitest::TextContent::TextContent(const enum com::sun::star::text::TextContentAnchorType,const enum com::sun::star::text::TextContentAnchorType,const enum com::sun::star::text::WrapTextMode,const enum com::sun::star::text::WrapTextMode) + const enum com::sun::star::text::WrapTextMode aNewWTM + 0 +include/tools/color.hxx:87 + void Color::Color(enum ColorTransparencyTag,unsigned int) + enum ColorTransparencyTag + 0 +include/tools/color.hxx:97 + void Color::Color(enum ColorTransparencyTag,unsigned char,unsigned char,unsigned char,unsigned char) + enum ColorTransparencyTag + 0 +include/tools/color.hxx:101 + void Color::Color(enum ColorAlphaTag,unsigned char,unsigned char,unsigned char,unsigned char) + enum ColorAlphaTag + 0 +include/tools/date.hxx:71 + void Date::Date(enum Date::DateInitEmpty) + enum Date::DateInitEmpty + 0 +include/tools/date.hxx:72 + void Date::Date(enum Date::DateInitSystem) + enum Date::DateInitSystem + 0 +include/tools/datetime.hxx:42 + void DateTime::DateTime(enum DateTime::DateTimeInitEmpty) + enum DateTime::DateTimeInitEmpty + 0 +include/tools/datetime.hxx:43 + void DateTime::DateTime(enum DateTime::DateTimeInitSystem) + enum DateTime::DateTimeInitSystem + 0 +include/tools/fract.hxx:44 + void Fraction::Fraction(type-parameter-?-?,type-parameter-?-?,typename enable_if::value && std::is_integral::value, int>::type) + typename enable_if::value && std::is_integral::value, int>::type + 0 +include/tools/stream.hxx:670 + void SvMemoryStream::ObjectOwnsMemory(_Bool) + _Bool bOwn + 1 +include/tools/time.hxx:67 + void tools::Time::Time(enum tools::Time::TimeInitEmpty) + enum tools::Time::TimeInitEmpty + 0 +include/tools/time.hxx:69 + void tools::Time::Time(enum tools::Time::TimeInitSystem) + enum tools::Time::TimeInitSystem + 0 +include/tools/urlobj.hxx:344 + class rtl::OUString INetURLObject::GetAbsURL(const class rtl::OUString &,const class rtl::OUString &,enum INetURLObject::EncodeMechanism,enum INetURLObject::DecodeMechanism,unsigned short) + enum INetURLObject::EncodeMechanism eEncodeMechanism + 1 +include/tools/urlobj.hxx:344 + class rtl::OUString INetURLObject::GetAbsURL(const class rtl::OUString &,const class rtl::OUString &,enum INetURLObject::EncodeMechanism,enum INetURLObject::DecodeMechanism,unsigned short) + enum INetURLObject::DecodeMechanism eDecodeMechanism + 1 +include/tools/urlobj.hxx:351 + class rtl::OUString INetURLObject::GetRelURL(const class rtl::OUString &,const class rtl::OUString &,enum INetURLObject::EncodeMechanism,enum INetURLObject::DecodeMechanism,unsigned short,enum FSysStyle) + enum INetURLObject::EncodeMechanism eEncodeMechanism + 1 +include/tools/urlobj.hxx:826 + class rtl::OUString INetURLObject::encode(const class rtl::OUString &,enum INetURLObject::Part,enum INetURLObject::EncodeMechanism,unsigned short) + enum INetURLObject::EncodeMechanism eMechanism + 0 +include/unotools/calendarwrapper.hxx:61 + void CalendarWrapper::loadDefaultCalendar(const struct com::sun::star::lang::Locale &,_Bool) + _Bool bTimeZoneUTC + 1 +include/unotools/calendarwrapper.hxx:63 + void CalendarWrapper::loadCalendar(const class rtl::OUString &,const struct com::sun::star::lang::Locale &,_Bool) + _Bool bTimeZoneUTC + 1 +include/unotools/charclass.hxx:130 + class rtl::OUString CharClass::titlecase(const class rtl::OUString &,int,int) const + int nPos + 0 +include/unotools/charclass.hxx:173 + _Bool CharClass::isAlphaNumeric(const class rtl::OUString &,int) const + int nPos + 0 +include/unotools/cmdoptions.hxx:86 + _Bool SvtCommandOptions::HasEntries(enum SvtCommandOptions::CmdOption) const + enum SvtCommandOptions::CmdOption eOption + 0 +include/unotools/cmdoptions.hxx:96 + _Bool SvtCommandOptions::Lookup(enum SvtCommandOptions::CmdOption,const class rtl::OUString &) const + enum SvtCommandOptions::CmdOption eOption + 0 +include/unotools/confignode.hxx:254 + class utl::OConfigurationTreeRoot utl::OConfigurationTreeRoot::tryCreateWithComponentContext(const class com::sun::star::uno::Reference &,const class rtl::OUString &,int,enum utl::OConfigurationTreeRoot::CREATION_MODE) + enum utl::OConfigurationTreeRoot::CREATION_MODE _eMode + 1 +include/unotools/fontdefs.hxx:55 + void ConvertChar::RecodeString(class rtl::OUString &,int,int) const + int nIndex + 0 +include/unotools/historyoptions.hxx:93 + void SvtHistoryOptions::DeleteItem(enum EHistoryType,const class rtl::OUString &) + enum EHistoryType eHistory + 0 +include/unotools/localedatawrapper.hxx:305 + double LocaleDataWrapper::stringToDouble(const char16_t *,const char16_t *,_Bool,enum rtl_math_ConversionStatus *,const char16_t **) const + _Bool bUseGroupSep + 1 +include/unotools/mediadescriptor.hxx:258 + class com::sun::star::uno::Sequence utl::MediaDescriptor::requestAndVerifyDocPassword(class comphelper::IDocPasswordVerifier &,enum comphelper::DocPasswordRequestType,const class std::__debug::vector > *) + enum comphelper::DocPasswordRequestType eRequestType + 1 +include/unotools/nativenumberwrapper.hxx:46 + class rtl::OUString NativeNumberWrapper::getNativeNumberString(const class rtl::OUString &,const struct com::sun::star::lang::Locale &,short) const + short nNativeNumberMode + 0 +include/unotools/sharedunocomponent.hxx:162 + void utl::SharedUNOComponent::SharedUNOComponent(const class com::sun::star::uno::BaseReference &,enum com::sun::star::uno::UnoReference_QueryThrow) + enum com::sun::star::uno::UnoReference_QueryThrow _queryThrow + 0 +include/unotools/sharedunocomponent.hxx:179 + _Bool utl::SharedUNOComponent::set(const class com::sun::star::uno::BaseReference &,enum com::sun::star::uno::UnoReference_Query) + enum com::sun::star::uno::UnoReference_Query _query + 0 +include/unotools/sharedunocomponent.hxx:183 + void utl::SharedUNOComponent::set(const Reference &,enum com::sun::star::uno::UnoReference_SetThrow) + enum com::sun::star::uno::UnoReference_SetThrow _setThrow + 0 +include/unotools/sharedunocomponent.hxx:184 + void utl::SharedUNOComponent::set(const SharedUNOComponent &,enum com::sun::star::uno::UnoReference_SetThrow) + enum com::sun::star::uno::UnoReference_SetThrow _setThrow + 0 +include/unotools/transliterationwrapper.hxx:82 + class rtl::OUString utl::TransliterationWrapper::transliterate(const class rtl::OUString &,int,int) const + int nStart + 0 +include/unotools/transliterationwrapper.hxx:98 + _Bool utl::TransliterationWrapper::equals(const class rtl::OUString &,int,int,int &,const class rtl::OUString &,int,int,int &) const + int nPos1 + 0 +include/unotools/transliterationwrapper.hxx:98 + _Bool utl::TransliterationWrapper::equals(const class rtl::OUString &,int,int,int &,const class rtl::OUString &,int,int,int &) const + int nPos2 + 0 +include/vbahelper/vbaeventshelperbase.hxx:90 + void VbaEventsHelperBase::checkArgumentType(const class com::sun::star::uno::Sequence &,int) + int nIndex + 0 +include/vbahelper/vbahelper.hxx:119 + class rtl::OUString extractStringFromAny(const class com::sun::star::uno::Any &,const class rtl::OUString &,_Bool) + _Bool bUppercaseBool + 1 +include/vcl/accessibletableprovider.hxx:114 + _Bool vcl::IAccessibleTableProvider::GetGlyphBoundRects(const class Point &,const class rtl::OUString &,int,int,class std::__debug::vector > &) + int nIndex + 0 +include/vcl/alpha.hxx:52 + void AlphaMask::Replace(unsigned char,unsigned char) + unsigned char cSearchTransparency + 0 +include/vcl/BitmapBasicMorphologyFilter.hxx:46 + void BitmapErodeFilter::BitmapErodeFilter(int) + int nRadius + 1 +include/vcl/BitmapColor.hxx:31 + void BitmapColor::BitmapColor(enum ColorTransparencyTag,unsigned char,unsigned char,unsigned char,unsigned char) + enum ColorTransparencyTag + 0 +include/vcl/BitmapColor.hxx:32 + void BitmapColor::BitmapColor(enum ColorAlphaTag,unsigned char,unsigned char,unsigned char,unsigned char) + enum ColorAlphaTag + 0 +include/vcl/BitmapFilter.hxx:30 + void generateStripRanges(long,long,class std::function) + long nFirst + 0 +include/vcl/dibtools.hxx:40 + _Bool ReadDIB(class Bitmap &,class SvStream &,_Bool,_Bool) + _Bool bMSOFormat + 0 +include/vcl/dibtools.hxx:46 + _Bool ReadDIBBitmapEx(class BitmapEx &,class SvStream &,_Bool,_Bool) + _Bool bFileHeader + 1 +include/vcl/dibtools.hxx:46 + _Bool ReadDIBBitmapEx(class BitmapEx &,class SvStream &,_Bool,_Bool) + _Bool bMSOFormat + 0 +include/vcl/embeddedfontshelper.hxx:54 + class rtl::OUString EmbeddedFontsHelper::fontFileUrl(class std::basic_string_view >,enum FontFamily,enum FontItalic,enum FontWeight,enum FontPitch,enum EmbeddedFontsHelper::FontRights) + enum EmbeddedFontsHelper::FontRights rights + 0 +include/vcl/errcode.hxx:66 + void ErrCode::ErrCode(enum WarningFlag,enum ErrCodeArea,enum ErrCodeClass,unsigned short) + enum WarningFlag + 0 +include/vcl/fieldvalues.hxx:33 + _Bool TextToValue(const class rtl::OUString &,double &,long,unsigned short,const class LocaleDataWrapper &,enum FieldUnit) + long nBaseValue + 0 +include/vcl/filter/PDFiumLibrary.hxx:60 + class std::unique_ptr > vcl::pdf::PDFium::createBitmap(int,int,int) + int nAlpha + 1 +include/vcl/filter/PDFiumLibrary.hxx:69 + void vcl::pdf::PDFiumBitmap::fillRect(int,int,int,int,unsigned int) + int left + 0 +include/vcl/filter/PDFiumLibrary.hxx:69 + void vcl::pdf::PDFiumBitmap::fillRect(int,int,int,int,unsigned int) + int top + 0 +include/vcl/filter/PDFiumLibrary.hxx:70 + void vcl::pdf::PDFiumBitmap::renderPageBitmap(class vcl::pdf::PDFiumPage *,int,int,int,int) + int nStartX + 0 +include/vcl/filter/PDFiumLibrary.hxx:70 + void vcl::pdf::PDFiumBitmap::renderPageBitmap(class vcl::pdf::PDFiumPage *,int,int,int,int) + int nStartY + 0 +include/vcl/graphicfilter.hxx:334 + class ErrCode GraphicFilter::ImportGraphic(class Graphic &,const class rtl::OUString &,class SvStream &,unsigned short,unsigned short *,enum GraphicFilterImportFlags,const class com::sun::star::uno::Sequence *,const struct WmfExternal *) + const class com::sun::star::uno::Sequence * pFilterData + 0 +include/vcl/image.hxx:47 + void Image::Image(enum StockImage,const class rtl::OUString &) + enum StockImage + 0 +include/vcl/InterimItemWindow.hxx:42 + void InterimItemWindow::InterimItemWindow(class vcl::Window *,const class rtl::OUString &,const class rtl::OString &,_Bool,unsigned long) + unsigned long nLOKWindowId + 0 +include/vcl/mtfxmldump.hxx:37 + void MetafileXmlDump::filterActionType(const enum MetaActionType,_Bool) + _Bool bShouldFilter + 0 +include/vcl/outdev.hxx:535 + _Bool OutputDevice::SupportsOperation(enum OutDevSupportType) const + enum OutDevSupportType + 0 +include/vcl/outdev.hxx:1216 + void OutputDevice::ImplDrawWaveTextLine(long,long,long,long,long,enum FontLineStyle,class Color,_Bool) + long nY + 0 +include/vcl/outdev.hxx:1217 + void OutputDevice::ImplDrawStraightTextLine(long,long,long,long,long,enum FontLineStyle,class Color,_Bool) + long nY + 0 +include/vcl/outdev.hxx:1218 + void OutputDevice::ImplDrawStrikeoutLine(long,long,long,long,long,enum FontStrikeout,class Color) + long nY + 0 +include/vcl/outdev.hxx:1219 + void OutputDevice::ImplDrawStrikeoutChar(long,long,long,long,long,enum FontStrikeout,class Color) + long nY + 0 +include/vcl/outdev.hxx:1241 + void OutputDevice::RefreshFontData(const _Bool) + const _Bool bNewFontLists + 1 +include/vcl/outdev.hxx:1368 + _Bool OutputDevice::GetTextIsRTL(const class rtl::OUString &,int,int) const + int nIndex + 0 +include/vcl/outdev/ScopedStates.hxx:25 + void vcl::ScopedAntialiasing::ScopedAntialiasing(class OutputDevice &,_Bool) + _Bool bAAState + 1 +include/vcl/pdfread.hxx:33 + unsigned long RenderPDFBitmaps(const void *,int,class std::__debug::vector > &,unsigned long,int,const class basegfx::B2DTuple *) + int nPages + 1 +include/vcl/settings.hxx:693 + void AllSettings::SetLanguageTag(const class rtl::OUString &,_Bool) + _Bool bCanonicalize + 1 +include/vcl/splitwin.hxx:139 + void SplitWindow::InsertItem(unsigned short,long,unsigned short,unsigned short,enum SplitWindowItemFlags) + unsigned short nIntoSetId + 0 +include/vcl/splitwin.hxx:160 + long SplitWindow::GetItemSize(unsigned short,enum SplitWindowItemFlags) const + enum SplitWindowItemFlags nBits + 1 +include/vcl/status.hxx:36 + void DrawProgress(class vcl::Window *,class OutputDevice &,const class Point &,long,long,long,unsigned short,unsigned short,unsigned short,const class tools::Rectangle &) + unsigned short nPercent1 + 0 +include/vcl/syschild.hxx:51 + void SystemChildWindow::EnableEraseBackground(_Bool) + _Bool bEnable + 0 +include/vcl/TaskStopwatch.hxx:76 + void TaskStopwatch::TaskStopwatch(_Bool) + _Bool bConciderLastIterTime + 1 +include/vcl/texteng.hxx:258 + void TextEngine::UndoActionStart(unsigned short) + unsigned short nId + 0 +include/vcl/timer.hxx:55 + void Timer::Invoke(class Timer *) + class Timer * arg + 0 +include/vcl/toolbox.hxx:323 + void ToolBox::InsertWindow(struct o3tl::strong_int,class vcl::Window *,enum ToolBoxItemBits,unsigned long) + enum ToolBoxItemBits nBits + 0 +include/vcl/toolbox.hxx:372 + void ToolBox::SetItemWindowNonInteractive(struct o3tl::strong_int,_Bool) + _Bool bNonInteractive + 1 +include/vcl/toolbox.hxx:430 + class Size ToolBox::CalcWindowSizePixel(unsigned long,enum WindowAlign) + unsigned long nCalcLines + 1 +include/vcl/toolbox.hxx:451 + void ToolBox::EnableCustomize(_Bool) + _Bool bEnable + 1 +include/vcl/toolkit/edit.hxx:98 + void Edit::ImplClearBackground(class OutputDevice &,const class tools::Rectangle &,long,long) + long nXStart + 0 +include/vcl/toolkit/field.hxx:82 + void FormatterBase::EnableEmptyFieldValue(_Bool) + _Bool bEnable + 1 +include/vcl/toolkit/treelistbox.hxx:555 + class SvTreeListEntry * SvTreeListBox::InsertEntry(const class rtl::OUString &,class SvTreeListEntry *,_Bool,unsigned long,void *) + _Bool bChildrenOnDemand + 0 +include/vcl/toolkit/treelistbox.hxx:559 + class SvTreeListEntry * SvTreeListBox::InsertEntry(const class rtl::OUString &,const class Image &,const class Image &,class SvTreeListEntry *,_Bool,unsigned long,void *) + _Bool bChildrenOnDemand + 0 +include/vcl/toolkit/treelistbox.hxx:624 + void SvTreeListBox::MakeVisible(class SvTreeListEntry *,_Bool) + _Bool bMoveToTop + 1 +include/vcl/toolkit/treelistbox.hxx:640 + struct std::pair SvTreeListBox::GetItemPos(class SvTreeListEntry *,unsigned short) + unsigned short nTabIdx + 0 +include/vcl/toolkit/treelistbox.hxx:648 + unsigned long SvTreeListBox::SelectChildren(class SvTreeListEntry *,_Bool) + _Bool bSelect + 0 +include/vcl/toolkit/treelistbox.hxx:658 + void SvTreeListBox::SetHighlightRange(unsigned short,unsigned short) + unsigned short nFirstTab + 0 +include/vcl/toolkit/treelistentry.hxx:104 + void SvTreeListEntry::ReplaceItem(class std::unique_ptr >,unsigned long) + unsigned long nPos + 0 +include/vcl/vclptr.hxx:43 + _Bool isIncompleteOrDerivedFromVclReferenceBase(int (*)[sizeof(T)]) + int (*)[sizeof(T)] + 0 +include/vcl/vclptr.hxx:81 + void VclPtr::VclPtr(type-parameter-?-? *,enum __sal_NoAcquire) + enum __sal_NoAcquire + 0 +include/vcl/vclptr.hxx:94 + void VclPtr::VclPtr(const VclPtr &,typename enable_if::value, int>::type) + typename enable_if::value, int>::type + 0 +include/vcl/vclptr.hxx:341 + void ScopedVclPtr::ScopedVclPtr(const VclPtr &,typename enable_if::value, int>::type) + typename enable_if::value, int>::type + 0 +include/vcl/vclptr.hxx:388 + void ScopedVclPtr::ScopedVclPtr(type-parameter-?-? *,enum __sal_NoAcquire) + enum __sal_NoAcquire + 0 +include/vcl/vectorgraphicdata.hxx:89 + void VectorGraphicData::VectorGraphicData(const class rtl::OUString &,enum VectorGraphicDataType) + enum VectorGraphicDataType eVectorDataType + 0 +include/vcl/weld.hxx:387 + void weld::ScrolledWindow::hadjustment_configure(int,int,int,int,int,int) + int step_increment + 1 +include/vcl/weld.hxx:406 + void weld::ScrolledWindow::vadjustment_configure(int,int,int,int,int,int) + int lower + 0 +include/vcl/weld.hxx:418 + void weld::ScrolledWindow::vadjustment_set_lower(int) + int upper + 0 +include/vcl/weld.hxx:1007 + void weld::TreeView::set_image(int,class VirtualDevice &,int) + int col + 1 +include/vcl/weld.hxx:1012 + void weld::TreeView::set_text_emphasis(int,_Bool,int) + int col + 0 +include/vcl/weld.hxx:1013 + _Bool weld::TreeView::get_text_emphasis(int,int) const + int col + 0 +include/vcl/weld.hxx:1014 + void weld::TreeView::set_text_align(int,double,int) + int col + 0 +include/vcl/weld.hxx:1104 + _Bool weld::TreeView::get_text_emphasis(const class weld::TreeIter &,int) const + int col + 0 +include/vcl/weld.hxx:1242 + void weld::TreeView::set_column_custom_renderer(int,_Bool) + int nColumn + 0 +include/vcl/weld.hxx:1327 + class std::unique_ptr > weld::IconView::make_iterator(const class weld::TreeIter *) const + const class weld::TreeIter * pOrig + 0 +include/vcl/window.hxx:589 + void vcl::Window::ImplSetMouseTransparent(_Bool) + _Bool bTransparent + 1 +include/vcl/window.hxx:927 + void vcl::Window::Disable(_Bool) + _Bool bChild + 1 +include/vcl/wmf.hxx:33 + _Bool ConvertGraphicToWMF(const class Graphic &,class SvStream &,const class FilterConfigItem *,_Bool) + _Bool bPlaceable + 1 +include/xmloff/numehelp.hxx:93 + void XMLNumberFormatAttributesExportHelper::SetNumberFormatAttributes(class SvXMLExport &,const class rtl::OUString &,class std::basic_string_view >,_Bool,_Bool) + _Bool bExportTypeAttribute + 1 +include/xmloff/ProgressBarHelper.hxx:47 + void ProgressBarHelper::ProgressBarHelper(const class com::sun::star::uno::Reference &,const _Bool) + const _Bool bStrict + 1 +include/xmloff/SchXMLImportHelper.hxx:99 + class com::sun::star::uno::Reference SchXMLImportHelper::GetNewDataSeries(const class com::sun::star::uno::Reference &,int,const class rtl::OUString &,_Bool) + int nCoordinateSystemIndex + 0 +include/xmloff/styleexp.hxx:103 + void XMLStyleExport::exportStyleFamily(const char *,const class rtl::OUString &,const class rtl::Reference &,_Bool,enum XmlStyleFamily,const class rtl::OUString *) + const class rtl::OUString * pPrefix + 0 +include/xmloff/txtparae.hxx:222 + void XMLTextParagraphExport::exportText(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,_Bool,_Bool,_Bool) + _Bool bExportParagraph + 1 +include/xmloff/XMLEventExport.hxx:89 + void XMLEventExport::Export(const class com::sun::star::uno::Reference &,_Bool) + _Bool bUseWhitespace + 1 +include/xmloff/xmlnumi.hxx:70 + void SvxXMLListStyleContext::SetDefaultStyle(const class com::sun::star::uno::Reference &,short,_Bool) + _Bool bOrdered + 0 +l10ntools/inc/common.hxx:51 + void writePoEntry(const class rtl::OString &,class PoOfstream &,const class rtl::OString &,class std::basic_string_view >,const class rtl::OString &,const class rtl::OString &,const class rtl::OString &,const class rtl::OString &,const enum PoEntry::TYPE) + const enum PoEntry::TYPE eType + 0 +l10ntools/inc/po.hxx:112 + void PoOfstream::PoOfstream(const class rtl::OString &,enum PoOfstream::OpenMode) + enum PoOfstream::OpenMode aMode + 1 +libreofficekit/qa/gtktiledviewer/gtv-main-toolbar.hxx:52 + void gtv_main_toolbar_doc_loaded(struct GtvMainToolbar *,LibreOfficeKitDocumentType,_Bool) + _Bool bEditMode + 1 +libreofficekit/qa/tilebench/tilebench.cxx:72 + void dumpTile(const char *,const int,const int,const int,const unsigned char *,const int,const int,int) + const int nOffX + 0 +libreofficekit/qa/tilebench/tilebench.cxx:72 + void dumpTile(const char *,const int,const int,const int,const unsigned char *,const int,const int,int) + const int nOffY + 0 +libreofficekit/qa/tilebench/tilebench.cxx:148 + void testTile(class lok::Document *,int,int,_Bool) + _Bool dump + 1 +lotuswordpro/inc/xfilter/xfborders.hxx:90 + void XFBorder::SetDoubleLine(_Bool,_Bool) + _Bool dual + 1 +lotuswordpro/inc/xfilter/xfborders.hxx:90 + void XFBorder::SetDoubleLine(_Bool,_Bool) + _Bool bSameWidth + 0 +lotuswordpro/inc/xfilter/xfcellstyle.hxx:108 + void XFCellStyle::SetAlignType(enum enumXFAlignType,enum enumXFAlignType) + enum enumXFAlignType hori + 0 +lotuswordpro/inc/xfilter/xfdrawstyle.hxx:118 + void XFDrawStyle::SetFontWorkStyle(enum enumXFFWStyle,enum enumXFFWAdjust) + enum enumXFFWAdjust eAdjust + 0 +lotuswordpro/inc/xfilter/xfframestyle.hxx:127 + void XFFrameStyle::SetProtect(_Bool,_Bool,_Bool) + _Bool content + 1 +lotuswordpro/inc/xfilter/xfframestyle.hxx:127 + void XFFrameStyle::SetProtect(_Bool,_Bool,_Bool) + _Bool size + 1 +lotuswordpro/inc/xfilter/xfframestyle.hxx:127 + void XFFrameStyle::SetProtect(_Bool,_Bool,_Bool) + _Bool pos + 1 +lotuswordpro/inc/xfilter/xfindex.hxx:100 + void XFIndexTemplate::AddTabEntry(enum enumXFTab,double,char16_t,char16_t,const class rtl::OUString &) + double len + 0 +lotuswordpro/inc/xfilter/xfparastyle.hxx:173 + void XFParaStyle::SetDropCap(short,short,double) + double fDistance + 0 +lotuswordpro/inc/xfilter/xfutil.hxx:91 + class rtl::OUString GetColorMode(enum enumXFColorMode) + enum enumXFColorMode mode + 0 +lotuswordpro/source/filter/bento.hxx:203 + class OpenStormBento::CBenObject * OpenStormBento::LtcBenContainer::FindNextObjectWithProperty(class OpenStormBento::CBenObject *,unsigned int) + class OpenStormBento::CBenObject * pCurrObject + 0 +lotuswordpro/source/filter/clone.hxx:26 + char & detail::has_clone::check_sig(type-parameter-?-? *,test *) + type-parameter-?-? * + 0 +lotuswordpro/source/filter/clone.hxx:26 + char & detail::has_clone::check_sig(type-parameter-?-? *,test *) + test * + 0 +lotuswordpro/source/filter/lwpnumericfmt.hxx:112 + void LwpCurrencyInfo::LwpCurrencyInfo(const class rtl::OUString &,_Bool,_Bool) + _Bool bShowSpace_ + 1 +o3tl/qa/cow_wrapper_clients.hxx:41 + void o3tltests::cow_wrapper_client1::cow_wrapper_client1(int) + int nVal + 1 +oox/inc/drawingml/chart/typegroupconverter.hxx:153 + void oox::drawingml::chart::TypeGroupConverter::convertLineSmooth(class oox::PropertySet &,_Bool) const + _Bool bOoxSmooth + 1 +oox/inc/drawingml/textspacing.hxx:42 + void oox::drawingml::TextSpacing::TextSpacing(int) + int nPoints + 0 +oox/qa/unit/drawingml.cxx:38 + class com::sun::star::uno::Reference getChildShape(const class com::sun::star::uno::Reference &,int) + int nIndex + 0 +oox/source/drawingml/lineproperties.cxx:44 + void lclSetDashData(struct com::sun::star::drawing::LineDash &,short,int,short,int,int) + short nDots + 1 +oox/source/export/chartexport.cxx:259 + int lcl_getCategoryAxisType(const class com::sun::star::uno::Reference &,int,int) + int nDimensionIndex + 0 +oox/source/export/chartexport.cxx:481 + int lcl_getAlphaFromTransparenceGradient(const struct com::sun::star::awt::Gradient &,_Bool) + _Bool bStart + 1 +oox/source/ppt/pptshape.cxx:511 + _Bool Placeholders::hasByPrio(unsigned long) const + unsigned long aIndex + 0 +oox/source/ppt/timenodelistcontext.cxx:104 + void oox::ppt::(anonymous namespace)::AnimColor::AnimColor(short,int,int,int) + short cs + 0 +oox/source/ppt/timenodelistcontext.cxx:104 + void oox::ppt::(anonymous namespace)::AnimColor::AnimColor(short,int,int,int) + int o + 0 +oox/source/ppt/timenodelistcontext.cxx:104 + void oox::ppt::(anonymous namespace)::AnimColor::AnimColor(short,int,int,int) + int t + 0 +oox/source/ppt/timenodelistcontext.cxx:104 + void oox::ppt::(anonymous namespace)::AnimColor::AnimColor(short,int,int,int) + int th + 0 +oox/source/vml/vmlformatting.cxx:542 + long lclGetEmu(const class oox::GraphicHelper &,const class oox::OptValue &,long) + long nDefValue + 1 +oox/source/vml/vmlshapecontext.cxx:133 + _Bool lclDecodeVmlxBool(class std::basic_string_view >,_Bool) + _Bool bDefaultForEmpty + 1 +opencl/source/opencl_device.cxx:116 + double random(double,double) + double min + 0 +opencl/source/openclwrapper.cxx:529 + _Bool initOpenCLRunEnv(int) + int argc + 0 +pyuno/inc/pyuno.hxx:86 + void pyuno::PyRef::PyRef(struct _object *,enum __sal_NoAcquire) + enum __sal_NoAcquire + 0 +pyuno/inc/pyuno.hxx:88 + void pyuno::PyRef::PyRef(struct _object *,enum __sal_NoAcquire,enum pyuno::NotNull) + enum __sal_NoAcquire + 0 +pyuno/inc/pyuno.hxx:88 + void pyuno::PyRef::PyRef(struct _object *,enum __sal_NoAcquire,enum pyuno::NotNull) + enum pyuno::NotNull + 0 +pyuno/source/module/pyuno_impl.hxx:80 + void log(struct pyuno::RuntimeCargo *,int,class std::basic_string_view >) + int level + 1 +reportdesign/inc/RptModel.hxx:57 + void rptui::OReportModel::OReportModel(class reportdesign::OReportDefinition *) + class reportdesign::OReportDefinition * _pReportDefinition + 0 +reportdesign/source/core/inc/Tools.hxx:48 + void throwIllegallArgumentException(const class rtl::OUString &,const class com::sun::star::uno::Reference &,short) + short ArgumentPosition_ + 1 +reportdesign/source/filter/xml/xmlFixedContent.cxx:52 + void rptxml::(anonymous namespace)::OXMLCharContent::OXMLCharContent(class SvXMLImport &,class rptxml::OXMLFixedContent *,short) + short nControl + 1 +reportdesign/source/filter/xml/xmlFormattedField.hxx:34 + void rptxml::OXMLFormattedField::OXMLFormattedField(class rptxml::ORptFilter &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,class rptxml::OXMLTable *,_Bool) + _Bool _bPageCount + 0 +reportdesign/source/ui/inc/DesignView.hxx:228 + void rptui::ODesignView::setMarked(const class com::sun::star::uno::Sequence > &,_Bool) + _Bool _bMark + 1 +reportdesign/source/ui/inc/GeometryHandler.hxx:97 + void rptui::GeometryHandler::implCreateListLikeControl(const class com::sun::star::uno::Reference &,struct com::sun::star::inspection::LineDescriptor &,const char **,_Bool,_Bool) + _Bool _bReadOnlyControl + 0 +reportdesign/source/ui/inc/GeometryHandler.hxx:97 + void rptui::GeometryHandler::implCreateListLikeControl(const class com::sun::star::uno::Reference &,struct com::sun::star::inspection::LineDescriptor &,const char **,_Bool,_Bool) + _Bool _bTrueIfListBoxFalseIfComboBox + 1 +reportdesign/source/ui/inc/UITools.hxx:142 + class SdrObject * isOver(const class tools::Rectangle &,const class SdrPage &,const class SdrView &,_Bool,class std::unique_ptr *,int) + _Bool _bAllObjects + 1 +reportdesign/source/ui/report/SectionWindow.cxx:360 + void lcl_setOrigin(class vcl::Window &,long,long) + long _nY + 0 +sal/osl/unx/file.cxx:111 + void (anonymous namespace)::FileHandle_Impl::FileHandle_Impl(int,enum (anonymous namespace)::FileHandle_Impl::Kind,const char *) + enum (anonymous namespace)::FileHandle_Impl::Kind kind + 1 +sal/qa/osl/file/osl_File.cxx:437 + void osl_FileBase::getAbsoluteFileURL::check_getAbsoluteFileURL(const class rtl::OUString &,const class rtl::OString &,enum osl::FileBase::RC,const class rtl::OUString &) + enum osl::FileBase::RC _nAssumeError + 0 +sal/qa/osl/pipe/osl_Pipe.cxx:737 + void thread_sleep(unsigned int) + unsigned int _nSec + 1 +sal/qa/osl/process/osl_Thread.cxx:160 + void (anonymous namespace)::ThreadSafeValue::ThreadSafeValue(type-parameter-?-?) + type-parameter-?-? n + 0 +sal/qa/rtl/random/rtl_random.cxx:172 + void rtl_random::(anonymous namespace)::Statistics::addValue(unsigned char,int) + int _nValue + 1 +sc/inc/address.hxx:333 + void ScAddress::Format(class rtl::OStringBuffer &,enum ScRefFlags,const class ScDocument *,const struct ScAddress::Details &) const + const class ScDocument * pDocument + 0 +sc/inc/address.hxx:506 + void ScRange::ScRange(enum ScAddress::Uninitialized) + enum ScAddress::Uninitialized eUninitialized + 0 +sc/inc/address.hxx:509 + void ScRange::ScRange(enum ScAddress::InitializeInvalid) + enum ScAddress::InitializeInvalid eInvalid + 0 +sc/inc/attarray.hxx:142 + const class ScPatternAttr * ScAttrArray::SetPattern(int,class std::unique_ptr >,_Bool) + _Bool bPutToPool + 1 +sc/inc/attarray.hxx:144 + void ScAttrArray::SetPatternArea(int,int,class std::unique_ptr >,_Bool,class ScEditDataArray *) + _Bool bPutToPool + 1 +sc/inc/attarray.hxx:144 + void ScAttrArray::SetPatternArea(int,int,class std::unique_ptr >,_Bool,class ScEditDataArray *) + class ScEditDataArray * pDataArray + 0 +sc/inc/cellform.hxx:40 + class rtl::OUString ScCellFormat::GetString(class ScDocument &,const class ScAddress &,unsigned int,const class Color **,class SvNumberFormatter &,_Bool,_Bool) + _Bool bNullVals + 1 +sc/inc/cellform.hxx:40 + class rtl::OUString ScCellFormat::GetString(class ScDocument &,const class ScAddress &,unsigned int,const class Color **,class SvNumberFormatter &,_Bool,_Bool) + _Bool bFormula + 0 +sc/inc/ChartTools.hxx:47 + class SdrOle2Obj * getChartByIndex(class ScDocShell *,short,long,enum sc::tools::ChartSourceType) + enum sc::tools::ChartSourceType eChartSourceType + 1 +sc/inc/chgtrack.hxx:711 + void ScChangeActionContent::PutOldValueToDoc(class ScDocument *,short,int) const + short nDx + 0 +sc/inc/chgtrack.hxx:711 + void ScChangeActionContent::PutOldValueToDoc(class ScDocument *,short,int) const + int nDy + 0 +sc/inc/column.hxx:223 + _Bool ScColumn::HasDataAt(struct sc::ColumnBlockConstPosition &,int,_Bool,_Bool) const + _Bool bConsiderCellNotes + 0 +sc/inc/column.hxx:223 + _Bool ScColumn::HasDataAt(struct sc::ColumnBlockConstPosition &,int,_Bool,_Bool) const + _Bool bConsiderCellDrawObjects + 0 +sc/inc/column.hxx:225 + _Bool ScColumn::HasDataAt(struct sc::ColumnBlockPosition &,int,_Bool,_Bool) + _Bool bConsiderCellNotes + 0 +sc/inc/column.hxx:225 + _Bool ScColumn::HasDataAt(struct sc::ColumnBlockPosition &,int,_Bool,_Bool) + _Bool bConsiderCellDrawObjects + 0 +sc/inc/column.hxx:252 + void ScColumn::GetUnprotectedCells(int,int,class ScRangeList &) const + int nStartRow + 0 +sc/inc/column.hxx:339 + class ScFormulaCell * ScColumn::SetFormulaCell(int,class ScFormulaCell *,enum sc::StartListeningType,_Bool) + _Bool bInheritNumFormatIfNeeded + 1 +sc/inc/column.hxx:369 + void ScColumn::GetString(struct sc::ColumnBlockConstPosition &,int,class rtl::OUString &,const struct ScInterpreterContext *) const + const struct ScInterpreterContext * pContext + 0 +sc/inc/column.hxx:672 + void ScColumn::DetachFormulaCells(class sc::EndListeningContext &,int,int,class std::__debug::vector > *) + class std::__debug::vector > * pNewSharedRows + 0 +sc/inc/column.hxx:728 + void ScColumn::AttachNewFormulaCell(const class mdds::detail::mtv::iterator_base, struct mdds::mtv::noncopyable_managed_element_block<53, class EditTextObject>, struct mdds::mtv::noncopyable_managed_element_block<54, class ScFormulaCell> >, class sc::CellStoreEvent>::iterator_trait, struct mdds::detail::mtv::private_data_forward_update > > &,int,class ScFormulaCell &,const class std::__debug::vector > &,_Bool,enum sc::StartListeningType) + _Bool bJoin + 1 +sc/inc/columnspanset.hxx:59 + void sc::ColumnSpanSet::ColumnType::ColumnType(int,int,_Bool) + int nStart + 0 +sc/inc/columnspanset.hxx:59 + void sc::ColumnSpanSet::ColumnType::ColumnType(int,int,_Bool) + _Bool bInit + 0 +sc/inc/columnspanset.hxx:83 + void sc::ColumnSpanSet::ColumnAction::executeSum(int,int,_Bool,double &) + _Bool + 1 +sc/inc/columnspanset.hxx:91 + void sc::ColumnSpanSet::set(const class ScDocument &,short,short,int,_Bool) + _Bool bVal + 1 +sc/inc/columnspanset.hxx:93 + void sc::ColumnSpanSet::set(const class ScDocument &,const class ScRange &,_Bool) + _Bool bVal + 1 +sc/inc/columnspanset.hxx:95 + void sc::ColumnSpanSet::set(const class ScDocument &,short,short,const class sc::SingleColumnSpanSet &,_Bool) + _Bool bVal + 1 +sc/inc/columnspanset.hxx:101 + void sc::ColumnSpanSet::scan(const class ScDocument &,short,short,int,short,int,_Bool) + _Bool bVal + 1 +sc/inc/compiler.hxx:361 + void ScCompiler::ScCompiler(class sc::CompileFormulaContext &,const class ScAddress &,_Bool,_Bool,const struct ScInterpreterContext *) + _Bool bComputeII + 0 +sc/inc/compiler.hxx:361 + void ScCompiler::ScCompiler(class sc::CompileFormulaContext &,const class ScAddress &,_Bool,_Bool,const struct ScInterpreterContext *) + _Bool bMatrixFlag + 0 +sc/inc/compiler.hxx:361 + void ScCompiler::ScCompiler(class sc::CompileFormulaContext &,const class ScAddress &,_Bool,_Bool,const struct ScInterpreterContext *) + const struct ScInterpreterContext * pContext + 0 +sc/inc/compiler.hxx:366 + void ScCompiler::ScCompiler(class ScDocument &,const class ScAddress &,enum formula::FormulaGrammar::Grammar,_Bool,_Bool,const struct ScInterpreterContext *) + const struct ScInterpreterContext * pContext + 0 +sc/inc/compressedarray.hxx:188 + void ScBitMaskCompressedArray::ScBitMaskCompressedArray(type-parameter-?-?,const type-parameter-?-? &) + const type-parameter-?-? & rValue + 0 +sc/inc/compressedarray.hxx:198 + void ScBitMaskCompressedArray::CopyFromAnded(const ScBitMaskCompressedArray &,type-parameter-?-?,type-parameter-?-?,const type-parameter-?-? &) + type-parameter-?-? nStart + 0 +sc/inc/dapiuno.hxx:296 + void ScFieldIdentifier::ScFieldIdentifier(const class rtl::OUString &,_Bool) + _Bool bDataLayout + 1 +sc/inc/dociter.hxx:562 + void ScUsedAreaIterator::ScUsedAreaIterator(class ScDocument &,short,short,int,short,int) + short nCol1 + 0 +sc/inc/dociter.hxx:562 + void ScUsedAreaIterator::ScUsedAreaIterator(class ScDocument &,short,short,int,short,int) + int nRow1 + 0 +sc/inc/dociter.hxx:598 + void ScDocRowHeightUpdater::TabRanges::TabRanges(short,int) + short nTab + 0 +sc/inc/document.hxx:966 + void ScDocument::SetPendingRowHeights(short,_Bool) + _Bool bSet + 0 +sc/inc/document.hxx:970 + void ScDocument::SetScenario(short,_Bool) + _Bool bFlag + 1 +sc/inc/document.hxx:1166 + class rtl::OUString ScDocument::GetString(short,int,short,const struct ScInterpreterContext *) const + const struct ScInterpreterContext * pContext + 0 +sc/inc/document.hxx:1306 + void ScDocument::GetBorderLines(short,int,short,const class editeng::SvxBorderLine **,const class editeng::SvxBorderLine **,const class editeng::SvxBorderLine **,const class editeng::SvxBorderLine **) const + short nTab + 0 +sc/inc/document.hxx:1542 + void ScDocument::EnableUserInteraction(_Bool) + _Bool bVal + 0 +sc/inc/document.hxx:1629 + void ScDocument::CopyMultiRangeFromClip(const class ScAddress &,const class ScMarkData &,enum InsertDeleteFlags,class ScDocument *,_Bool,_Bool,_Bool,_Bool) + _Bool bResetCut + 1 +sc/inc/document.hxx:1678 + void ScDocument::UndoToDocument(short,int,short,short,int,short,enum InsertDeleteFlags,_Bool,class ScDocument &) + short nCol1 + 0 +sc/inc/document.hxx:1678 + void ScDocument::UndoToDocument(short,int,short,short,int,short,enum InsertDeleteFlags,_Bool,class ScDocument &) + _Bool bMarked + 0 +sc/inc/document.hxx:1685 + void ScDocument::UndoToDocument(const class ScRange &,enum InsertDeleteFlags,_Bool,class ScDocument &) + _Bool bMarked + 0 +sc/inc/document.hxx:1730 + const class ScPatternAttr * ScDocument::GetMostUsedPattern(short,int,int,short) const + int nStartRow + 0 +sc/inc/document.hxx:1893 + unsigned long ScDocument::GetColOffset(short,short,_Bool) const + _Bool bHiddenAsZero + 1 +sc/inc/document.hxx:1894 + unsigned long ScDocument::GetRowOffset(int,short,_Bool) const + _Bool bHiddenAsZero + 1 +sc/inc/document.hxx:1926 + void ScDocument::SetRowFlags(int,int,short,enum CRFlags) + int nStartRow + 0 +sc/inc/document.hxx:1931 + void ScDocument::GetAllRowBreaks(class std::__debug::set, class std::allocator > &,short,_Bool,_Bool) const + _Bool bPage + 0 +sc/inc/document.hxx:1931 + void ScDocument::GetAllRowBreaks(class std::__debug::set, class std::allocator > &,short,_Bool,_Bool) const + _Bool bManual + 1 +sc/inc/document.hxx:1932 + void ScDocument::GetAllColBreaks(class std::__debug::set, class std::allocator > &,short,_Bool,_Bool) const + _Bool bPage + 0 +sc/inc/document.hxx:1932 + void ScDocument::GetAllColBreaks(class std::__debug::set, class std::allocator > &,short,_Bool,_Bool) const + _Bool bManual + 1 +sc/inc/document.hxx:1935 + void ScDocument::SetRowBreak(int,short,_Bool,_Bool) + _Bool bPage + 0 +sc/inc/document.hxx:1935 + void ScDocument::SetRowBreak(int,short,_Bool,_Bool) + _Bool bManual + 1 +sc/inc/document.hxx:1936 + void ScDocument::SetColBreak(short,short,_Bool,_Bool) + _Bool bPage + 0 +sc/inc/document.hxx:1936 + void ScDocument::SetColBreak(short,short,_Bool,_Bool) + _Bool bManual + 1 +sc/inc/document.hxx:1937 + void ScDocument::RemoveRowBreak(int,short,_Bool,_Bool) + _Bool bPage + 0 +sc/inc/document.hxx:1937 + void ScDocument::RemoveRowBreak(int,short,_Bool,_Bool) + _Bool bManual + 1 +sc/inc/document.hxx:1938 + void ScDocument::RemoveColBreak(short,short,_Bool,_Bool) + _Bool bPage + 0 +sc/inc/document.hxx:1938 + void ScDocument::RemoveColBreak(short,short,_Bool,_Bool) + _Bool bManual + 1 +sc/inc/document.hxx:2259 + void ScDocument::UpdateBroadcastAreas(enum UpdateRefMode,const class ScRange &,short,int,short) + enum UpdateRefMode eUpdateRefMode + 0 +sc/inc/document.hxx:2289 + void ScDocument::CalcFormulaTree(_Bool,_Bool,_Bool) + _Bool bSetAllDirty + 1 +sc/inc/document.hxx:2511 + void ScDocument::StoreTabToCache(short,class SvStream &) const + short nTab + 0 +sc/inc/document.hxx:2512 + void ScDocument::RestoreTabFromCache(short,class SvStream &) + short nTab + 0 +sc/inc/document.hxx:2603 + void ScDocument::EndListeningIntersectedGroup(class sc::EndListeningContext &,const class ScAddress &,class std::__debug::vector > *) + class std::__debug::vector > * pGroupPos + 0 +sc/inc/document.hxx:2623 + void ScMutationDisable::ScMutationDisable(class ScDocument &,enum ScMutationGuardFlags) + enum ScMutationGuardFlags nFlags + 1 +sc/inc/document.hxx:2656 + void ScMutationGuard::ScMutationGuard(class ScDocument &,enum ScMutationGuardFlags) + enum ScMutationGuardFlags nFlags + 1 +sc/inc/documentimport.hxx:88 + void ScDocumentImport::setSheetName(short,const class rtl::OUString &) + short nTab + 0 +sc/inc/documentimport.hxx:123 + void ScDocumentImport::setRowsVisible(short,int,int,_Bool) + _Bool bVisible + 0 +sc/inc/documentlinkmgr.hxx:65 + _Bool sc::DocumentLinkManager::hasDdeOrOleOrWebServiceLinks(_Bool,_Bool,_Bool) const + _Bool bDde + 1 +sc/inc/dpdimsave.hxx:178 + class rtl::OUString ScDPDimensionSaveData::CreateDateGroupDimName(int,const class ScDPObject &,_Bool,const class std::__debug::vector > *) + _Bool bAllowSource + 1 +sc/inc/dpglobal.hxx:53 + void ScDPValue::Set(double,enum ScDPValue::Type) + enum ScDPValue::Type eT + 0 +sc/inc/dpsave.hxx:229 + void ScDPSaveDimension::Dump(int) const + int nIndent + 0 +sc/inc/dptabdat.hxx:130 + const class ScDPItemData * ScDPTableData::GetMemberByIndex(int,int) + int nIndex + 0 +sc/inc/dptabres.hxx:139 + void ScDPRelativePos::ScDPRelativePos(long,long) + long nBase + 0 +sc/inc/drwlayer.hxx:170 + class tools::Rectangle ScDrawLayer::GetCellRect(const class ScDocument &,const class ScAddress &,_Bool) + _Bool bMergedCell + 1 +sc/inc/filter.hxx:78 + class ErrCode ScFormatFilterPlugin::ScExportExcel5(class SfxMedium &,class ScDocument *,enum ExportFormatExcel,unsigned short) + unsigned short eDest + 1 +sc/inc/filter.hxx:81 + void ScFormatFilterPlugin::ScExportHTML(class SvStream &,const class rtl::OUString &,class ScDocument *,const class ScRange &,const unsigned short,_Bool,const class rtl::OUString &,class rtl::OUString &,const class rtl::OUString &) + const unsigned short eDest + 0 +sc/inc/filter.hxx:83 + void ScFormatFilterPlugin::ScExportRTF(class SvStream &,class ScDocument *,const class ScRange &,const unsigned short) + const unsigned short eDest + 0 +sc/inc/formulacell.hxx:189 + void ScFormulaCell::ScFormulaCell(class ScDocument &,const class ScAddress &,class std::unique_ptr >,const enum formula::FormulaGrammar::Grammar,enum ScMatrixMode) + enum ScMatrixMode cMatInd + 0 +sc/inc/formulacell.hxx:223 + class rtl::OUString ScFormulaCell::GetFormula(class sc::CompileFormulaContext &,const struct ScInterpreterContext *) const + const struct ScInterpreterContext * pContext + 0 +sc/inc/markarr.hxx:56 + void ScMarkArray::Reset(_Bool,unsigned long) + unsigned long nNeeded + 1 +sc/inc/miscuno.hxx:154 + short ScUnoHelpFunctions::GetShortProperty(const class com::sun::star::uno::Reference &,const class rtl::OUString &,short) + short nDefault + 0 +sc/inc/miscuno.hxx:159 + type-parameter-?-? ScUnoHelpFunctions::GetEnumProperty(const class com::sun::star::uno::Reference &,const class rtl::OUString &,type-parameter-?-?) + type-parameter-?-? nDefault + 0 +sc/inc/pivot.hxx:124 + void ScPivotField::ScPivotField(short) + short nNewCol + 0 +sc/inc/postit.hxx:166 + void ScPostIt::ScPostIt(class ScDocument &,const class ScAddress &,unsigned int) + unsigned int nPostItId + 0 +sc/inc/queryparam.hxx:59 + struct ScQueryEntry * ScQueryParamBase::FindEntryByField(int,_Bool) + _Bool bNew + 1 +sc/inc/rangeutl.hxx:58 + _Bool ScRangeUtil::IsAbsTabArea(const class rtl::OUString &,const class ScDocument *,class std::unique_ptr > *,unsigned short *,_Bool,const struct ScAddress::Details &) + _Bool bAcceptCellRef + 1 +sc/inc/rangeutl.hxx:126 + _Bool ScRangeStringConverter::GetAddressFromString(class ScAddress &,const class rtl::OUString &,const class ScDocument &,enum formula::FormulaGrammar::AddressConvention,int &,char16_t,char16_t) + enum formula::FormulaGrammar::AddressConvention eConv + 0 +sc/inc/rangeutl.hxx:150 + _Bool ScRangeStringConverter::GetAreaFromString(class ScArea &,const class rtl::OUString &,const class ScDocument &,enum formula::FormulaGrammar::AddressConvention,int &,char16_t) + enum formula::FormulaGrammar::AddressConvention eConv + 0 +sc/inc/rangeutl.hxx:184 + void ScRangeStringConverter::GetStringFromRangeList(class rtl::OUString &,const class ScRangeList *,const class ScDocument *,enum formula::FormulaGrammar::AddressConvention,char16_t) + enum formula::FormulaGrammar::AddressConvention eConv + 0 +sc/inc/rangeutl.hxx:191 + void ScRangeStringConverter::GetStringFromArea(class rtl::OUString &,const class ScArea &,const class ScDocument *,enum formula::FormulaGrammar::AddressConvention,char16_t,_Bool,enum ScRefFlags) + enum formula::FormulaGrammar::AddressConvention eConv + 0 +sc/inc/rangeutl.hxx:191 + void ScRangeStringConverter::GetStringFromArea(class rtl::OUString &,const class ScArea &,const class ScDocument *,enum formula::FormulaGrammar::AddressConvention,char16_t,_Bool,enum ScRefFlags) + _Bool bAppendStr + 1 +sc/inc/rangeutl.hxx:201 + void ScRangeStringConverter::GetStringFromAddress(class rtl::OUString &,const struct com::sun::star::table::CellAddress &,const class ScDocument *,enum formula::FormulaGrammar::AddressConvention,char16_t,_Bool) + enum formula::FormulaGrammar::AddressConvention eConv + 0 +sc/inc/rangeutl.hxx:201 + void ScRangeStringConverter::GetStringFromAddress(class rtl::OUString &,const struct com::sun::star::table::CellAddress &,const class ScDocument *,enum formula::FormulaGrammar::AddressConvention,char16_t,_Bool) + _Bool bAppendStr + 0 +sc/inc/rangeutl.hxx:216 + void ScRangeStringConverter::GetStringFromRangeList(class rtl::OUString &,const class com::sun::star::uno::Sequence &,const class ScDocument *,enum formula::FormulaGrammar::AddressConvention,char16_t) + enum formula::FormulaGrammar::AddressConvention eConv + 0 +sc/inc/scabstdlg.hxx:462 + class VclPtr ScAbstractDialogFactory::CreateScMetricInputDlg(class weld::Window *,const class rtl::OString &,long,long,enum FieldUnit,unsigned short,long,long) + long nMinimum + 0 +sc/inc/scmatrix.hxx:149 + void ScMatrix::IterateResult::IterateResult(double,double,unsigned long) + unsigned long nCount + 0 +sc/inc/scmatrix.hxx:329 + _Bool ScMatrix::IsEmptyResult(unsigned long,unsigned long) const + unsigned long nC + 0 +sc/inc/scmatrix.hxx:329 + _Bool ScMatrix::IsEmptyResult(unsigned long,unsigned long) const + unsigned long nR + 0 +sc/inc/scmatrix.hxx:368 + unsigned long ScMatrix::MatchDoubleInColumns(double,unsigned long,unsigned long) const + unsigned long nCol1 + 0 +sc/inc/scmatrix.hxx:368 + unsigned long ScMatrix::MatchDoubleInColumns(double,unsigned long,unsigned long) const + unsigned long nCol2 + 0 +sc/inc/scmatrix.hxx:369 + unsigned long ScMatrix::MatchStringInColumns(const class svl::SharedString &,unsigned long,unsigned long) const + unsigned long nCol1 + 0 +sc/inc/scmatrix.hxx:369 + unsigned long ScMatrix::MatchStringInColumns(const class svl::SharedString &,unsigned long,unsigned long) const + unsigned long nCol2 + 0 +sc/inc/scopetools.hxx:57 + void sc::UndoSwitch::UndoSwitch(class ScDocument &,_Bool) + _Bool bUndo + 1 +sc/inc/scopetools.hxx:67 + void sc::IdleSwitch::IdleSwitch(class ScDocument &,_Bool) + _Bool bEnableIdle + 0 +sc/inc/scopetools.hxx:78 + void sc::DelayFormulaGroupingSwitch::DelayFormulaGroupingSwitch(class ScDocument &,_Bool) + _Bool delay + 1 +sc/inc/stringutil.hxx:153 + class rtl::OUString ScStringUtil::GetQuotedToken(const class rtl::OUString &,int,const class rtl::OUString &,char16_t,int &) + int nToken + 0 +sc/inc/table.hxx:788 + void ScTable::SetOptimalHeightOnly(class sc::RowHeightContext &,int,int,class ScProgress *,unsigned long) + int nStartRow + 0 +sc/inc/table.hxx:904 + _Bool ScTable::RowHiddenLeaf(int,int *,int *) const + int * pFirstRow + 0 +sc/inc/table.hxx:909 + void ScTable::CopyColHidden(const class ScTable &,short,short) + short nStartCol + 0 +sc/inc/table.hxx:910 + void ScTable::CopyRowHidden(const class ScTable &,int,int) + int nStartRow + 0 +sc/inc/table.hxx:920 + _Bool ScTable::ColFiltered(short,short *,short *) const + short * pFirstCol + 0 +sc/inc/table.hxx:922 + void ScTable::CopyColFiltered(const class ScTable &,short,short) + short nStartCol + 0 +sc/inc/table.hxx:923 + void ScTable::CopyRowFiltered(const class ScTable &,int,int) + int nStartRow + 0 +sc/inc/token.hxx:267 + void ScRefListToken::ScRefListToken(_Bool) + _Bool bArrayResult + 1 +sc/inc/types.hxx:106 + void sc::MultiDataCellState::MultiDataCellState(enum sc::MultiDataCellState::StateType) + enum sc::MultiDataCellState::StateType eState + 1 +sc/qa/extras/new_cond_format.cxx:183 + void testShowValue(const class com::sun::star::uno::Reference &,_Bool) + _Bool bShowVal + 1 +sc/qa/extras/scpdfexport.cxx:54 + void ScPDFExportTest::setFont(class ScFieldEditEngine &,int,int,const class rtl::OUString &) + int nStart + 0 +sc/qa/unit/bugfix-test.cxx:92 + void lcl_AssertRectEqualWithTolerance(class std::basic_string_view >,const class tools::Rectangle &,const class tools::Rectangle &,const int) + const int nTolerance + 1 +sc/qa/unit/bugfix-test.cxx:124 + void lcl_AssertPointEqualWithTolerance(class std::basic_string_view >,const class Point,const class Point,const int) + const int nTolerance + 1 +sc/qa/unit/copy_paste_test.cxx:78 + class tools::SvRef ScCopyPasteTest::loadDocAndSetupModelViewController(class std::basic_string_view >,int,_Bool) + int nFormat + 0 +sc/qa/unit/copy_paste_test.cxx:78 + class tools::SvRef ScCopyPasteTest::loadDocAndSetupModelViewController(class std::basic_string_view >,int,_Bool) + _Bool bReadWrite + 1 +sc/qa/unit/copy_paste_test.cxx:453 + enum ScMF lcl_getMergeFlagOfCell(const class ScDocument &,short,int,short) + short nTab + 0 +sc/qa/unit/copy_paste_test.cxx:460 + class ScAddress lcl_getMergeSizeOfCell(const class ScDocument &,short,int,short) + short nTab + 0 +sc/qa/unit/helper/qahelper.hxx:197 + class tools::SvRef ScBootstrapFixture::saveAndReloadPassword(class ScDocShell *,int) + int nFormat + 0 +sc/qa/unit/helper/qahelper.hxx:217 + void testFormats(class ScBootstrapFixture *,class ScDocument *,int) + int nFormat + 0 +sc/qa/unit/mark_test.cxx:129 + void Test::testScMarkArraySearch_check(const class ScMarkArray &,int,_Bool,unsigned long) + _Bool expectStatus + 1 +sc/qa/unit/opencl-test.cxx:509 + _Bool ScOpenCLTest::initTestEnv(class std::basic_string_view >,int,_Bool) + _Bool bReadWrite + 0 +sc/qa/unit/parallelism.cxx:76 + class ScUndoCut * ScParallelismTest::cutToClip(class ScDocShell &,const class ScRange &,class ScDocument *,_Bool) + _Bool bCreateUndo + 0 +sc/qa/unit/subsequent_export-test.cxx:1656 + void setAttribute(class ScFieldEditEngine &,int,int,int,unsigned short,class Color) + int nPara + 0 +sc/qa/unit/subsequent_export-test.cxx:1713 + void setFont(class ScFieldEditEngine &,int,int,int,const class rtl::OUString &) + int nPara + 0 +sc/qa/unit/subsequent_export-test.cxx:1726 + void setEscapement(class ScFieldEditEngine &,int,int,int,short,unsigned char) + int nPara + 0 +sc/qa/unit/ucalc.hxx:50 + void Test::clearSheet(class ScDocument *,short) + short nTab + 0 +sc/source/core/data/dociter.cxx:1278 + void BoolResetter::BoolResetter(_Bool &,_Bool) + _Bool b + 1 +sc/source/core/data/drwlayer.cxx:2254 + void DeleteFirstUserDataOfType(class SdrObject *,unsigned short) + unsigned short nId + 1 +sc/source/core/data/postit.cxx:411 + void (anonymous namespace)::ScNoteCaptionCreator::ScNoteCaptionCreator(class ScDocument &,const class ScAddress &,class ScCaptionPtr &,_Bool) + _Bool bShown + 1 +sc/source/core/inc/interpre.hxx:438 + int ScInterpreter::GetInt32WithDefault(int) + int nDefault + 1 +sc/source/core/opencl/formulagroupcl.cxx:1071 + class std::__cxx11::basic_string, class std::allocator > sc::opencl::(anonymous namespace)::DynamicKernelSlidingArgument::GenSlidingWindowDeclRef(_Bool) const + _Bool nested + 0 +sc/source/core/opencl/opbase.hxx:128 + class std::__cxx11::basic_string, class std::allocator > sc::opencl::DynamicKernelArgument::GenDoubleSlidingWindowDeclRef(_Bool) const + _Bool + 0 +sc/source/core/opencl/opbase.hxx:131 + class std::__cxx11::basic_string, class std::allocator > sc::opencl::DynamicKernelArgument::GenStringSlidingWindowDeclRef(_Bool) const + _Bool + 0 +sc/source/core/tool/compiler.cxx:787 + void (anonymous namespace)::ConventionOOO_A1::ConventionOOO_A1(enum formula::FormulaGrammar::AddressConvention) + enum formula::FormulaGrammar::AddressConvention eConv + 1 +sc/source/filter/excel/xeformula.cxx:389 + void XclExpFmlaCompImpl::ConvertRefData(struct ScComplexRefData &,struct XclRange &,_Bool) const + _Bool bNatLangRef + 0 +sc/source/filter/excel/xeformula.cxx:407 + void XclExpFmlaCompImpl::Append(unsigned char,unsigned long) + unsigned char nData + 0 +sc/source/filter/excel/xeformula.cxx:409 + void XclExpFmlaCompImpl::Append(unsigned int) + unsigned int nData + 0 +sc/source/filter/excel/xeformula.cxx:449 + void XclExpFmlaCompImpl::AppendExt(unsigned char,unsigned long) + unsigned char nData + 0 +sc/source/filter/excel/xihelper.cxx:141 + class std::unique_ptr > lclCreateTextObject(const class XclImpRoot &,const class XclImpString &,enum XclFontItemType,unsigned short) + enum XclFontItemType eType + 1 +sc/source/filter/html/htmlpars.cxx:1617 + type-parameter-?-? getLimitedValue(const type-parameter-?-? &,const type-parameter-?-? &,const type-parameter-?-? &) + const type-parameter-?-? & rMin + 1 +sc/source/filter/inc/addressconverter.hxx:145 + _Bool oox::xls::AddressConverter::parseOoxRange2d(int &,int &,int &,int &,const class rtl::OUString &,int) + int nStart + 0 +sc/source/filter/inc/addressconverter.hxx:234 + _Bool oox::xls::AddressConverter::convertToCellAddress(class ScAddress &,const char *,short,_Bool) + _Bool bTrackOverflow + 1 +sc/source/filter/inc/addressconverter.hxx:245 + class ScAddress oox::xls::AddressConverter::createValidCellAddress(const class rtl::OUString &,short,_Bool) + _Bool bTrackOverflow + 0 +sc/source/filter/inc/addressconverter.hxx:375 + _Bool oox::xls::AddressConverter::convertToCellRange(class ScRange &,const class rtl::OUString &,short,_Bool,_Bool) + _Bool bAllowOverflow + 1 +sc/source/filter/inc/addressconverter.hxx:415 + _Bool oox::xls::AddressConverter::convertToCellRange(class ScRange &,const struct oox::xls::BinRange &,short,_Bool,_Bool) + _Bool bAllowOverflow + 1 +sc/source/filter/inc/addressconverter.hxx:431 + void oox::xls::AddressConverter::validateCellRangeList(class ScRangeList &,_Bool) + _Bool bTrackOverflow + 0 +sc/source/filter/inc/autofilterbuffer.hxx:50 + void oox::xls::ApiFilterSettings::appendField(_Bool,const class std::__debug::vector, class std::allocator > > &) + _Bool bAnd + 1 +sc/source/filter/inc/excrecds.hxx:179 + void XclExpSheetProtection::XclExpSheetProtection(_Bool,short) + _Bool bValue + 1 +sc/source/filter/inc/formel.hxx:100 + enum ConvErr ExcelConverterBase::Convert(class ScRangeListTabs &,class XclImpStream &,unsigned long,short,const enum FORMULA_TYPE) + const enum FORMULA_TYPE eFT + 1 +sc/source/filter/inc/formulabase.hxx:640 + class rtl::OUString oox::xls::FormulaProcessorBase::generateAddress2dString(const class ScAddress &,_Bool) + _Bool bAbsolute + 0 +sc/source/filter/inc/formulabase.hxx:772 + void oox::xls::FormulaProcessorBase::convertStringToStringList(class com::sun::star::uno::Sequence &,char16_t,_Bool) const + _Bool bTrimLeadingSpaces + 1 +sc/source/filter/inc/ftools.hxx:199 + class ScStyleSheet & ScfTools::MakeCellStyleSheet(class ScStyleSheetPool &,const class rtl::OUString &,_Bool) + _Bool bForceName + 1 +sc/source/filter/inc/ftools.hxx:206 + class ScStyleSheet & ScfTools::MakePageStyleSheet(class ScStyleSheetPool &,const class rtl::OUString &,_Bool) + _Bool bForceName + 0 +sc/source/filter/inc/htmlpars.hxx:189 + void ScHTMLLayoutParser::MakeColNoRef(class o3tl::sorted_vector, find_unique, true> *,unsigned short,unsigned short,unsigned short,unsigned short) + unsigned short nWidth + 0 +sc/source/filter/inc/htmlpars.hxx:189 + void ScHTMLLayoutParser::MakeColNoRef(class o3tl::sorted_vector, find_unique, true> *,unsigned short,unsigned short,unsigned short,unsigned short) + unsigned short nOffsetTol + 0 +sc/source/filter/inc/htmlpars.hxx:189 + void ScHTMLLayoutParser::MakeColNoRef(class o3tl::sorted_vector, find_unique, true> *,unsigned short,unsigned short,unsigned short,unsigned short) + unsigned short nWidthTol + 0 +sc/source/filter/inc/tool.h:37 + void SetFormat(struct LotusContext &,short,int,short,unsigned char,unsigned char) + short nTab + 0 +sc/source/filter/inc/workbookhelper.hxx:161 + class com::sun::star::uno::Reference oox::xls::WorkbookHelper::getStyleObject(const class rtl::OUString &,_Bool) const + _Bool bPageStyle + 1 +sc/source/filter/inc/workbookhelper.hxx:200 + class com::sun::star::uno::Reference oox::xls::WorkbookHelper::createStyleObject(class rtl::OUString &,_Bool) const + _Bool bPageStyle + 1 +sc/source/filter/inc/xechart.hxx:196 + void XclExpChFutureRecordBase::XclExpChFutureRecordBase(const class XclExpChRoot &,enum XclFutureRecType,unsigned short,unsigned long) + enum XclFutureRecType eRecType + 1 +sc/source/filter/inc/xechart.hxx:337 + void XclExpChFrameBase::SetDefaultFrameBase(const class XclExpChRoot &,enum XclChFrameType,_Bool) + enum XclChFrameType eDefFrameType + 1 +sc/source/filter/inc/xechart.hxx:365 + void XclExpChFrame::SetAutoFlags(_Bool,_Bool) + _Bool bAutoPos + 0 +sc/source/filter/inc/xechart.hxx:365 + void XclExpChFrame::SetAutoFlags(_Bool,_Bool) + _Bool bAutoSize + 0 +sc/source/filter/inc/xeextlst.hxx:199 + class XclExpExt * XclExtLst::GetItem(enum XclExpExtType) + enum XclExpExtType eType + 0 +sc/source/filter/inc/xehelper.hxx:109 + struct XclAddress XclExpAddressConverter::CreateValidAddress(const class ScAddress &,_Bool) + _Bool bWarn + 0 +sc/source/filter/inc/xehelper.hxx:149 + void XclExpAddressConverter::ValidateRangeList(class ScRangeList &,_Bool) + _Bool bWarn + 0 +sc/source/filter/inc/xehelper.hxx:281 + class std::shared_ptr XclExpStringHelper::CreateCellString(const class XclExpRoot &,const class rtl::OUString &,const class ScPatternAttr *,enum XclStrFlags,unsigned short) + enum XclStrFlags nFlags + 0 +sc/source/filter/inc/xehelper.hxx:297 + class std::shared_ptr XclExpStringHelper::CreateCellString(const class XclExpRoot &,const class EditTextObject &,const class ScPatternAttr *,class XclExpHyperlinkHelper &,enum XclStrFlags,unsigned short) + enum XclStrFlags nFlags + 0 +sc/source/filter/inc/xehelper.hxx:311 + class std::shared_ptr XclExpStringHelper::CreateString(const class XclExpRoot &,const class SdrTextObj &,enum XclStrFlags) + enum XclStrFlags nFlags + 0 +sc/source/filter/inc/xehelper.hxx:320 + class std::shared_ptr XclExpStringHelper::CreateString(const class XclExpRoot &,const class EditTextObject &,enum XclStrFlags) + enum XclStrFlags nFlags + 0 +sc/source/filter/inc/xepivot.hxx:270 + unsigned short XclExpPTField::GetItemIndex(class std::basic_string_view >,unsigned short) const + unsigned short nDefaultIdx + 0 +sc/source/filter/inc/xestream.hxx:300 + void XclExpXmlStream::WriteAttributes(int,type-parameter-?-? &&,type-parameter-?-? &&...) + ###27 + 0 +sc/source/filter/inc/xestring.hxx:78 + void XclExpString::Assign(char16_t) + char16_t cChar + 0 +sc/source/filter/inc/xestring.hxx:107 + void XclExpString::AppendTrailingFormat(unsigned short) + unsigned short nFontIdx + 0 +sc/source/filter/inc/xestring.hxx:145 + unsigned short XclExpString::GetChar(unsigned short) const + unsigned short nCharIdx + 0 +sc/source/filter/inc/xestyle.hxx:223 + unsigned short XclExpFontBuffer::Insert(const class SvxFont &,enum XclExpColorType) + enum XclExpColorType eColorType + 0 +sc/source/filter/inc/xestyle.hxx:229 + unsigned short XclExpFontBuffer::Insert(const class SfxItemSet &,short,enum XclExpColorType,_Bool) + enum XclExpColorType eColorType + 0 +sc/source/filter/inc/xetable.hxx:333 + void XclExpSingleCellBase::XclExpSingleCellBase(unsigned short,unsigned long,const struct XclAddress &,unsigned int) + unsigned long nContSize + 0 +sc/source/filter/inc/xetable.hxx:336 + void XclExpSingleCellBase::XclExpSingleCellBase(const class XclExpRoot &,unsigned short,unsigned long,const struct XclAddress &,const class ScPatternAttr *,short,unsigned int) + short nScript + 1 +sc/source/filter/inc/xiescher.hxx:478 + void XclImpControlHelper::ReadSourceRangeFormula(class XclImpStream &,_Bool) + _Bool bWithBoundSize + 1 +sc/source/filter/inc/xihelper.hxx:69 + class ScAddress XclImpAddressConverter::CreateValidAddress(const struct XclAddress &,short,_Bool) + _Bool bWarn + 0 +sc/source/filter/inc/xipage.hxx:58 + void XclImpPageSettings::SetPaperSize(unsigned short,_Bool) + unsigned short nXclPaperSize + 0 +sc/source/filter/inc/xipage.hxx:58 + void XclImpPageSettings::SetPaperSize(unsigned short,_Bool) + _Bool bPortrait + 0 +sc/source/filter/inc/xladdress.hxx:62 + void XclRange::XclRange(enum ScAddress::Uninitialized) + enum ScAddress::Uninitialized e + 0 +sc/source/filter/inc/xlescher.hxx:293 + class tools::Rectangle XclObjAnchor::GetRect(const class XclRoot &,short,enum MapUnit) const + enum MapUnit eMapUnit + 0 +sc/source/filter/inc/xlformula.hxx:380 + void XclTokenArray::XclTokenArray(_Bool) + _Bool bVolatile + 0 +sc/source/filter/inc/xlformula.hxx:442 + void XclTokenArrayIterator::XclTokenArrayIterator(const class ScTokenArray &,_Bool) + _Bool bSkipSpaces + 1 +sc/source/filter/inc/xlformula.hxx:444 + void XclTokenArrayIterator::XclTokenArrayIterator(const class XclTokenArrayIterator &,_Bool) + _Bool bSkipSpaces + 1 +sc/source/filter/inc/xltools.hxx:64 + void XclGuid::XclGuid(unsigned int,unsigned short,unsigned short,unsigned char,unsigned char,unsigned char,unsigned char,unsigned char,unsigned char,unsigned char,unsigned char) + unsigned char nData43 + 0 +sc/source/filter/inc/xltools.hxx:64 + void XclGuid::XclGuid(unsigned int,unsigned short,unsigned short,unsigned char,unsigned char,unsigned char,unsigned char,unsigned char,unsigned char,unsigned char,unsigned char) + unsigned char nData45 + 0 +sc/source/filter/oox/formulaparser.cxx:463 + struct com::sun::star::sheet::FormulaToken & oox::xls::FormulaParserImpl::getOperandToken(unsigned long,unsigned long) + unsigned long nOpIndex + 0 +sc/source/filter/oox/formulaparser.cxx:463 + struct com::sun::star::sheet::FormulaToken & oox::xls::FormulaParserImpl::getOperandToken(unsigned long,unsigned long) + unsigned long nTokenIndex + 0 +sc/source/filter/xml/XMLChangeTrackingImportHelper.hxx:74 + void ScMyGenerated::ScMyGenerated(class ScBigRange,unsigned int,class std::unique_ptr >) + unsigned int id + 0 +sc/source/filter/xml/XMLExportSharedData.hxx:68 + void ScMySharedData::SetDrawPageHasForms(const int,_Bool) + _Bool bHasForms + 1 +sc/source/ui/dbgui/csvgrid.cxx:58 + void (anonymous namespace)::Func_SetType::Func_SetType(int) + int nType + 0 +sc/source/ui/dbgui/csvgrid.cxx:66 + void (anonymous namespace)::Func_Select::Func_Select(_Bool) + _Bool bSelect + 0 +sc/source/ui/inc/AccessibleDocument.hxx:248 + void ScAccessibleDocument::RemoveChild(const class com::sun::star::uno::Reference &,_Bool) + _Bool bFireEvent + 1 +sc/source/ui/inc/AccessibleEditObject.hxx:55 + void ScAccessibleEditObject::ScAccessibleEditObject(const class com::sun::star::uno::Reference &,class EditView *,class vcl::Window *,const class rtl::OUString &,const class rtl::OUString &,enum ScAccessibleEditObject::EditObjectType) + enum ScAccessibleEditObject::EditObjectType eObjectType + 0 +sc/source/ui/inc/acredlin.hxx:119 + class std::unique_ptr > ScAcceptChgDlg::AppendFilteredAction(const class ScChangeAction *,enum ScChangeActionState,_Bool,const class weld::TreeIter *,_Bool,_Bool) + _Bool bDelMaster + 0 +sc/source/ui/inc/acredlin.hxx:119 + class std::unique_ptr > ScAcceptChgDlg::AppendFilteredAction(const class ScChangeAction *,enum ScChangeActionState,_Bool,const class weld::TreeIter *,_Bool,_Bool) + _Bool bDisabled + 0 +sc/source/ui/inc/anyrefdg.hxx:71 + void ScFormulaReferenceHelper::EnableSpreadsheets(_Bool) + _Bool bFlag + 1 +sc/source/ui/inc/anyrefdg.hxx:144 + void ScRefHdlrControllerImpl::ScRefHdlrControllerImpl(class weld::Window *,const class rtl::OUString &,const class rtl::OString &,const class SfxItemSet *,class SfxBindings *) + class SfxBindings * pB + 0 +sc/source/ui/inc/cliputil.hxx:22 + void PasteFromClipboard(class ScViewData &,class ScTabViewShell *,_Bool) + _Bool bShowDialog + 1 +sc/source/ui/inc/datatransformation.hxx:148 + void sc::NumberTransformation::NumberTransformation(const class std::__debug::set, class std::allocator > &,const enum sc::NUMBER_TRANSFORM_TYPE,int) + const enum sc::NUMBER_TRANSFORM_TYPE rType + 0 +sc/source/ui/inc/dbdocfun.hxx:79 + _Bool ScDBDocFunc::RepeatDB(const class rtl::OUString &,_Bool,_Bool,short) + _Bool bApi + 1 +sc/source/ui/inc/docfunc.hxx:101 + void ScDocFunc::SetValueCells(const class ScAddress &,const class std::__debug::vector > &,_Bool) + _Bool bInteraction + 1 +sc/source/ui/inc/docfunc.hxx:112 + _Bool ScDocFunc::SetFormulaCells(const class ScAddress &,class std::__debug::vector > &,_Bool) + _Bool bInteraction + 1 +sc/source/ui/inc/docfunc.hxx:113 + void ScDocFunc::PutData(const class ScAddress &,class ScEditEngineDefaulter &,_Bool) + _Bool bApi + 1 +sc/source/ui/inc/docfunc.hxx:114 + _Bool ScDocFunc::SetCellText(const class ScAddress &,const class rtl::OUString &,_Bool,_Bool,_Bool,const enum formula::FormulaGrammar::Grammar) + _Bool bApi + 1 +sc/source/ui/inc/docfunc.hxx:120 + void ScDocFunc::SetNoteText(const class ScAddress &,const class rtl::OUString &,_Bool) + _Bool bApi + 0 +sc/source/ui/inc/docfunc.hxx:143 + _Bool ScDocFunc::SetTabBgColor(class std::__debug::vector > &,_Bool) + _Bool bApi + 0 +sc/source/ui/inc/docfunc.hxx:145 + void ScDocFunc::SetTableVisible(short,_Bool,_Bool) + _Bool bApi + 1 +sc/source/ui/inc/docfunc.hxx:178 + _Bool ScDocFunc::FillSimple(const class ScRange &,const class ScMarkData *,enum FillDir,_Bool) + _Bool bApi + 0 +sc/source/ui/inc/docfunc.hxx:187 + _Bool ScDocFunc::FillAuto(class ScRange &,const class ScMarkData *,enum FillDir,enum FillCmd,enum FillDateCmd,unsigned long,double,double,_Bool,_Bool) + _Bool bRecord + 1 +sc/source/ui/inc/drawutil.hxx:31 + void ScDrawUtil::CalcScale(const class ScDocument &,short,short,int,short,int,const class OutputDevice *,const class Fraction &,const class Fraction &,double,double,class Fraction &,class Fraction &) + short nStartCol + 0 +sc/source/ui/inc/drawutil.hxx:31 + void ScDrawUtil::CalcScale(const class ScDocument &,short,short,int,short,int,const class OutputDevice *,const class Fraction &,const class Fraction &,double,double,class Fraction &,class Fraction &) + int nStartRow + 0 +sc/source/ui/inc/pvfundlg.hxx:151 + int ScDPSubtotalOptDlg::FindListBoxEntry(const class weld::ComboBox &,class std::basic_string_view >,int) const + int nStartPos + 1 +sc/source/ui/inc/RegressionDialog.hxx:56 + class rtl::OUString ScRegressionDialog::GetYVariableNameFormula(_Bool) + _Bool bWithLog + 0 +sc/source/ui/inc/spellparam.hxx:36 + void ScConversionParam::ScConversionParam(enum ScConversionType) + enum ScConversionType eConvType + 0 +sc/source/ui/inc/spellparam.hxx:39 + void ScConversionParam::ScConversionParam(enum ScConversionType,struct o3tl::strong_int,int,_Bool) + enum ScConversionType eConvType + 1 +sc/source/ui/inc/spellparam.hxx:39 + void ScConversionParam::ScConversionParam(enum ScConversionType,struct o3tl::strong_int,int,_Bool) + int nOptions + 0 +sc/source/ui/inc/spellparam.hxx:39 + void ScConversionParam::ScConversionParam(enum ScConversionType,struct o3tl::strong_int,int,_Bool) + _Bool bIsInteractive + 1 +sc/source/ui/inc/spellparam.hxx:46 + void ScConversionParam::ScConversionParam(enum ScConversionType,struct o3tl::strong_int,struct o3tl::strong_int,const class vcl::Font &,int,_Bool) + _Bool bIsInteractive + 0 +sc/source/ui/inc/TableFillingAndNavigationTools.hxx:69 + void AddressWalker::push(short,int,short) + short aRelativeTab + 0 +sc/source/ui/inc/tabview.hxx:379 + void ScTabView::ClickCursor(short,int,_Bool) + _Bool bControl + 0 +sc/source/ui/inc/tabview.hxx:420 + void ScTabView::MoveCursorAbs(short,int,enum ScFollowMode,_Bool,_Bool,_Bool,_Bool) + _Bool bControl + 0 +sc/source/ui/inc/tabview.hxx:431 + void ScTabView::MoveCursorScreen(short,int,enum ScFollowMode,_Bool) + short nMovX + 0 +sc/source/ui/inc/tabview.hxx:431 + void ScTabView::MoveCursorScreen(short,int,enum ScFollowMode,_Bool) + enum ScFollowMode eMode + 1 +sc/source/ui/inc/tabview.hxx:431 + void ScTabView::MoveCursorScreen(short,int,enum ScFollowMode,_Bool) + _Bool bShift + 0 +sc/source/ui/inc/undoblk.hxx:322 + void ScUndoSelectionAttr::ScUndoSelectionAttr(class ScDocShell *,const class ScMarkData &,short,int,short,short,int,short,class std::unique_ptr >,_Bool,const class ScPatternAttr *,const class SvxBoxItem *,const class SvxBoxInfoItem *,const class ScRange *) + const class SvxBoxItem * pNewOuter + 0 +sc/source/ui/inc/undoblk.hxx:322 + void ScUndoSelectionAttr::ScUndoSelectionAttr(class ScDocShell *,const class ScMarkData &,short,int,short,short,int,short,class std::unique_ptr >,_Bool,const class ScPatternAttr *,const class SvxBoxItem *,const class SvxBoxInfoItem *,const class ScRange *) + const class SvxBoxInfoItem * pNewInner + 0 +sc/source/ui/inc/undoblk.hxx:322 + void ScUndoSelectionAttr::ScUndoSelectionAttr(class ScDocShell *,const class ScMarkData &,short,int,short,short,int,short,class std::unique_ptr >,_Bool,const class ScPatternAttr *,const class SvxBoxItem *,const class SvxBoxInfoItem *,const class ScRange *) + const class ScRange * pRangeCover + 0 +sc/source/ui/inc/undotab.hxx:119 + void ScUndoRenameTab::ScUndoRenameTab(class ScDocShell *,short,const class rtl::OUString &,const class rtl::OUString &) + short nT + 0 +sc/source/ui/inc/undotab.hxx:199 + void ScUndoTabColor::ScUndoTabColor(class ScDocShell *,short,const class Color &,const class Color &) + short nT + 0 +sc/source/ui/inc/viewdata.hxx:145 + void ScPositionHelper::invalidateByPosition(long) + long nPos + 0 +sc/source/ui/inc/viewdata.hxx:599 + class Point ScViewData::GetScrPos(short,int,enum ScHSplitPos) const + int nWhereY + 0 +sc/source/ui/inc/viewdata.hxx:600 + class Point ScViewData::GetScrPos(short,int,enum ScVSplitPos) const + short nWhereX + 0 +sc/source/ui/inc/viewdata.hxx:676 + void ScViewData::AddPixelsWhileBackward(long &,long,int &,int,double,const class ScDocument *,short) + int nStartRow + 0 +sc/source/ui/inc/viewfunc.hxx:173 + void ScViewFunc::ApplyAttributes(const class SfxItemSet *,const class SfxItemSet *,_Bool) + _Bool bAdjustBlockHeight + 1 +sc/source/ui/inc/viewfunc.hxx:216 + _Bool ScViewFunc::AdjustRowHeight(int,int,_Bool) + _Bool bApi + 1 +sc/source/ui/inc/viewutil.hxx:68 + void ScViewUtil::SetFullScreen(const class SfxViewShell &,_Bool) + _Bool bSet + 0 +sc/source/ui/pagedlg/tptable.cxx:44 + _Bool lcl_PutScaleItem(unsigned short,class SfxItemSet &,const class SfxItemSet &,const class weld::ComboBox &,unsigned short,const class weld::MetricSpinButton &,unsigned short) + unsigned short nLBEntry + 0 +sc/source/ui/pagedlg/tptable.cxx:52 + _Bool lcl_PutScaleItem2(unsigned short,class SfxItemSet &,const class SfxItemSet &,const class weld::ComboBox &,unsigned short,const class weld::SpinButton &,unsigned short,const class weld::SpinButton &,unsigned short) + unsigned short nLBEntry + 1 +sc/source/ui/vba/vbacondition.hxx:43 + int ScVbaCondition::Operator(_Bool) + _Bool _bIncludeFormulaValue + 1 +sc/source/ui/vba/vbaeventshelper.hxx:53 + _Bool ScVbaEventsHelper::isSelectionChanged(const class com::sun::star::uno::Sequence &,int) + int nIndex + 0 +sc/source/ui/vba/vbaeventshelper.hxx:59 + class com::sun::star::uno::Any ScVbaEventsHelper::createWorksheet(const class com::sun::star::uno::Sequence &,int) const + int nIndex + 0 +sc/source/ui/vba/vbaeventshelper.hxx:64 + class com::sun::star::uno::Any ScVbaEventsHelper::createRange(const class com::sun::star::uno::Sequence &,int) const + int nIndex + 0 +sc/source/ui/vba/vbaeventshelper.hxx:69 + class com::sun::star::uno::Any ScVbaEventsHelper::createHyperlink(const class com::sun::star::uno::Sequence &,int) const + int nIndex + 0 +sc/source/ui/vba/vbaeventshelper.hxx:74 + class com::sun::star::uno::Any ScVbaEventsHelper::createWindow(const class com::sun::star::uno::Sequence &,int) const + int nIndex + 0 +sc/source/ui/vba/vbarange.hxx:107 + class com::sun::star::uno::Reference ScVbaRange::getArea(int) + int nIndex + 0 +sc/source/ui/view/olinewin.cxx:730 + _Bool lcl_RotateValue(unsigned long &,unsigned long,unsigned long,_Bool) + unsigned long nMin + 0 +sc/source/ui/view/prevloc.cxx:267 + struct ScPreviewLocationEntry * lcl_GetEntryByAddress(const class std::__debug::list >, class std::allocator > > > &,const class ScAddress &,const enum (anonymous namespace)::ScPreviewLocationType) + const enum (anonymous namespace)::ScPreviewLocationType eType + 0 +sc/source/ui/view/tabview.cxx:2447 + void (anonymous namespace)::ScRangeProvider::ScRangeProvider(const class tools::Rectangle &,_Bool,class ScViewData &) + _Bool bInPixels + 0 +scaddins/source/analysis/analysishelper.hxx:69 + int GetDiffDate360(const class com::sun::star::uno::Reference &,int,int,_Bool) + _Bool bUSAMethod + 1 +scaddins/source/analysis/analysishelper.hxx:83 + int GetDaysInYear(int,int,int) + int nNullDate + 0 +scaddins/source/analysis/analysishelper.hxx:83 + int GetDaysInYear(int,int,int) + int nDate + 0 +scaddins/source/analysis/analysishelper.hxx:262 + void sca::analysis::SortedIndividualInt32List::InsertHolidayList(const class sca::analysis::ScaAnyConverter &,const class com::sun::star::uno::Any &,int,_Bool) + _Bool bInsertOnWeekend + 0 +scaddins/source/analysis/analysishelper.hxx:900 + int sca::analysis::ScaAnyConverter::getInt32(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Any &,int) + int nDefault + 0 +sd/inc/CustomAnimationEffect.hxx:129 + class com::sun::star::uno::Any sd::CustomAnimationEffect::getProperty(int,class std::basic_string_view >,enum sd::EValue) + enum sd::EValue eValue + 0 +sd/inc/CustomAnimationEffect.hxx:130 + _Bool sd::CustomAnimationEffect::setProperty(int,class std::basic_string_view >,enum sd::EValue,const class com::sun::star::uno::Any &) + enum sd::EValue eValue + 0 +sd/inc/CustomAnimationEffect.hxx:132 + class com::sun::star::uno::Any sd::CustomAnimationEffect::getTransformationProperty(int,enum sd::EValue) + enum sd::EValue eValue + 1 +sd/inc/CustomAnimationEffect.hxx:133 + _Bool sd::CustomAnimationEffect::setTransformationProperty(int,enum sd::EValue,const class com::sun::star::uno::Any &) + enum sd::EValue eValue + 1 +sd/inc/shapelist.hxx:56 + void sd::ShapeList::seekShape(unsigned int) + unsigned int nIndex + 0 +sd/qa/unit/sdmodeltestbase.hxx:422 + class com::sun::star::uno::Reference SdModelTestBase::getTextFieldFromPage(int,int,int,int,class tools::SvRef) + int nRun + 0 +sd/qa/unit/sdmodeltestbase.hxx:422 + class com::sun::star::uno::Reference SdModelTestBase::getTextFieldFromPage(int,int,int,int,class tools::SvRef) + int nPara + 0 +sd/qa/unit/tiledrendering/LOKitSearchTest.cxx:865 + class rtl::OUString getShapeText(class SdXImpressDocument *,unsigned int,unsigned int) + unsigned int nShape + 0 +sd/qa/unit/uiimpress.cxx:63 + void SdUiImpressTest::insertStringToObject(unsigned short,const class std::__cxx11::basic_string, class std::allocator > &) + unsigned short nObj + 0 +sd/source/filter/eppt/epptbase.hxx:393 + unsigned int PPTWriterBase::GetMasterIndex(enum PageType) + enum PageType ePageType + 0 +sd/source/filter/eppt/pptexanimations.hxx:95 + void ppt::AnimationExporter::exportNode(class SvStream &,const class com::sun::star::uno::Reference &,const unsigned short,const unsigned short,const int,const _Bool,const short) + const unsigned short nInstance + 1 +sd/source/filter/eppt/text.hxx:106 + void FieldEntry::FieldEntry(unsigned int,unsigned int,unsigned int) + unsigned int nStart + 0 +sd/source/filter/ppt/pptinanimations.hxx:99 + void ppt::AnimationImporter::dump_atom_header(const class ppt::Atom *,_Bool,_Bool) + _Bool bAppend + 0 +sd/source/filter/ppt/pptinanimations.hxx:100 + void ppt::AnimationImporter::dump_atom(const class ppt::Atom *,_Bool) + _Bool bNewLine + 1 +sd/source/ui/inc/DrawDocShell.hxx:63 + void sd::DrawDocShell::DrawDocShell(enum SfxModelFlags,_Bool,enum DocumentType) + _Bool bSdDataObj + 0 +sd/source/ui/inc/DrawDocShell.hxx:68 + void sd::DrawDocShell::DrawDocShell(class SdDrawDocument *,enum SfxObjectCreateMode,_Bool,enum DocumentType) + enum SfxObjectCreateMode eMode + 0 +sd/source/ui/inc/DrawDocShell.hxx:68 + void sd::DrawDocShell::DrawDocShell(class SdDrawDocument *,enum SfxObjectCreateMode,_Bool,enum DocumentType) + _Bool bSdDataObj + 1 +sd/source/ui/inc/DrawViewShell.hxx:89 + void sd::DrawViewShell::DrawViewShell(class sd::ViewShellBase &,class vcl::Window *,enum PageKind,class sd::FrameView *) + enum PageKind ePageKind + 0 +sd/source/ui/inc/navigatr.hxx:108 + void SdNavigatorWin::SdNavigatorWin(class weld::Widget *,class SfxBindings *,class SfxNavigator *) + class SfxNavigator * pNavigatorDlg + 0 +sd/source/ui/inc/RemoteServer.hxx:39 + void sd::ClientInfo::ClientInfo(const class rtl::OUString &,const _Bool) + const _Bool bIsAlreadyAuthorised + 0 +sd/source/ui/inc/slideshow.hxx:147 + void sd::SlideShow::pause(_Bool) + _Bool bPause + 0 +sd/source/ui/inc/ToolBarManager.hxx:225 + void sd::ToolBarManager::SetToolBarShell(enum sd::ToolBarManager::ToolBarGroup,enum ToolbarId) + enum sd::ToolBarManager::ToolBarGroup eGroup + 1 +sd/source/ui/inc/tools/ConfigurationAccess.hxx:57 + void sd::tools::ConfigurationAccess::ConfigurationAccess(const class com::sun::star::uno::Reference &,const class rtl::OUString &,const enum sd::tools::ConfigurationAccess::WriteMode) + const enum sd::tools::ConfigurationAccess::WriteMode eMode + 1 +sd/source/ui/inc/unomodel.hxx:130 + void SdXImpressDocument::SdXImpressDocument(class SdDrawDocument *,_Bool) + _Bool bClipBoard + 1 +sd/source/ui/inc/View.hxx:171 + _Bool sd::View::IsPresObjSelected(_Bool,_Bool,_Bool,_Bool) const + _Bool bOnMasterPage + 1 +sd/source/ui/slidesorter/cache/SlsBitmapCache.cxx:43 + void sd::slidesorter::cache::BitmapCache::CacheEntry::CacheEntry(int,_Bool) + _Bool bIsPrecious + 1 +sdext/source/minimizer/configurationaccess.hxx:90 + short ConfigurationAccess::GetConfigProperty(const enum PPPOptimizerTokenEnum,const short) const + const short nDefault + 0 +sdext/source/minimizer/informationdialog.hxx:29 + class rtl::OUString InsertFixedText(class UnoDialog &,const class rtl::OUString &,const class rtl::OUString &,int,int,int,int,_Bool,short) + _Bool bMultiLine + 1 +sdext/source/minimizer/informationdialog.hxx:29 + class rtl::OUString InsertFixedText(class UnoDialog &,const class rtl::OUString &,const class rtl::OUString &,int,int,int,int,_Bool,short) + short nTabIndex + 0 +sdext/source/minimizer/informationdialog.hxx:32 + class rtl::OUString InsertImage(class UnoDialog &,const class rtl::OUString &,const class rtl::OUString &,int,int,int,int,_Bool) + _Bool bScale + 0 +sdext/source/minimizer/informationdialog.hxx:35 + class rtl::OUString InsertCheckBox(class UnoDialog &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,int,int,int,short) + short nTabIndex + 1 +sdext/source/minimizer/optimizerdialogcontrols.cxx:91 + class rtl::OUString InsertButton(class OptimizerDialog &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,int,int,int,short,_Bool,enum PPPOptimizerTokenEnum,enum com::sun::star::awt::PushButtonType) + enum com::sun::star::awt::PushButtonType nPushButtonType + 0 +sdext/source/minimizer/optimizerdialogcontrols.cxx:200 + class rtl::OUString InsertFormattedField(class OptimizerDialog &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,int,int,double,double,short) + double fEffectiveMin + 0 +sdext/source/minimizer/optimizerdialogcontrols.cxx:248 + class rtl::OUString InsertComboBox(class OptimizerDialog &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const _Bool,const class com::sun::star::uno::Sequence &,int,int,short) + const _Bool bEnabled + 1 +sdext/source/minimizer/optimizerdialogcontrols.cxx:326 + class rtl::OUString InsertListBox(class OptimizerDialog &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const _Bool,const class com::sun::star::uno::Sequence &,int,int,int,short) + const _Bool bEnabled + 1 +sdext/source/pdfimport/wrapper/wrapper.cxx:971 + oslFileError pdfi::(anonymous namespace)::Buffering::read(char *,short,unsigned long *) + short count + 1 +sdext/source/presenter/PresenterTextView.hxx:231 + void sdext::presenter::PresenterTextView::SetOffset(const double,const double) + const double nLeft + 0 +sfx2/source/inc/workwin.hxx:275 + void SfxWorkWindow::SetChildWindowVisible_Impl(unsigned int,_Bool,enum SfxVisibilityFlags) + _Bool + 1 +slideshow/source/engine/opengl/Operation.hxx:226 + class std::shared_ptr makeSEllipseTranslate(double,double,double,double,_Bool,double,double) + _Bool bInter + 1 +slideshow/source/engine/opengl/Operation.hxx:226 + class std::shared_ptr makeSEllipseTranslate(double,double,double,double,_Bool,double,double) + double T0 + 0 +slideshow/source/engine/opengl/Operation.hxx:226 + class std::shared_ptr makeSEllipseTranslate(double,double,double,double,_Bool,double,double) + double T1 + 1 +slideshow/source/engine/opengl/Operation.hxx:262 + class std::shared_ptr makeRotateAndScaleDepthByHeight(const struct glm::vec<3, float, glm::packed_highp> &,const struct glm::vec<3, float, glm::packed_highp> &,double,_Bool,_Bool,double,double) + _Bool bScale + 1 +slideshow/source/engine/opengl/Operation.hxx:262 + class std::shared_ptr makeRotateAndScaleDepthByHeight(const struct glm::vec<3, float, glm::packed_highp> &,const struct glm::vec<3, float, glm::packed_highp> &,double,_Bool,_Bool,double,double) + _Bool bInter + 1 +slideshow/source/engine/slide/layer.hxx:219 + void slideshow::internal::Layer::Layer(enum slideshow::internal::Layer::Dummy) + enum slideshow::internal::Layer::Dummy eFlag + 0 +slideshow/source/engine/transitions/spiralwipe.hxx:33 + void slideshow::internal::SpiralWipe::SpiralWipe(int,_Bool) + _Bool flipOnYAxis + 0 +slideshow/source/inc/animationfactory.hxx:108 + class std::shared_ptr createPairPropertyAnimation(const class std::shared_ptr &,const class std::shared_ptr &,const class basegfx::B2DVector &,short,int) + int nFlags + 0 +slideshow/source/inc/animationfactory.hxx:128 + class std::shared_ptr createPathMotionAnimation(const class rtl::OUString &,short,const class std::shared_ptr &,const class std::shared_ptr &,const class basegfx::B2DVector &,const class std::shared_ptr &,int) + int nFlags + 0 +slideshow/source/inc/animationfactory.hxx:136 + class std::shared_ptr createPhysicsAnimation(const class std::shared_ptr &,const double,const class std::shared_ptr &,const class basegfx::B2DVector &,const class basegfx::B2DVector &,const double,const double,int) + int nFlags + 0 +slideshow/source/inc/box2dtools.hxx:231 + void box2d::utils::box2DWorld::queueAngularVelocityUpdate(const class com::sun::star::uno::Reference &,const double,const int) + const int nDelayForSteps + 1 +starmath/inc/cfgitem.hxx:88 + class rtl::OUString SmFontFormatList::GetFontFormatId(const struct SmFontFormat &,_Bool) + _Bool bAdd + 1 +starmath/inc/mathml/mathmlimport.hxx:55 + void SmXMLImportWrapper::useHTMLMLEntities(_Bool) + _Bool bUseHTMLMLEntities + 1 +starmath/inc/rect.hxx:174 + class SmRect & SmRect::ExtendBy(const class SmRect &,enum RectCopyMBL,_Bool) + enum RectCopyMBL eCopyMode + 0 +starmath/inc/rect.hxx:174 + class SmRect & SmRect::ExtendBy(const class SmRect &,enum RectCopyMBL,_Bool) + _Bool bKeepVerAlignParams + 1 +store/source/object.hxx:55 + type-parameter-?-? * query(class store::OStoreObject *,type-parameter-?-? *) + type-parameter-?-? * + 0 +svl/source/crypto/cryptosign.cxx:394 + enum _SECStatus my_SEC_StringToOID(struct SECItemStr *,const char *,unsigned int) + unsigned int len + 0 +svl/source/crypto/cryptosign.cxx:487 + struct NSSCMSAttributeStr * my_NSS_CMSAttributeArray_FindAttrByOidTag(struct NSSCMSAttributeStr **,SECOidTag,int) + int only + 0 +svl/source/crypto/cryptosign.cxx:1643 + struct NSSCMSAttributeStr * CMSAttributeArray_FindAttrByOidData(struct NSSCMSAttributeStr **,const struct SECOidDataStr *,int) + int only + 1 +svl/source/crypto/cryptosign.cxx:1682 + enum _SECStatus StringToOID(struct SECItemStr *,const char *,unsigned int) + unsigned int len + 0 +svl/source/numbers/zforfind.hxx:241 + _Bool ImpSvNumberInputScan::StringPtrContains(const class rtl::OUString &,const char16_t *,int) + int nPos + 0 +svl/source/numbers/zforfind.hxx:394 + _Bool ImpSvNumberInputScan::IsDatePatternNumberOfType(unsigned short,char16_t) + unsigned short nNumber + 0 +svl/source/passwordcontainer/passwordcontainer.hxx:149 + void NamePassRecord::RemovePasswords(signed char) + signed char nStatus + 1 +svtools/source/control/valueimp.hxx:213 + void ValueItemAcc::FireAccessibleEvent(short,const class com::sun::star::uno::Any &,const class com::sun::star::uno::Any &) + short nEventId + 1 +svx/inc/sdginitm.hxx:34 + void SdrGrafInvertItem::SdrGrafInvertItem(_Bool) + _Bool bInvert + 0 +svx/inc/sxmtaitm.hxx:30 + void SdrMeasureTextAutoAngleItem::SdrMeasureTextAutoAngleItem(_Bool) + _Bool bOn + 1 +svx/inc/xftshtit.hxx:33 + void XFormTextShadowTranspItem::XFormTextShadowTranspItem(unsigned short) + unsigned short nShdwTransparence + 0 +svx/qa/unit/classicshapes.cxx:34 + class com::sun::star::uno::Reference (anonymous namespace)::ClassicshapesTest::getShape(unsigned char,unsigned char) + unsigned char nShapeIndex + 0 +svx/source/customshapes/EnhancedCustomShape3d.cxx:129 + enum com::sun::star::drawing::ShadeMode GetShadeMode(const class SdrCustomShapeGeometryItem &,const enum com::sun::star::drawing::ShadeMode) + const enum com::sun::star::drawing::ShadeMode eDefault + 0 +svx/source/customshapes/EnhancedCustomShape3d.cxx:138 + _Bool GetBool(const class SdrCustomShapeGeometryItem &,const class rtl::OUString &,const _Bool) + const _Bool bDefault + 0 +svx/source/dialog/srchdlg.cxx:745 + void (anonymous namespace)::ToggleSaveToModule::ToggleSaveToModule(class SvxSearchDialog &,_Bool) + _Bool bValue + 0 +svx/source/gallery2/galbrws1.hxx:87 + void GalleryBrowser1::SelectTheme(unsigned short) + unsigned short nThemePos + 0 +svx/source/inc/celltypes.hxx:58 + void sdr::table::RangeIterator::RangeIterator(const type-parameter-?-? &,const type-parameter-?-? &,_Bool) + const type-parameter-?-? & rStart + 0 +svx/source/inc/fmexpl.hxx:497 + signed char svxform::NavigatorTree::implExecuteDataTransfer(const class svxform::OControlTransferData &,signed char,const class Point &,_Bool) + _Bool _bDnD + 1 +svx/source/inc/fmshimp.hxx:256 + void FmXFormShell::didPrepareClose_Lock(_Bool) + _Bool bDid + 1 +svx/source/inc/fmvwimp.hxx:267 + _Bool FmXFormView::createControlLabelPair(const class OutputDevice &,int,int,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,enum SdrObjKind,class std::basic_string_view >,class std::unique_ptr &,class std::unique_ptr &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,const class rtl::OUString &,const int) + int _nXOffsetMM + 0 +svx/source/svdraw/svdoole2.cxx:629 + void SdrOle2ObjImpl::SdrOle2ObjImpl(_Bool,const class svt::EmbeddedObjectRef &) + _Bool bFrame + 0 +svx/source/tbxctrls/tbcontrl.cxx:144 + void (anonymous namespace)::SvxStyleBox_Base::insert_separator(int,const class rtl::OUString &) + int pos + 1 +sw/inc/authfld.hxx:167 + class rtl::OUString SwAuthorityField::ExpandCitation(enum ToxAuthorityField,const class SwRootFrame *) const + const class SwRootFrame * pLayout + 0 +sw/inc/calc.hxx:116 + void SwSbxValue::SwSbxValue(long) + long n + 0 +sw/inc/charfmt.hxx:30 + void SwCharFormat::SwCharFormat(class SwAttrPool &,const char *,class SwCharFormat *) + class SwCharFormat * pDerivedFrom + 0 +sw/inc/crsrsh.hxx:560 + _Bool SwCursorShell::GotoMark(const class sw::mark::IMark *const,_Bool) + _Bool bAtStart + 1 +sw/inc/crsrsh.hxx:824 + void SwCursorShell::FireSectionChangeEvent(unsigned short,unsigned short) + unsigned short nNewSection + 1 +sw/inc/crsrsh.hxx:825 + void SwCursorShell::FireColumnChangeEvent(unsigned short,unsigned short) + unsigned short nNewColumn + 1 +sw/inc/dbfld.hxx:83 + void SwDBField::ChgValue(double,_Bool) + _Bool bVal + 1 +sw/inc/doc.hxx:998 + void SwDoc::CorrAbs(const class SwNodeIndex &,const struct SwPosition &,const int,_Bool) + _Bool bMoveCursor + 1 +sw/inc/doc.hxx:1012 + void SwDoc::CorrAbs(const class SwPaM &,const struct SwPosition &,_Bool) + _Bool bMoveCursor + 1 +sw/inc/doc.hxx:1018 + void SwDoc::CorrRel(const class SwNodeIndex &,const struct SwPosition &,const int,_Bool) + const int nOffset + 0 +sw/inc/doc.hxx:1057 + void SwDoc::SetCounted(const class SwPaM &,_Bool,const class SwRootFrame *) + _Bool bCounted + 1 +sw/inc/doc.hxx:1126 + const class SwNumRule * SwDoc::SearchNumRule(const struct SwPosition &,const _Bool,const _Bool,const _Bool,int,class rtl::OUString &,const class SwRootFrame *,const _Bool) + const _Bool bForward + 0 +sw/inc/doc.hxx:1126 + const class SwNumRule * SwDoc::SearchNumRule(const struct SwPosition &,const _Bool,const _Bool,const _Bool,int,class rtl::OUString &,const class SwRootFrame *,const _Bool) + const _Bool bOutline + 0 +sw/inc/doc.hxx:1420 + const class SvNumberFormatter * SwDoc::GetNumberFormatter(_Bool) const + _Bool bCreate + 1 +sw/inc/doc.hxx:1635 + void SwDoc::dumpAsXml(struct _xmlTextWriter *) const + struct _xmlTextWriter * + 0 +sw/inc/docary.hxx:296 + _Bool SwExtraRedlineTable::DeleteTableRowRedline(class SwDoc *,const class SwTableLine &,_Bool,enum RedlineType) + _Bool bSaveInUndo + 1 +sw/inc/docary.hxx:297 + _Bool SwExtraRedlineTable::DeleteTableCellRedline(class SwDoc *,const class SwTableBox &,_Bool,enum RedlineType) + _Bool bSaveInUndo + 1 +sw/inc/docufld.hxx:287 + void SwHiddenTextFieldType::SwHiddenTextFieldType(_Bool) + _Bool bSetHidden + 1 +sw/inc/docufld.hxx:312 + void SwHiddenTextField::SwHiddenTextField(class SwHiddenTextFieldType *,_Bool,const class rtl::OUString &,const class rtl::OUString &,_Bool,enum SwFieldTypesEnum) + _Bool bConditional + 1 +sw/inc/docufld.hxx:312 + void SwHiddenTextField::SwHiddenTextField(class SwHiddenTextFieldType *,_Bool,const class rtl::OUString &,const class rtl::OUString &,_Bool,enum SwFieldTypesEnum) + _Bool bHidden + 0 +sw/inc/docufld.hxx:529 + void SwDocInfoField::SwDocInfoField(class SwDocInfoFieldType *,unsigned short,const class rtl::OUString &,const class rtl::OUString &,unsigned int) + unsigned int nFormat + 0 +sw/inc/fesh.hxx:420 + const class SwFrameFormat * SwFEShell::GetFlyNum(unsigned long,enum FlyCntType,_Bool) const + enum FlyCntType eType + 1 +sw/inc/fesh.hxx:420 + const class SwFrameFormat * SwFEShell::GetFlyNum(unsigned long,enum FlyCntType,_Bool) const + _Bool bIgnoreTextBoxes + 0 +sw/inc/fesh.hxx:422 + class std::__debug::vector > SwFEShell::GetFlyFrameFormats(enum FlyCntType,_Bool) + _Bool bIgnoreTextBoxes + 1 +sw/inc/fmtcol.hxx:74 + void SwTextFormatColl::SwTextFormatColl(class SwAttrPool &,const char *,class SwTextFormatColl *,unsigned short) + class SwTextFormatColl * pDerFrom + 0 +sw/inc/fmtcol.hxx:171 + void SwGrfFormatColl::SwGrfFormatColl(class SwAttrPool &,const char *,class SwGrfFormatColl *) + class SwGrfFormatColl * pDerFrom + 0 +sw/inc/frmfmt.hxx:86 + void SwFrameFormat::SwFrameFormat(class SwAttrPool &,const char *,class SwFrameFormat *,unsigned short,const unsigned short *) + const unsigned short * pWhichRange + 0 +sw/inc/IDocumentMarkAccess.hxx:100 + class IDocumentMarkAccess::iterator IDocumentMarkAccess::iterator::operator-(long) const + ###1 + 1 +sw/inc/IDocumentMarkAccess.hxx:346 + class sw::mark::IMark * IDocumentMarkAccess::makeAnnotationBookmark(const class SwPaM &,const class rtl::OUString &,enum IDocumentMarkAccess::MarkType,enum sw::mark::InsertMode,const struct SwPosition *) + enum sw::mark::InsertMode eMode + 0 +sw/inc/IDocumentMarkAccess.hxx:346 + class sw::mark::IMark * IDocumentMarkAccess::makeAnnotationBookmark(const class SwPaM &,const class rtl::OUString &,enum IDocumentMarkAccess::MarkType,enum sw::mark::InsertMode,const struct SwPosition *) + const struct SwPosition * pSepPos + 0 +sw/inc/IDocumentRedlineAccess.hxx:194 + _Bool IDocumentRedlineAccess::RejectRedline(unsigned long,_Bool) + _Bool bCallDelete + 1 +sw/inc/IDocumentUndoRedo.hxx:209 + unsigned long IDocumentUndoRedo::GetUndoActionCount(const _Bool) const + const _Bool bCurrentLevel + 1 +sw/inc/index.hxx:62 + int SwIndex::operator--(int) + ###1 + 0 +sw/inc/ndgrf.hxx:64 + void SwGrfNode::SwGrfNode(const class SwNodeIndex &,const class GraphicObject &,class SwGrfFormatColl *,const class SwAttrSet *) + const class SwAttrSet * pAutoAttr + 0 +sw/inc/ndindex.hxx:83 + unsigned long SwNodeIndex::operator++(int) + ###1 + 0 +sw/inc/ndindex.hxx:84 + unsigned long SwNodeIndex::operator--(int) + ###1 + 0 +sw/inc/ndindex.hxx:140 + void SwNodeRange::SwNodeRange(class SwNodes &,unsigned long,unsigned long) + unsigned long nEndIdx + 0 +sw/inc/ndole.hxx:96 + void SwOLENode::SwOLENode(const class SwNodeIndex &,const class svt::EmbeddedObjectRef &,class SwGrfFormatColl *,const class SwAttrSet *) + const class SwAttrSet * pAutoAttr + 0 +sw/inc/ndtxt.hxx:323 + void SwTextNode::CopyText(class SwTextNode *const,const class SwIndex &,const int,const _Bool) + const _Bool bForceCopyOfAllAttrs + 1 +sw/inc/ndtxt.hxx:693 + _Bool SwTextNode::CopyExpandText(class SwTextNode &,const class SwIndex *,int,int,const class SwRootFrame *,_Bool,_Bool,_Bool) const + _Bool bWithNum + 0 +sw/inc/ndtxt.hxx:703 + int SwTextNode::GetDropLen(int) const + int nWishLen + 0 +sw/inc/pam.hxx:149 + void SwPaM::SwPaM(const class SwNodeIndex &,const class SwNodeIndex &,long,long,class SwPaM *) + class SwPaM * pRing + 0 +sw/inc/pam.hxx:153 + void SwPaM::SwPaM(const class SwNodeIndex &,int,const class SwNodeIndex &,int,class SwPaM *) + class SwPaM * pRing + 0 +sw/inc/pam.hxx:158 + void SwPaM::SwPaM(const class SwNodeIndex &,int,class SwPaM *) + class SwPaM * pRing + 0 +sw/inc/shellio.hxx:514 + void SwWriter::SwWriter(class SvStream &,class SwCursorShell &,_Bool) + _Bool bWriteAll + 0 +sw/inc/shellio.hxx:516 + void SwWriter::SwWriter(class SvStream &,class SwPaM &,_Bool) + _Bool bWriteAll + 0 +sw/inc/shellio.hxx:520 + void SwWriter::SwWriter(class SfxMedium &,class SwCursorShell &,_Bool) + _Bool bWriteAll + 1 +sw/inc/swabstdlg.hxx:298 + void AbstractSwSelGlossaryDlg::SelectEntryPos(int) + int nIdx + 0 +sw/inc/swcrsr.hxx:124 + unsigned long SwCursor::FindFormat(const class SwTextFormatColl &,enum SwDocPositions,enum SwDocPositions,_Bool &,enum FindRanges,const class SwTextFormatColl *,const class SwRootFrame *const) + const class SwRootFrame *const pLayout + 0 +sw/inc/swcrsr.hxx:151 + _Bool SwCursor::SelectWordWT(const class SwViewShell *,short,const class Point *) + short nWordType + 1 +sw/inc/swmodule.hxx:159 + void SwModule::ApplyRulerMetric(enum FieldUnit,_Bool,_Bool) + _Bool bWeb + 0 +sw/inc/undobj.hxx:325 + void SwUndoInsLayFormat::SwUndoInsLayFormat(class SwFrameFormat *,unsigned long,int) + unsigned long nNodeIdx + 0 +sw/inc/undobj.hxx:325 + void SwUndoInsLayFormat::SwUndoInsLayFormat(class SwFrameFormat *,unsigned long,int) + int nCntIdx + 0 +sw/inc/undobj.hxx:348 + void SwUndoDelLayFormat::ChgShowSel(_Bool) + _Bool bNew + 0 +sw/inc/unocrsrhelper.hxx:157 + void SetPropertyValue(class SwPaM &,const class SfxItemPropertySet &,const class rtl::OUString &,const class com::sun::star::uno::Any &,const enum SetAttrMode) + const enum SetAttrMode nAttrMode + 0 +sw/qa/extras/ooxmlimport/ooxmlimport.cxx:96 + void FailTest::executeImportTest(const char *,const char *) + const char * + 0 +sw/qa/extras/ooxmlimport/ooxmlimport.cxx:749 + void lcl_countTextFrames(const class com::sun::star::uno::Reference &,int) + int nExpected + 1 +sw/qa/inc/swmodeltestbase.hxx:179 + void SwModelTestBase::executeImportTest(const char *,const char *) + const char * pPassword + 0 +sw/qa/inc/swmodeltestbase.hxx:193 + void SwModelTestBase::executeLoadReloadVerify(const char *,const char *) + const char * pPassword + 0 +sw/qa/inc/swmodeltestbase.hxx:201 + void SwModelTestBase::executeImportExport(const char *,const char *) + const char * pPassword + 0 +sw/source/core/access/accmap.cxx:455 + void SwAccessibleEvent_Impl::SwAccessibleEvent_Impl(enum SwAccessibleEvent_Impl::EventType,class SwAccessibleContext *,const class sw::access::SwAccessibleChild &,const enum AccessibleStates) + enum SwAccessibleEvent_Impl::EventType eT + 0 +sw/source/core/crsr/swcrsr.cxx:72 + void (anonymous namespace)::PercentHdl::PercentHdl(unsigned long,unsigned long,class SwDocShell *) + unsigned long nStt + 0 +sw/source/core/doc/doccomp.cxx:156 + void (anonymous namespace)::CompareMainText::CompareMainText(class SwDoc &,_Bool) + _Bool bRecordDiff + 0 +sw/source/core/inc/drawfont.hxx:107 + void SwDrawTextInfo::SwDrawTextInfo(const class SwViewShell *,class OutputDevice &,const class rtl::OUString &,const int,const int,unsigned short,_Bool) + unsigned short nWidth + 0 +sw/source/core/inc/drawfont.hxx:107 + void SwDrawTextInfo::SwDrawTextInfo(const class SwViewShell *,class OutputDevice &,const class rtl::OUString &,const int,const int,unsigned short,_Bool) + _Bool bBullet + 0 +sw/source/core/inc/ftnfrm.hxx:55 + class SwFootnoteFrame * SwFootnoteContFrame::AppendChained(class SwFrame *,_Bool) + _Bool bDefaultFormat + 1 +sw/source/core/inc/ftnfrm.hxx:56 + class SwFootnoteFrame * SwFootnoteContFrame::PrependChained(class SwFrame *,_Bool) + _Bool bDefaultFormat + 0 +sw/source/core/inc/rolbck.hxx:400 + void SwHistory::CopyAttr(const class SwpHints *,const unsigned long,const int,const int,const _Bool) + const int nStart + 0 +sw/source/core/inc/scriptinfo.hxx:388 + enum SwFontScript SwScriptInfo::WhichFont(int,const class rtl::OUString &) + int nIdx + 0 +sw/source/core/inc/swfont.hxx:287 + const class rtl::OUString & SwFont::GetName(const enum SwFontScript) const + const enum SwFontScript nWhich + 0 +sw/source/core/inc/txmsrt.hxx:113 + class rtl::OUString SwTOXInternational::ToUpper(const class rtl::OUString &,int) const + int nPos + 0 +sw/source/core/inc/UndoDelete.hxx:68 + void SwUndoDelete::SwUndoDelete(class SwPaM &,_Bool,_Bool) + _Bool bCalledByTableCpy + 0 +sw/source/core/inc/UndoTable.hxx:254 + void SwUndoTableNumFormat::SwUndoTableNumFormat(const class SwTableBox &,const class SfxItemSet *) + const class SfxItemSet * pNewSet + 0 +sw/source/core/inc/wrong.hxx:347 + void SwWrongList::InsertSubList(int,int,unsigned short,class SwWrongList *) + int nNewLen + 1 +sw/source/core/txtnode/txtedt.cxx:180 + _Bool lcl_MaskRedlinesAndHiddenText(const class SwTextNode &,class rtl::OUStringBuffer &,int,int,const char16_t) + int nStt + 0 +sw/source/core/undo/untbl.cxx:2174 + void (anonymous namespace)::RedlineFlagsInternGuard::RedlineFlagsInternGuard(class SwDoc &,enum RedlineFlags,enum RedlineFlags) + enum RedlineFlags eNewRedlineFlags + 0 +sw/source/filter/html/htmltab.cxx:480 + unsigned short HTMLTable::GetBottomCellSpace(unsigned short,unsigned short) const + unsigned short nRowSpan + 1 +sw/source/filter/html/htmltab.cxx:496 + class SwTableLine * HTMLTable::MakeTableLine(class SwTableBox *,unsigned short,unsigned short,unsigned short,unsigned short) + unsigned short nLeftCol + 0 +sw/source/filter/html/swhtml.hxx:834 + void SwHTMLParser::BuildTableCell(class HTMLTable *,_Bool,_Bool) + _Bool bReadOptions + 1 +sw/source/filter/html/wrthtml.hxx:471 + void SwHTMLWriter::OutBackground(const class SfxItemSet &,_Bool) + _Bool bGraphic + 0 +sw/source/filter/inc/fltshell.hxx:317 + void ImportProgress::ImportProgress(class SwDocShell *,long,long) + long nStartVal + 0 +sw/source/filter/inc/wrtswtbl.hxx:281 + unsigned short SwWriteTable::GetRelWidth(unsigned short,unsigned short) const + unsigned short nColSpan + 1 +sw/source/filter/ww8/docxattributeoutput.hxx:737 + void DocxAttributeOutput::CmdEndField_Impl(const class SwTextNode *,int,_Bool) + _Bool bWriteRun + 1 +sw/source/filter/ww8/needed_cast.hxx:27 + type-parameter-?-? checking_cast(type-parameter-?-?,type-parameter-?-?) + type-parameter-?-? + 0 +sw/source/filter/ww8/writerwordglue.cxx:330 + void myImplHelpers::(anonymous namespace)::IfBeforeStart::IfBeforeStart(int) + int nStart + 0 +sw/source/filter/ww8/wrtww8.hxx:181 + void WW8_SepInfo::WW8_SepInfo(const class SwPageDesc *,const class SwSectionFormat *,unsigned long,class std::optional,const class SwNode *,_Bool) + _Bool bIsFirstPara + 0 +sw/source/filter/ww8/wrtww8.hxx:641 + void MSWordExportBase::OutputItemSet(const class SfxItemSet &,_Bool,_Bool,unsigned short,_Bool) + unsigned short nScript + 1 +sw/source/filter/ww8/wrtww8.hxx:890 + void MSWordExportBase::NearestAnnotationMark(int &,const int,_Bool) + _Bool bNextPositionOnly + 0 +sw/source/filter/ww8/wrtww8.hxx:1374 + void WW8_WrMagicTable::Append(int,unsigned long) + int nCp + 0 +sw/source/filter/ww8/wrtww8.hxx:1374 + void WW8_WrMagicTable::Append(int,unsigned long) + unsigned long nData + 0 +sw/source/filter/ww8/ww8par.cxx:439 + class rtl::OUString (anonymous namespace)::Sttb::getStringAtIndex(unsigned int) + unsigned int + 1 +sw/source/filter/ww8/ww8par.hxx:1689 + _Bool SwWW8ImplReader::SetUpperSpacing(class SwPaM &,int) + int nSpace + 0 +sw/source/filter/ww8/ww8scan.hxx:169 + class rtl::OUString read_uInt8_BeltAndBracesString(class SvStream &,unsigned short) + unsigned short eEnc + 1 +sw/source/filter/ww8/ww8scan.hxx:469 + void WW8PLCFx_PCD::WW8PLCFx_PCD(const class WW8Fib &,class WW8PLCFpcd *,int,_Bool) + int nStartCp + 0 +sw/source/filter/ww8/ww8scan.hxx:676 + void WW8PLCFx_SEPX::WW8PLCFx_SEPX(class SvStream *,class SvStream *,const class WW8Fib &,int) + int nStartCp + 0 +sw/source/filter/ww8/ww8scan.hxx:704 + void WW8PLCFx_SubDoc::WW8PLCFx_SubDoc(class SvStream *,const class WW8Fib &,int,long,long,long,long,long) + int nStartCp + 0 +sw/source/filter/ww8/WW8TableInfo.hxx:303 + class ww8::WW8TableNodeInfo * ww8::WW8TableInfo::processTableLine(const class SwTable *,const class SwTableLine *,unsigned int,unsigned int,class ww8::WW8TableNodeInfo *,class std::__debug::map, class std::allocator > > &) + unsigned int nDepth + 1 +sw/source/filter/xml/xmlfmt.cxx:379 + void (anonymous namespace)::SwXMLCellStyleContext::XMLPropStyleContext(class SvXMLImport &,class SvXMLStylesContext &,enum XmlStyleFamily,_Bool) + _Bool + 0 +sw/source/ui/misc/impfnote.hxx:64 + void SwEndNoteOptionPage::SwEndNoteOptionPage(class weld::Container *,class weld::DialogController *,_Bool,const class SfxItemSet &) + _Bool bEndNote + 0 +sw/source/ui/table/instable.cxx:171 + void lcl_SetProperties(class SwTableAutoFormat *,_Bool) + _Bool bVal + 0 +sw/source/ui/vba/vbarangehelper.hxx:32 + void SwVbaRangeHelper::insertString(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,_Bool) + _Bool _bAbsorb + 1 +sw/source/uibase/inc/condedit.hxx:64 + void ConditionEdit::ShowBrackets(_Bool) + _Bool bShow + 0 +sw/source/uibase/inc/dbtree.hxx:59 + class std::unique_ptr > SwDBTreeList::make_iterator(const class weld::TreeIter *) const + const class weld::TreeIter * pOrig + 0 +sw/source/uibase/inc/edtwin.hxx:216 + void SwEditWin::StdDrawMode(enum SdrObjKind,_Bool) + enum SdrObjKind eSdrObjectKind + 0 +sw/source/uibase/inc/frmmgr.hxx:99 + void SwFlyFrameAttrMgr::SetLRSpace(long,long) + long nLeft + 0 +sw/source/uibase/inc/frmmgr.hxx:99 + void SwFlyFrameAttrMgr::SetLRSpace(long,long) + long nRight + 0 +sw/source/uibase/inc/frmmgr.hxx:101 + void SwFlyFrameAttrMgr::SetULSpace(long,long) + long nTop + 0 +sw/source/uibase/inc/frmmgr.hxx:101 + void SwFlyFrameAttrMgr::SetULSpace(long,long) + long nBottom + 0 +sw/source/uibase/inc/mmconfigitem.hxx:137 + void SwMailMergeConfigItem::SetIndividualGreeting(_Bool,_Bool) + _Bool bInEMail + 0 +sw/source/uibase/inc/numfmtlb.hxx:132 + void SwNumFormatTreeView::select(int) + int nPos + 0 +sw/source/uibase/inc/prcntfld.hxx:69 + int SwPercentField::get_min(enum FieldUnit) const + enum FieldUnit eOutUnit + 0 +sw/source/uibase/inc/swuipardlg.hxx:34 + void SwParaDlg::SwParaDlg(class weld::Window *,class SwView &,const class SfxItemSet &,unsigned char,const class rtl::OUString *,_Bool,const class rtl::OString &) + _Bool bDraw + 0 +sw/source/uibase/inc/wrtsh.hxx:120 + void SwWrtShell::EndDrag(const class Point *,_Bool) + _Bool bProp + 0 +sw/source/uibase/inc/wrtsh.hxx:121 + long SwWrtShell::KillSelection(const class Point *,_Bool) + const class Point * pPt + 0 +sw/source/uibase/inc/wrtsh.hxx:121 + long SwWrtShell::KillSelection(const class Point *,_Bool) + _Bool bProp + 0 +sw/source/uibase/inc/wrtsh.hxx:415 + _Bool SwWrtShell::GotoMark(const class sw::mark::IMark *const,_Bool) + _Bool bSelect + 0 +sw/source/uibase/inc/wrtsh.hxx:485 + const class SwRangeRedline * SwWrtShell::GotoRedline(unsigned long,_Bool) + _Bool bSelect + 1 +sw/source/uibase/inc/wrtsh.hxx:495 + void SwWrtShell::ToggleOutlineContentVisibility(class SwNode *,const _Bool) + const _Bool bForceNotVisible + 1 +test/source/sheet/xdatapilottable2.cxx:237 + struct com::sun::star::table::CellAddress getLastUsedCellAddress(const class com::sun::star::uno::Reference &,int,int) + int nCol + 0 +test/source/sheet/xdatapilottable2.cxx:237 + struct com::sun::star::table::CellAddress getLastUsedCellAddress(const class com::sun::star::uno::Reference &,int,int) + int nRow + 0 +ucb/source/ucp/tdoc/tdoc_provider.hxx:110 + class com::sun::star::uno::Reference tdoc_ucp::ContentProvider::queryOutputStream(const class rtl::OUString &,const class rtl::OUString &,_Bool) const + _Bool bTruncate + 1 +ucb/source/ucp/tdoc/tdoc_provider.hxx:117 + class com::sun::star::uno::Reference tdoc_ucp::ContentProvider::queryStream(const class rtl::OUString &,const class rtl::OUString &,_Bool) const + _Bool bTruncate + 0 +ucb/source/ucp/webdav-neon/DAVResourceAccess.hxx:105 + void webdav_ucp::DAVResourceAccess::PROPFIND(const enum webdav_ucp::Depth,class std::__debug::vector > &,const class com::sun::star::uno::Reference &) + const enum webdav_ucp::Depth nDepth + 0 +ucb/source/ucp/webdav-neon/DAVTypes.hxx:179 + void webdav_ucp::DAVOptionsCache::setHeadAllowed(const class rtl::OUString &,_Bool) + _Bool HeadAllowed + 0 +ucb/source/ucp/webdav-neon/NeonSession.hxx:250 + int webdav_ucp::NeonSession::GET0(struct ne_session_s *,const char *,_Bool,void *) + _Bool getheaders + 1 +vbahelper/source/vbahelper/vbacommandbarcontrols.hxx:36 + class com::sun::star::uno::Sequence ScVbaCommandBarControls::CreateMenuItemData(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,unsigned short,const class com::sun::star::uno::Any &,_Bool,_Bool) + _Bool isVisible + 1 +vbahelper/source/vbahelper/vbacommandbarcontrols.hxx:36 + class com::sun::star::uno::Sequence ScVbaCommandBarControls::CreateMenuItemData(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,unsigned short,const class com::sun::star::uno::Any &,_Bool,_Bool) + _Bool isEnabled + 1 +vbahelper/source/vbahelper/vbacommandbarcontrols.hxx:43 + class com::sun::star::uno::Sequence ScVbaCommandBarControls::CreateToolbarItemData(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,unsigned short,const class com::sun::star::uno::Any &,_Bool,int) + _Bool isVisible + 1 +vbahelper/source/vbahelper/vbacommandbarcontrols.hxx:43 + class com::sun::star::uno::Sequence ScVbaCommandBarControls::CreateToolbarItemData(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,unsigned short,const class com::sun::star::uno::Any &,_Bool,int) + int nStyle + 0 +vcl/backendtest/outputdevice/common.cxx:205 + enum vcl::test::TestResult checkDiamondLine(class Bitmap &,int,class Color) + int aLayerNumber + 1 +vcl/backendtest/VisualBackendTest.cxx:54 + void drawBitmapScaledAndCentered(const class tools::Rectangle &,class Bitmap,class OutputDevice &,enum BmpScaleFlag) + enum BmpScaleFlag aFlag + 1 +vcl/headless/svpgdi.cxx:398 + void (anonymous namespace)::BitmapHelper::BitmapHelper(const class SalBitmap &,const _Bool) + const _Bool bForceARGB32 + 1 +vcl/inc/driverblocklist.hxx:28 + _Bool IsDeviceBlocked(const class rtl::OUString &,enum DriverBlocklist::VersionType,class std::basic_string_view >,class std::basic_string_view >,const class rtl::OUString &) + enum DriverBlocklist::VersionType versionType + 1 +vcl/inc/FileDefinitionWidgetDraw.hxx:61 + void vcl::FileDefinitionWidgetDraw::drawPolyLine(class SalGraphics &,const class basegfx::B2DHomMatrix &,const class basegfx::B2DPolygon &,double,double,const class std::__debug::vector > *,enum basegfx::B2DLineJoin,enum com::sun::star::drawing::LineCap,double,_Bool) + const class std::__debug::vector > * i_pStroke + 0 +vcl/inc/FileDefinitionWidgetDraw.hxx:61 + void vcl::FileDefinitionWidgetDraw::drawPolyLine(class SalGraphics &,const class basegfx::B2DHomMatrix &,const class basegfx::B2DPolygon &,double,double,const class std::__debug::vector > *,enum basegfx::B2DLineJoin,enum com::sun::star::drawing::LineCap,double,_Bool) + enum com::sun::star::drawing::LineCap i_eLineCap + 1 +vcl/inc/FileDefinitionWidgetDraw.hxx:61 + void vcl::FileDefinitionWidgetDraw::drawPolyLine(class SalGraphics &,const class basegfx::B2DHomMatrix &,const class basegfx::B2DPolygon &,double,double,const class std::__debug::vector > *,enum basegfx::B2DLineJoin,enum com::sun::star::drawing::LineCap,double,_Bool) + _Bool bPixelSnapHairline + 0 +vcl/inc/jsdialog/jsdialogbuilder.hxx:294 + void JSWidget::JSWidget(class JSDialogSender *,type-parameter-?-? *,class SalInstanceBuilder *,const class com::sun::star::uno::Reference &,class std::function > (class vcl::Window *)>,void *,_Bool) + _Bool bTakeOwnership + 0 +vcl/inc/jsdialog/jsdialogbuilder.hxx:374 + void JSDialog::JSDialog(class JSDialogSender *,class Dialog *,class SalInstanceBuilder *,_Bool) + _Bool bTakeOwnership + 0 +vcl/inc/jsdialog/jsdialogbuilder.hxx:393 + void JSButton::JSButton(class JSDialogSender *,class Button *,class SalInstanceBuilder *,_Bool) + class SalInstanceBuilder * pBuilder + 0 +vcl/inc/jsdialog/jsdialogbuilder.hxx:393 + void JSButton::JSButton(class JSDialogSender *,class Button *,class SalInstanceBuilder *,_Bool) + _Bool bTakeOwnership + 0 +vcl/inc/jsdialog/jsdialogbuilder.hxx:463 + void JSMessageDialog::JSMessageDialog(class JSDialogSender *,class MessageDialog *,class SalInstanceBuilder *,_Bool) + _Bool bTakeOwnership + 0 +vcl/inc/jsdialog/jsdialogbuilder.hxx:465 + void JSMessageDialog::JSMessageDialog(class MessageDialog *,class SalInstanceBuilder *,_Bool) + class SalInstanceBuilder * pBuilder + 0 +vcl/inc/jsdialog/jsdialogbuilder.hxx:465 + void JSMessageDialog::JSMessageDialog(class MessageDialog *,class SalInstanceBuilder *,_Bool) + _Bool bTakeOwnership + 1 +vcl/inc/listbox.hxx:143 + class rtl::OUString ImplEntryList::GetSelectedEntry(int) const + int nIndex + 0 +vcl/inc/listbox.hxx:334 + void ImplListBoxWindow::EnableMouseMoveSelect(_Bool) + _Bool bMouseMoveSelect + 1 +vcl/inc/qt5/Qt5Graphics_Controls.hxx:94 + class QSize Qt5Graphics_Controls::downscale(const class QSize &,enum Qt5Graphics_Controls::Round) + enum Qt5Graphics_Controls::Round eRound + 1 +vcl/inc/qt5/Qt5Graphics_Controls.hxx:95 + class QSize Qt5Graphics_Controls::upscale(const class QSize &,enum Qt5Graphics_Controls::Round) + enum Qt5Graphics_Controls::Round eRound + 1 +vcl/inc/qt5/Qt5VirtualDevice.hxx:42 + void Qt5VirtualDevice::Qt5VirtualDevice(enum DeviceFormat,double) + double fScale + 1 +vcl/inc/qt5/Qt5Widget.hxx:49 + _Bool Qt5Widget::handleKeyEvent(class Qt5Frame &,const class QWidget &,class QKeyEvent *,const enum Qt5Widget::ButtonKeyState) + const enum Qt5Widget::ButtonKeyState + 1 +vcl/inc/salgdi.hxx:144 + void SalGraphics::GetFontMetric(class tools::SvRef &,int) + int nFallbackLevel + 0 +vcl/inc/salgdi.hxx:520 + void SalGraphics::copyArea(long,long,long,long,long,long,_Bool) + _Bool bWindowInvalidate + 1 +vcl/inc/salgdi.hxx:655 + _Bool SalGraphics::CreateTTFfontSubset(class vcl::AbstractTrueTypeFont &,const class rtl::OString &,const _Bool,const unsigned short *,const unsigned char *,int *,int) + const _Bool bVertical + 0 +vcl/inc/scrptrun.h:68 + void vcl::ScriptRun::reset(const char16_t *,int,int) + int start + 0 +vcl/inc/sft.hxx:478 + enum vcl::SFErrCodes OpenTTFontBuffer(const void *,unsigned int,unsigned int,class vcl::TrueTypeFont **,const class tools::SvRef) + unsigned int facenum + 0 +vcl/inc/sft.hxx:594 + enum vcl::SFErrCodes CreateT3FromTTGlyphs(class vcl::TrueTypeFont *,struct _IO_FILE *,const char *,const unsigned short *,unsigned char *,int,int) + int wmode + 0 +vcl/inc/skia/gdiimpl.hxx:225 + void SkiaSalGraphicsImpl::drawGenericLayout(const class GenericSalLayout &,class Color,const class SkFont &,enum SkiaSalGraphicsImpl::GlyphOrientation) + enum SkiaSalGraphicsImpl::GlyphOrientation glyphOrientation + 0 +vcl/inc/skia/utils.hxx:39 + void disableRenderMethod(enum SkiaHelper::RenderMethod) + enum SkiaHelper::RenderMethod method + 1 +vcl/inc/svimpbox.hxx:259 + void SvImpLBox::SelectEntry(class SvTreeListEntry *,_Bool) + _Bool bSelect + 0 +vcl/inc/unx/gendisp.hxx:45 + _Bool SalGenericDisplay::DispatchInternalEvent(_Bool) + _Bool bHandleAllCurrentEvent + 0 +vcl/inc/unx/gtk/gloactiongroup.h:51 + void g_lo_action_group_insert(struct GLOActionGroup *,const char *,int,int) + int submenu + 0 +vcl/inc/unx/gtk/gloactiongroup.h:56 + void g_lo_action_group_insert_stateful(struct GLOActionGroup *,const char *,int,int,const struct _GVariantType *,const struct _GVariantType *,struct _GVariant *,struct _GVariant *) + struct _GVariant * state_hint + 0 +vcl/inc/unx/gtk/glomenu.h:49 + void g_lo_menu_new_section(struct GLOMenu *,int,const char *) + const char * label + 0 +vcl/inc/unx/gtk/hudawareness.h:20 + unsigned int hud_awareness_register(struct _GDBusConnection *,const char *,void (*)(int, void *),void *,void (*)(void *),struct _GError **) + void (*)(void *) notify + 0 +vcl/inc/unx/gtk/hudawareness.h:20 + unsigned int hud_awareness_register(struct _GDBusConnection *,const char *,void (*)(int, void *),void *,void (*)(void *),struct _GError **) + struct _GError ** error + 0 +vcl/inc/unx/printergfx.hxx:226 + void psp::PrinterGfx::PSSetFont(const class rtl::OString &,unsigned short) + unsigned short nEncoding + 0 +vcl/inc/unx/printergfx.hxx:252 + void psp::PrinterGfx::PSHexString(const unsigned char *,short) + short nLen + 1 +vcl/inc/unx/salbmp.h:49 + class std::unique_ptr > X11SalBitmap::ImplCreateDIB(unsigned long,class SalX11Screen,long,long,long,long,long,_Bool) + long nX + 0 +vcl/inc/unx/salbmp.h:49 + class std::unique_ptr > X11SalBitmap::ImplCreateDIB(unsigned long,class SalX11Screen,long,long,long,long,long,_Bool) + long nY + 0 +vcl/inc/unx/wmadaptor.hxx:181 + const class tools::Rectangle & vcl_sal::WMAdaptor::getWorkArea(int) const + int n + 0 +vcl/inc/unx/x11/xrender_peer.hxx:45 + XRenderPictFormat * XRenderPeer::FindStandardFormat(int) const + int nFormat + 0 +vcl/inc/unx/x11/xrender_peer.hxx:61 + void XRenderPeer::CompositeTrapezoids(int,unsigned long,unsigned long,const XRenderPictFormat *,int,int,const struct _XTrapezoid *,int) const + int nXSrc + 0 +vcl/inc/unx/x11/xrender_peer.hxx:61 + void XRenderPeer::CompositeTrapezoids(int,unsigned long,unsigned long,const XRenderPictFormat *,int,int,const struct _XTrapezoid *,int) const + int nYSrc + 0 +vcl/inc/unx/x11/xrender_peer.hxx:64 + void XRenderPeer::CompositeTriangles(int,unsigned long,unsigned long,const XRenderPictFormat *,int,int,const struct _XTriangle *,int) const + int nXSrc + 0 +vcl/inc/unx/x11/xrender_peer.hxx:64 + void XRenderPeer::CompositeTriangles(int,unsigned long,unsigned long,const XRenderPictFormat *,int,int,const struct _XTriangle *,int) const + int nYSrc + 0 +vcl/inc/wizdlg.hxx:123 + _Bool vcl::RoadmapWizard::Finish(long) + long nResult + 1 +vcl/qa/cppunit/BitmapTest.cxx:67 + void assertColorsAreSimilar(int,const class std::__cxx11::basic_string, class std::allocator > &,const class BitmapColor &,const class BitmapColor &) + int maxDifference + 1 +vcl/qa/cppunit/PDFDocumentTest.cxx:174 + class vcl::filter::PDFObjectElement * addObjectElement(class std::__debug::vector >, class std::allocator > > > &,class vcl::filter::PDFDocument &,int,int) + int nObjectNumber + 1 +vcl/qa/cppunit/PDFDocumentTest.cxx:174 + class vcl::filter::PDFObjectElement * addObjectElement(class std::__debug::vector >, class std::allocator > > > &,class vcl::filter::PDFDocument &,int,int) + int nGenerationNumber + 0 +vcl/source/app/salvtables.cxx:1804 + void (anonymous namespace)::SalInstanceAssistant::SalInstanceAssistant(class vcl::RoadmapWizard *,class SalInstanceBuilder *,_Bool) + _Bool bTakeOwnership + 0 +vcl/source/app/salvtables.cxx:2002 + void (anonymous namespace)::SalInstanceFrame::SalInstanceFrame(class VclFrame *,class SalInstanceBuilder *,_Bool) + _Bool bTakeOwnership + 0 +vcl/source/app/salvtables.cxx:6649 + void (anonymous namespace)::SalInstancePopover::SalInstancePopover(class DockingWindow *,class SalInstanceBuilder *,_Bool) + _Bool bTakeOwnership + 0 +vcl/source/bitmap/BitmapBasicMorphologyFilter.cxx:225 + void runFilter(class Bitmap &,const long,const _Bool,_Bool,unsigned char) + const _Bool bParallel + 1 +vcl/source/bitmap/BitmapFilterStackBlur.cxx:147 + void (anonymous namespace)::SumFunction24::set(long *&,long) + long nConstant + 0 +vcl/source/bitmap/BitmapFilterStackBlur.cxx:205 + void (anonymous namespace)::SumFunction8::set(long *&,long) + long nConstant + 0 +vcl/source/bitmap/BitmapFilterStackBlur.cxx:478 + void runStackBlur(class Bitmap &,const long,const long,const long,void (*)(const struct (anonymous namespace)::BlurSharedData &, long, long),void (*)(const struct (anonymous namespace)::BlurSharedData &, long, long),const _Bool) + const _Bool bParallel + 1 +vcl/source/bitmap/bmpfast.cxx:34 + void (anonymous namespace)::BasePixelPtr::BasePixelPtr(unsigned char *) + unsigned char * p + 0 +vcl/source/control/imivctl.hxx:359 + const class Size & SvxIconChoiceCtrl_Impl::GetItemSize(enum IcnViewFieldType) const + enum IcnViewFieldType + 1 +vcl/source/control/imivctl.hxx:405 + void SvxIconChoiceCtrl_Impl::SetColumn(unsigned short,const class SvxIconChoiceCtrlColumnInfo &) + unsigned short nIndex + 0 +vcl/source/control/imivctl.hxx:406 + const class SvxIconChoiceCtrlColumnInfo * SvxIconChoiceCtrl_Impl::GetColumn(unsigned short) const + unsigned short nIndex + 0 +vcl/source/filter/eps/eps.cxx:92 + enum (anonymous namespace)::NMode operator|(enum (anonymous namespace)::NMode,enum (anonymous namespace)::NMode) + enum (anonymous namespace)::NMode a + 1 +vcl/source/filter/eps/eps.cxx:213 + void (anonymous namespace)::PSWriter::ImplWriteLineColor(enum (anonymous namespace)::NMode) + enum (anonymous namespace)::NMode nMode + 1 +vcl/source/filter/eps/eps.cxx:214 + void (anonymous namespace)::PSWriter::ImplWriteFillColor(enum (anonymous namespace)::NMode) + enum (anonymous namespace)::NMode nMode + 1 +vcl/source/filter/FilterConfigCache.hxx:89 + class rtl::OUString FilterConfigCache::GetExportWildcard(unsigned short,int) + int nEntry + 0 +vcl/source/filter/jpeg/Exif.cxx:170 + void write32(unsigned int,unsigned char (&)[4],_Bool) + unsigned int value + 1 +vcl/source/filter/wmf/wmfwr.hxx:162 + void WMFWriter::WMFRecord_SetBkMode(_Bool) + _Bool bTransparent + 1 +vcl/source/gdi/FileDefinitionWidgetDraw.cxx:102 + _Bool getSettingValueBool(class std::basic_string_view >,_Bool) + _Bool bDefault + 1 +vcl/source/window/menufloatingwindow.hxx:107 + void MenuFloatingWindow::EnableScrollMenu(_Bool) + _Bool b + 1 +vcl/source/window/menuitemlist.hxx:111 + struct MenuItemData * MenuItemList::Insert(unsigned short,enum MenuItemType,enum MenuItemBits,const class rtl::OUString &,class Menu *,unsigned long,const class rtl::OString &) + enum MenuItemType eType + 1 +vcl/source/window/window2.cxx:576 + void lcl_HandleScrollHelper(class ScrollBar *,double,_Bool) + _Bool isMultiplyByLineSize + 1 +vcl/unx/generic/app/randrwrapper.cxx:55 + void (anonymous namespace)::RandRWrapper::XRRSelectInput(struct _XDisplay *,unsigned long,int) + int i_nMask + 1 +vcl/unx/generic/print/psputil.hxx:50 + _Bool WritePS(class osl::File *,const char *,unsigned long) + unsigned long nInLength + 1 +vcl/unx/gtk3/gtk3gtkinst.cxx:4973 + void (anonymous namespace)::GtkInstanceMessageDialog::GtkInstanceMessageDialog(struct _GtkMessageDialog *,class (anonymous namespace)::GtkInstanceBuilder *,_Bool) + class (anonymous namespace)::GtkInstanceBuilder * pBuilder + 0 +vcl/unx/gtk3/gtk3gtkinst.cxx:4973 + void (anonymous namespace)::GtkInstanceMessageDialog::GtkInstanceMessageDialog(struct _GtkMessageDialog *,class (anonymous namespace)::GtkInstanceBuilder *,_Bool) + _Bool bTakeOwnership + 1 +vcl/unx/gtk3/gtk3gtkinst.cxx:15264 + int (anonymous namespace)::GtkInstanceComboBox::find_text_including_mru(class std::basic_string_view >,_Bool) const + _Bool bSearchMRU + 0 +workdir/../vcl/inc/qt5/Qt5Frame.hxx:210 + _Bool Qt5Frame::CallCallback(enum SalEvent,const void *) const + const void * pEvent + 0 +workdir/../vcl/inc/qt5/Qt5Instance.hxx:79 + _Bool Qt5Instance::ImplYieldSignal(_Bool,_Bool) + _Bool bWait + 0 +writerfilter/inc/dmapper/resourcemodel.hxx:237 + void writerfilter::Stream::text(const unsigned char *,unsigned long) + unsigned long len + 1 +writerfilter/inc/ooxml/OOXMLDocument.hxx:131 + void writerfilter::ooxml::OOXMLDocument::resolveFootnote(class writerfilter::Stream &,unsigned int,const int) + unsigned int aNoteType + 0 +writerfilter/inc/ooxml/OOXMLDocument.hxx:144 + void writerfilter::ooxml::OOXMLDocument::resolveEndnote(class writerfilter::Stream &,unsigned int,const int) + unsigned int aNoteType + 0 +writerfilter/source/dmapper/DomainMapper.hxx:120 + void writerfilter::dmapper::DomainMapper::hasControls(const _Bool) + const _Bool bSet + 1 +writerfilter/source/ooxml/OOXMLStreamImpl.hxx:62 + void writerfilter::ooxml::OOXMLStreamImpl::OOXMLStreamImpl(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,enum writerfilter::ooxml::OOXMLStream::StreamType_t,_Bool) + enum writerfilter::ooxml::OOXMLStream::StreamType_t nType + 1 +xmlhelp/source/cxxhelp/provider/databases.hxx:360 + void chelp::DataBaseIterator::DataBaseIterator(const class com::sun::star::uno::Reference &,class chelp::Databases &,const class rtl::OUString &,const class rtl::OUString &,_Bool) + _Bool bHelpText + 1 +xmlhelp/source/cxxhelp/provider/databases.hxx:365 + void chelp::DataBaseIterator::DataBaseIterator(class chelp::Databases &,const class rtl::OUString &,const class rtl::OUString &,_Bool) + _Bool bHelpText + 0 +xmloff/inc/txtflde.hxx:253 + void XMLTextFieldExport::ProcessIntegerDef(enum xmloff::token::XMLTokenEnum,int,int) + int nDefault + 0 +xmloff/inc/txtflde.hxx:324 + void XMLTextFieldExport::ProcessDateTime(enum xmloff::token::XMLTokenEnum,double,_Bool,_Bool,_Bool,unsigned short) + _Bool bOmitDurationIfZero + 1 +xmloff/inc/txtflde.hxx:333 + void XMLTextFieldExport::ProcessDateTime(enum xmloff::token::XMLTokenEnum,int,_Bool,_Bool) + _Bool bIsDuration + 1 +xmloff/source/chart/SchXMLTools.hxx:90 + void CreateCategories(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,int,int,class std::__debug::multimap, class com::sun::star::uno::Reference, struct std::less >, class std::allocator, class com::sun::star::uno::Reference > > > *) + int nCooSysIndex + 0 +xmloff/source/chart/SchXMLTools.hxx:121 + _Bool getXMLRangePropertyFromDataSequence(const class com::sun::star::uno::Reference &,class rtl::OUString &,_Bool) + _Bool bClearProp + 1 +xmloff/source/chart/transporttypes.hxx:183 + void DataRowPointStyle::DataRowPointStyle(enum DataRowPointStyle::StyleType,const class com::sun::star::uno::Reference &,int,int,const class rtl::OUString &,int) + int nPointRepeat + 1 +xmloff/source/chart/transporttypes.hxx:199 + void DataRowPointStyle::DataRowPointStyle(enum DataRowPointStyle::StyleType,const class rtl::OUString &,int) + int nAttachedAxis + 0 +xmloff/source/text/txtflde.cxx:276 + _Bool GetOptionalBoolProperty(const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,_Bool) + _Bool bDefault + 0 +xmloff/source/text/XMLIndexTemplateContext.hxx:86 + void XMLIndexTemplateContext::XMLIndexTemplateContext(class SvXMLImport &,class com::sun::star::uno::Reference &,const SvXMLEnumMapEntry *,enum xmloff::token::XMLTokenEnum,const char **,const _Bool *,_Bool) + _Bool bTOC_ + 0 +xmloff/source/text/XMLSectionExport.hxx:104 + _Bool XMLSectionExport::IsMuteSection(const class com::sun::star::uno::Reference &,_Bool) const + _Bool bDefault + 0 +xmloff/source/transform/TransformerBase.hxx:169 + const class XMLTransformerContext * XMLTransformerBase::GetAncestorContext(unsigned int) const + unsigned int i + 1 +xmlscript/source/xmldlg_imexp/exp_share.hxx:223 + void xmlscript::ElementDescriptor::read(const class rtl::OUString &,const class rtl::OUString &,_Bool) + _Bool forceAttribute + 0 +xmlsecurity/source/component/documentdigitalsignatures.cxx:95 + void (anonymous namespace)::DocumentDigitalSignatures::ImplViewSignatures(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,enum DocumentSignatureMode,_Bool) + _Bool bReadOnly + 1 diff --git a/compilerplugins/clang/constantparam.constructors.results b/compilerplugins/clang/constantparam.constructors.results new file mode 100644 index 0000000000..c8348bc458 --- /dev/null +++ b/compilerplugins/clang/constantparam.constructors.results @@ -0,0 +1,1120 @@ +accessibility/source/extended/AccessibleBrowseBoxHeaderCell.cxx:120 + class tools::Rectangle getRectangle(class vcl::IAccessibleTableProvider *,int,_Bool,_Bool) + _Bool _bRowBar + isRowBarCell() +basctl/source/inc/dlged.hxx:202 + void basctl::DlgEditor::printPage(int,class Printer *,const class rtl::OUString &) + const class rtl::OUString & + CreateQualifiedName() +basic/inc/sbobjmod.hxx:88 + void SbUserFormModuleInstance::SbUserFormModuleInstance(class SbUserFormModule *,const class rtl::OUString &,const struct com::sun::star::script::ModuleInfo &,_Bool) + _Bool bIsVBACompat + IsVBACompat() +binaryurp/source/bridge.hxx:102 + class com::sun::star::uno::UnoInterfaceReference binaryurp::Bridge::registerIncomingInterface(const class rtl::OUString &,const class com::sun::star::uno::TypeDescription &) + const class rtl::OUString & oid + readOid() +bridges/source/jni_uno/nativethreadpool.cxx:40 + void (anonymous namespace)::Pool::Pool(const class rtl::Reference &,struct _jmethodID *,struct _uno_ThreadPool *) + struct _uno_ThreadPool * thePool + uno_threadpool_create() +chart2/source/controller/inc/CommandDispatchContainer.hxx:81 + void chart::CommandDispatchContainer::setChartDispatch(const class com::sun::star::uno::Reference &,const class o3tl::sorted_vector, find_unique, true> &) + const class o3tl::sorted_vector, find_unique, true> & rChartCommands + impl_getAvailableCommands() +chart2/source/view/axes/VCartesianAxis.cxx:416 + class rtl::OUString getTextLabelString(const class chart::FixedNumberFormatter &,const class com::sun::star::uno::Sequence *,const struct chart::TickInfo *,_Bool,class Color &,_Bool &) + _Bool bComplexCat + isComplexCategoryAxis() +connectivity/inc/sdbcx/VKeyColumn.hxx:37 + void connectivity::sdbcx::OKeyColumn::OKeyColumn(_Bool) + _Bool _bCase + isCaseSensitive() +connectivity/inc/sdbcx/VKeyColumn.hxx:38 + void connectivity::sdbcx::OKeyColumn::OKeyColumn(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,int,int,int,int,_Bool,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + _Bool _bCase + isCaseSensitive() +connectivity/source/commontools/TColumnsHelper.cxx:47 + void connectivity::OColumnsHelperImpl::OColumnsHelperImpl(_Bool) + _Bool _bCase + isCaseSensitive() +connectivity/source/drivers/evoab2/NTable.hxx:34 + void connectivity::evoab::OEvoabTable::OEvoabTable(class connectivity::sdbcx::OCollection *,class connectivity::evoab::OEvoabConnection *,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & SchemaName + "" +connectivity/source/drivers/evoab2/NTable.hxx:34 + void connectivity::evoab::OEvoabTable::OEvoabTable(class connectivity::sdbcx::OCollection *,class connectivity::evoab::OEvoabConnection *,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & CatalogName + "" +connectivity/source/inc/calc/CTable.hxx:55 + void connectivity::calc::OCalcTable::OCalcTable(class connectivity::sdbcx::OCollection *,class connectivity::calc::OCalcConnection *,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & Description + "" +connectivity/source/inc/calc/CTable.hxx:55 + void connectivity::calc::OCalcTable::OCalcTable(class connectivity::sdbcx::OCollection *,class connectivity::calc::OCalcConnection *,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & SchemaName + "" +connectivity/source/inc/calc/CTable.hxx:55 + void connectivity::calc::OCalcTable::OCalcTable(class connectivity::sdbcx::OCollection *,class connectivity::calc::OCalcConnection *,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & CatalogName + "" +connectivity/source/inc/dbase/DTable.hxx:145 + void connectivity::dbase::ODbaseTable::ODbaseTable(class connectivity::sdbcx::OCollection *,class connectivity::dbase::ODbaseConnection *,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & Description + "" +connectivity/source/inc/dbase/DTable.hxx:145 + void connectivity::dbase::ODbaseTable::ODbaseTable(class connectivity::sdbcx::OCollection *,class connectivity::dbase::ODbaseConnection *,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & SchemaName + "" +connectivity/source/inc/dbase/DTable.hxx:145 + void connectivity::dbase::ODbaseTable::ODbaseTable(class connectivity::sdbcx::OCollection *,class connectivity::dbase::ODbaseConnection *,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & CatalogName + "" +connectivity/source/inc/flat/ETable.hxx:76 + void connectivity::flat::OFlatTable::OFlatTable(class connectivity::sdbcx::OCollection *,class connectivity::flat::OFlatConnection *,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & Description + "" +connectivity/source/inc/flat/ETable.hxx:76 + void connectivity::flat::OFlatTable::OFlatTable(class connectivity::sdbcx::OCollection *,class connectivity::flat::OFlatConnection *,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & SchemaName + "" +connectivity/source/inc/flat/ETable.hxx:76 + void connectivity::flat::OFlatTable::OFlatTable(class connectivity::sdbcx::OCollection *,class connectivity::flat::OFlatConnection *,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & CatalogName + "" +connectivity/source/inc/hsqldb/HView.hxx:40 + void connectivity::hsqldb::HView::HView(const class com::sun::star::uno::Reference &,_Bool,const class rtl::OUString &,const class rtl::OUString &) + _Bool _bCaseSensitive + isCaseSensitive() +connectivity/source/inc/OColumn.hxx:67 + void connectivity::OColumn::OColumn(const class rtl::OUString &,const class rtl::OUString &,int,int,int,int,int) + const class rtl::OUString & _aTableName + "" +connectivity/source/manager/mdrivermanager.cxx:144 + const class com::sun::star::uno::Reference & drivermanager::(anonymous namespace)::ExtractDriverFromAccess::operator()(const struct drivermanager::DriverAccess &) const + const struct drivermanager::DriverAccess & _rAccess + ExtractDriverFromAccess() +connectivity/source/manager/mdrivermanager.cxx:152 + const class com::sun::star::uno::Reference & drivermanager::(anonymous namespace)::ExtractDriverFromCollectionElement::operator()(const struct std::pair > &) const + const struct std::pair > & _rElement + ExtractDriverFromCollectionElement() +dbaccess/source/core/api/RowSetRow.hxx:39 + void dbaccess::ORowSetOldRowHelper::ORowSetOldRowHelper(const class rtl::Reference > &) + const class rtl::Reference > & _rRow + ORowSetRow() +dbaccess/source/core/inc/ModelImpl.hxx:311 + void dbaccess::ODatabaseModelImpl::modelIsDisposing(const _Bool,struct dbaccess::ODatabaseModelImpl::ResetModelAccess) + const _Bool _wasInitialized + impl_isInitialized() +dbaccess/source/core/inc/View.hxx:40 + void dbaccess::View::View(const class com::sun::star::uno::Reference &,_Bool,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + _Bool _bCaseSensitive + isCaseSensitive() +dbaccess/source/ui/inc/indexes.hxx:73 + void dbaui::OIndex::flagAsNew(const struct dbaui::GrantIndexAccess &) + const struct dbaui::GrantIndexAccess & + GrantIndexAccess() +dbaccess/source/ui/inc/indexes.hxx:74 + void dbaui::OIndex::flagAsCommitted(const struct dbaui::GrantIndexAccess &) + const struct dbaui::GrantIndexAccess & + GrantIndexAccess() +dbaccess/source/ui/inc/sqlmessage.hxx:88 + void dbaui::OSQLMessageBox::OSQLMessageBox(class weld::Window *,const class dbtools::SQLExceptionInfo &,enum dbaui::MessBoxStyle,const class rtl::OUString &) + const class rtl::OUString & _rHelpURL + "" +dbaccess/source/ui/inc/TableCopyHelper.hxx:98 + void dbaui::OTableCopyHelper::pasteTable(const class TransferableDataHelper &,class std::basic_string_view >,const class utl::SharedUNOComponent &) + const class utl::SharedUNOComponent & _xConnection + ensureConnection() +dbaccess/source/ui/inc/TableWindowData.hxx:65 + _Bool dbaui::OTableWindowData::init(const class com::sun::star::uno::Reference &,_Bool) + _Bool _bAllowQueries + allowQueries() +dbaccess/source/ui/inc/WCPage.hxx:56 + void dbaui::OCopyTable::OCopyTable(class weld::Container *,class dbaui::OCopyTableWizard *) + class weld::Container * pParent + CreatePageContainer() +dbaccess/source/ui/uno/copytablewizard.cxx:196 + void dbaui::(anonymous namespace)::CopyTableWizard::impl_dialogToAttributes_nothrow(const class dbaui::OCopyTableWizard &) + const class dbaui::OCopyTableWizard & _rDialog + impl_getDialog_throw() +desktop/source/deployment/gui/dp_gui_dependencydialog.hxx:38 + void dp_gui::DependencyDialog::DependencyDialog(class weld::Window *,const class std::__debug::vector > &) + class weld::Window * parent + activeDialog() +desktop/source/deployment/inc/dp_interact.h:57 + void dp_misc::ProgressLevel::update(const class com::sun::star::uno::Any &) const + const class com::sun::star::uno::Any & status + Any() +editeng/source/editeng/impedit3.cxx:152 + void lcl_DrawRedLines(class OutputDevice *,long,const class Point &,unsigned long,unsigned long,const long *,const class WrongList *,struct o3tl::strong_int,const class Point &,_Bool,_Bool) + _Bool bVertical + IsVertical() +editeng/source/misc/svxacorr.cxx:2807 + _Bool SvxAutocorrWordList::CompareSvxAutocorrWordList::operator()(const class SvxAutocorrWord &,const class SvxAutocorrWord &) const + const class SvxAutocorrWord & lhs + CompareSvxAutocorrWordList() +emfio/inc/mtftools.hxx:663 + void emfio::MtfTools::ExcludeClipRect(const class tools::Rectangle &) + const class tools::Rectangle & rRect + ReadRectangle() +extensions/source/dbpilots/controlwizard.hxx:110 + _Bool dbp::OControlWizard::updateContext(const struct dbp::OAccessRegulator &) + const struct dbp::OAccessRegulator & + OAccessRegulator() +extensions/source/dbpilots/controlwizard.hxx:111 + void dbp::OControlWizard::setFormConnection(const struct dbp::OAccessRegulator &,const class com::sun::star::uno::Reference &,_Bool) + const struct dbp::OAccessRegulator & + OAccessRegulator() +extensions/source/logging/consolehandler.cxx:93 + void logging::(anonymous namespace)::ConsoleHandler::enterMethod(class logging::ComponentMethodGuard::Access) + class logging::ComponentMethodGuard::Access + Access() +extensions/source/logging/consolehandler.cxx:94 + void logging::(anonymous namespace)::ConsoleHandler::leaveMethod(class logging::ComponentMethodGuard::Access) + class logging::ComponentMethodGuard::Access + Access() +extensions/source/logging/filehandler.cxx:110 + void logging::(anonymous namespace)::FileHandler::enterMethod(class logging::ComponentMethodGuard::Access) + class logging::ComponentMethodGuard::Access + Access() +extensions/source/logging/filehandler.cxx:111 + void logging::(anonymous namespace)::FileHandler::leaveMethod(class logging::ComponentMethodGuard::Access) + class logging::ComponentMethodGuard::Access + Access() +extensions/source/propctrlr/fontdialog.hxx:35 + void pcr::ControlCharacterDialog::ControlCharacterDialog(class weld::Window *,const class SfxItemSet &) + class weld::Window * pParent + impl_getDefaultDialogFrame_nothrow() +extensions/source/propctrlr/formlinkdialog.hxx:64 + void pcr::FormLinkDialog::FormLinkDialog(class weld::Window *,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + class weld::Window * _pParent + impl_getDefaultDialogFrame_nothrow() +extensions/source/propctrlr/formlinkdialog.hxx:64 + void pcr::FormLinkDialog::FormLinkDialog(class weld::Window *,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & _sExplanation + "" +extensions/source/propctrlr/formlinkdialog.hxx:64 + void pcr::FormLinkDialog::FormLinkDialog(class weld::Window *,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & _sDetailLabel + "" +extensions/source/propctrlr/formlinkdialog.hxx:64 + void pcr::FormLinkDialog::FormLinkDialog(class weld::Window *,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & _sMasterLabel + "" +extensions/source/propctrlr/listselectiondlg.hxx:37 + void pcr::ListSelectionDialog::ListSelectionDialog(class weld::Window *,const class com::sun::star::uno::Reference &,const class rtl::OUString &,const class rtl::OUString &) + class weld::Window * _pParent + impl_getDefaultDialogFrame_nothrow() +extensions/source/propctrlr/taborder.hxx:58 + void pcr::TabOrderDialog::TabOrderDialog(class weld::Window *,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &) + class weld::Window * pParent + impl_getDefaultDialogFrame_nothrow() +extensions/source/propctrlr/taborder.hxx:58 + void pcr::TabOrderDialog::TabOrderDialog(class weld::Window *,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &) + const class com::sun::star::uno::Reference & _rxControlCont + impl_getContextControlContainer_nothrow() +extensions/source/update/check/updateprotocol.hxx:33 + _Bool checkForUpdates(struct UpdateInfo &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &) + const class com::sun::star::uno::Reference & rxProvider + createProvider() +forms/source/component/ListBox.cxx:1541 + class com::sun::star::uno::Any lcl_getSingleSelectedEntryAny(const class com::sun::star::uno::Sequence &,const class std::__debug::vector > &) + const class std::__debug::vector > & _rStringList + impl_getValues() +forms/source/component/ListBox.cxx:1557 + class com::sun::star::uno::Sequence lcl_getMultiSelectedEntriesAny(const class com::sun::star::uno::Sequence &,const class std::__debug::vector > &) + const class std::__debug::vector > & _rStringList + impl_getValues() +forms/source/xforms/computedexpression.hxx:74 + _Bool xforms::ComputedExpression::_evaluate(const class xforms::EvaluationContext &,const class rtl::OUString &) + const class rtl::OUString & sExpression + _getExpressionForEvaluation() +idl/inc/parser.hxx:66 + void SvIdlParser::Read(const class SvStringHashEntry *) + const class SvStringHashEntry * + SvHash_module() +include/avmedia/mediaplayer.hxx:51 + void avmedia::MediaFloater::setURL(const class rtl::OUString &,const class rtl::OUString &,_Bool) + const class rtl::OUString & rReferer + "" +include/basic/basmgr.hxx:138 + void BasicManager::BasicManager(class SotStorage &,const class rtl::OUString &,class StarBASIC *,const class rtl::OUString *,_Bool) + const class rtl::OUString & rBaseURL + "" +include/comphelper/propertybag.hxx:107 + void comphelper::PropertyBag::addVoidProperty(const class rtl::OUString &,const class com::sun::star::uno::Type &,int,int) + int _nHandle + findFreeHandle() +include/connectivity/dbtools.hxx:181 + class com::sun::star::uno::Reference getConnection_withFeedback(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &) + const class rtl::OUString & _rUser + "" +include/connectivity/dbtools.hxx:181 + class com::sun::star::uno::Reference getConnection_withFeedback(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &) + const class rtl::OUString & _rPwd + "" +include/connectivity/dbtools.hxx:699 + class com::sun::star::uno::Reference createSDBCXColumn(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,_Bool,_Bool,_Bool,_Bool,int) + _Bool _bCase + isCaseSensitive() +include/connectivity/PColumn.hxx:126 + void connectivity::parse::OOrderColumn::OOrderColumn(const class com::sun::star::uno::Reference &,const class rtl::OUString &,_Bool,_Bool) + _Bool _bCase + isCaseSensitive() +include/connectivity/PColumn.hxx:133 + void connectivity::parse::OOrderColumn::OOrderColumn(const class com::sun::star::uno::Reference &,_Bool,_Bool) + _Bool _bCase + isCaseSensitive() +include/connectivity/sdbcx/VView.hxx:65 + void connectivity::sdbcx::OView::OView(_Bool,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & _rCommand + "" +include/drawinglayer/tools/primitive2dxmldump.hxx:42 + class std::unique_ptr drawinglayer::Primitive2dXmlDump::dumpAndParse(const class drawinglayer::primitive2d::Primitive2DContainer &,const class rtl::OUString &) + const class rtl::OUString & rStreamName + "" +include/editeng/editview.hxx:358 + void EditView::InitLOKSpecialPositioning(enum MapUnit,const class tools::Rectangle &,const class Point &) + const class Point & rVisDocStartPos + Point() +include/editeng/scripttypeitem.hxx:36 + const class SfxPoolItem * SvxScriptSetItem::GetItemOfScript(unsigned short,const class SfxItemSet &,enum SvtScriptType) + unsigned short nSlotId + Which() +include/editeng/svxacorr.hxx:47 + _Bool CompareSvStringsISortDtor::operator()(const class rtl::OUString &,class std::basic_string_view >) const + const class rtl::OUString & lhs + Compare() +include/editeng/swafopt.hxx:47 + _Bool editeng::CompareAutoCompleteString::operator()(class editeng::IAutoCompleteString *const &,class editeng::IAutoCompleteString *const &) const + class editeng::IAutoCompleteString *const & lhs + Compare() +include/formula/FormulaCompiler.hxx:292 + void formula::FormulaCompiler::fillAddInToken(class std::__debug::vector > &,_Bool) const + _Bool _bIsEnglish + isEnglish() +include/o3tl/sorted_vector.hxx:331 + _Bool o3tl::less_ptr_to::operator()(type-parameter-?-? *const &,type-parameter-?-? *const &) const + type-parameter-?-? *const & lhs + Compare() +include/o3tl/sorted_vector.hxx:339 + _Bool o3tl::less_uniqueptr_to::operator()(const unique_ptr > &,const unique_ptr > &) const + const unique_ptr > & lhs + Compare() +include/o3tl/sorted_vector.hxx:353 + pair::value>::const_iterator, _Bool> o3tl::find_unique::operator()(typename sorted_vector::value>::const_iterator,typename sorted_vector::value>::const_iterator,const type-parameter-?-? &) + typename sorted_vector::value>::const_iterator first + Find_t() +include/o3tl/sorted_vector.hxx:370 + pair::value>::const_iterator, _Bool> o3tl::find_partialorder_ptrequals::operator()(typename sorted_vector::value>::const_iterator,typename sorted_vector::value>::const_iterator,const type-parameter-?-? &) + typename sorted_vector::value>::const_iterator first + Find_t() +include/oox/helper/attributelist.hxx:143 + class rtl::OUString oox::AttributeList::getXString(int,const class rtl::OUString &) const + const class rtl::OUString & rDefault + "" +include/oox/mathml/importutils.hxx:212 + void oox::formulaimport::XmlStream::skipElementInternal(int,_Bool) + int token + currentToken() +include/opencl/openclconfig.hxx:36 + void OpenCLConfig::ImplMatcher::ImplMatcher(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & rOSVersion + "" +include/opencl/openclconfig.hxx:36 + void OpenCLConfig::ImplMatcher::ImplMatcher(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & rDevice + "" +include/opencl/openclwrapper.hxx:61 + _Bool buildProgramFromBinary(const char *,struct openclwrapper::GPUEnv *,const char *,int) + const char * buildOption + "" +include/registry/registry.hxx:409 + enum RegError RegistryKey::getKeyNames(const class rtl::OUString &,class RegistryKeyNames &) + const class rtl::OUString & keyName + "" +include/registry/registry.hxx:435 + enum RegError RegistryKey::setValue(const class rtl::OUString &,enum RegValueType,void *,unsigned int) + const class rtl::OUString & keyName + "" +include/registry/registry.hxx:449 + enum RegError RegistryKey::setLongListValue(const class rtl::OUString &,const int *,unsigned int) + const class rtl::OUString & keyName + "" +include/registry/registry.hxx:462 + enum RegError RegistryKey::setStringListValue(const class rtl::OUString &,char **,unsigned int) + const class rtl::OUString & keyName + "" +include/registry/registry.hxx:475 + enum RegError RegistryKey::setUnicodeListValue(const class rtl::OUString &,char16_t **,unsigned int) + const class rtl::OUString & keyName + "" +include/registry/registry.hxx:488 + enum RegError RegistryKey::getValueInfo(const class rtl::OUString &,enum RegValueType *,unsigned int *) + const class rtl::OUString & keyName + "" +include/registry/registry.hxx:500 + enum RegError RegistryKey::getValue(const class rtl::OUString &,void *) + const class rtl::OUString & keyName + "" +include/registry/registry.hxx:511 + enum RegError RegistryKey::getLongListValue(const class rtl::OUString &,class RegistryValueList &) + const class rtl::OUString & keyName + "" +include/registry/registry.hxx:522 + enum RegError RegistryKey::getStringListValue(const class rtl::OUString &,class RegistryValueList &) + const class rtl::OUString & keyName + "" +include/registry/registry.hxx:533 + enum RegError RegistryKey::getUnicodeListValue(const class rtl::OUString &,class RegistryValueList &) + const class rtl::OUString & keyName + "" +include/registry/writer.hxx:72 + void typereg::Writer::Writer(enum typereg_Version,const class rtl::OUString &,const class rtl::OUString &,enum RTTypeClass,_Bool,const class rtl::OUString &,unsigned short,unsigned short,unsigned short,unsigned short) + const class rtl::OUString & fileName + "" +include/registry/writer.hxx:131 + void typereg::Writer::setFieldData(unsigned short,const class rtl::OUString &,const class rtl::OUString &,enum RTFieldAccess,const class rtl::OUString &,const class rtl::OUString &,const class RTConstValue &) + const class rtl::OUString & fileName + "" +include/sfx2/dinfdlg.hxx:86 + void SfxDocumentInfoItem::SfxDocumentInfoItem(const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Sequence &,_Bool,_Bool) + _Bool bUseUserData + IsUseUserData() +include/sfx2/dinfdlg.hxx:86 + void SfxDocumentInfoItem::SfxDocumentInfoItem(const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Sequence &,_Bool,_Bool) + _Bool bUseThumbnailSave + IsUseThumbnailSave() +include/sfx2/dinfdlg.hxx:385 + void CustomPropertiesWindow::AddLine(const class rtl::OUString &,const class com::sun::star::uno::Any &) + const class rtl::OUString & sName + "" +include/sfx2/docfile.hxx:257 + _Bool SfxMedium::SignContents_Impl(class weld::Window *,_Bool,_Bool,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class rtl::OUString &) + _Bool bHasValidDocumentSignature + HasValidSignatures() +include/sfx2/docfile.hxx:268 + _Bool SfxMedium::SignDocumentContentUsingCertificate(const class com::sun::star::uno::Reference &,_Bool,const class com::sun::star::uno::Reference &) + _Bool bHasValidDocumentSignature + HasValidSignatures() +include/sfx2/lokhelper.hxx:112 + void SfxLokHelper::notifyAllViews(int,const class rtl::OString &) + const class rtl::OString & rPayload + "" +include/sfx2/objsh.hxx:648 + void SfxObjectShell::DoDraw(class OutputDevice *,const class Point &,const class Size &,const class JobSetup &,unsigned short) + const class JobSetup & rSetup + JobSetup() +include/sfx2/sfxhelp.hxx:40 + _Bool SfxHelp::Start_Impl(const class rtl::OUString &,const class vcl::Window *,const class rtl::OUString &) + const class rtl::OUString & rKeyword + "" +include/sfx2/sidebar/ResourceManager.hxx:94 + void sfx2::sidebar::ResourceManager::StorePanelExpansionState(class std::basic_string_view >,const _Bool,const class sfx2::sidebar::Context &) + const class sfx2::sidebar::Context & rContext + maContextAccess() +include/svl/sharecontrolfile.hxx:62 + void svt::ShareControlFile::RemoveEntry(const class o3tl::enumarray &) + const class o3tl::enumarray & aOptionalSpecification + GenerateOwnEntry() +include/svtools/ehdl.hxx:35 + void SfxErrorContext::SfxErrorContext(unsigned short,class weld::Window *,const struct std::pair *,const class std::locale &) + const class std::locale & rResLocaleP + SvtResLocale() +include/svx/charmap.hxx:150 + void SvxShowCharSet::DrawChars_Impl(class OutputDevice &,int,int) + int n1 + FirstInView() +include/svx/charmap.hxx:150 + void SvxShowCharSet::DrawChars_Impl(class OutputDevice &,int,int) + int n2 + LastInView() +include/svx/colorwindow.hxx:114 + void ColorWindow::ColorWindow(const class rtl::OUString &,const class std::shared_ptr &,class ColorStatus &,unsigned short,const class com::sun::star::uno::Reference &,const class MenuOrToolMenuButton &,const class std::function &,const class std::function &)> &) + const class rtl::OUString & rCommand + "" +include/svx/svdtrans.hxx:63 + void RotateXPoly(class XPolyPolygon &,const class Point &,double,double) + const class Point & rRef + Point() +include/unotools/wincodepage.hxx:31 + unsigned short utl_getWinTextEncodingFromLangStr(const class rtl::OUString &,_Bool) + const class rtl::OUString & sLanguage + utl_getLocaleForGlobalDefaultEncoding() +include/vbahelper/vbahelper.hxx:119 + class rtl::OUString extractStringFromAny(const class com::sun::star::uno::Any &,const class rtl::OUString &,_Bool) + const class rtl::OUString & rDefault + "" +include/vcl/accessibletable.hxx:87 + class tools::Rectangle vcl::table::IAccessibleTable::calcHeaderRect(_Bool) + _Bool _bIsColumnBar + isColumnBar() +include/vcl/dockwin.hxx:39 + void DockingData::DockingData(const class Point &,const class tools::Rectangle &,_Bool) + _Bool b + IsFloatingMode() +include/vcl/dockwin.hxx:50 + void EndDockingData::EndDockingData(const class tools::Rectangle &,_Bool,_Bool) + _Bool b + IsFloatingMode() +include/vcl/dockwin.hxx:50 + void EndDockingData::EndDockingData(const class tools::Rectangle &,_Bool,_Bool) + _Bool bCancelled + IsDockingCanceled() +include/vcl/FilterConfigItem.hxx:79 + class rtl::OUString FilterConfigItem::ReadString(const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & rDefault + "" +include/vcl/graphictools.hxx:278 + void SvtGraphicFill::SvtGraphicFill(const class tools::PolyPolygon &,class Color,double,enum SvtGraphicFill::FillRule,enum SvtGraphicFill::FillType,const struct SvtGraphicFill::Transform &,_Bool,enum SvtGraphicFill::HatchType,class Color,enum SvtGraphicFill::GradientType,class Color,class Color,int,const class Graphic &) + class Color aFillColor + Color() +include/vcl/opengl/OpenGLHelper.hxx:54 + int OpenGLHelper::LoadShaders(const class rtl::OUString &,const class rtl::OUString &,class std::basic_string_view >,class std::basic_string_view >) + class std::basic_string_view > rDigest + "" +include/vcl/outdev.hxx:1589 + class Bitmap OutputDevice::GetDownsampledBitmap(const class Size &,const class Point &,const class Size &,const class Bitmap &,long,long) + const class Point & rSrcPt + Point() +include/vcl/print.hxx:640 + class com::sun::star::uno::Any vcl::PrinterOptionsHelper::setSubgroupControlOpt(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const struct vcl::PrinterOptionsHelper::UIControlOptions &) + const class rtl::OUString & i_rHelpId + "" +include/vcl/print.hxx:656 + class com::sun::star::uno::Any vcl::PrinterOptionsHelper::setChoiceRadiosControlOpt(const class com::sun::star::uno::Sequence &,const class rtl::OUString &,const class com::sun::star::uno::Sequence &,const class rtl::OUString &,const class com::sun::star::uno::Sequence &,int,const class com::sun::star::uno::Sequence &,const struct vcl::PrinterOptionsHelper::UIControlOptions &) + const class rtl::OUString & i_rTitle + "" +include/vcl/print.hxx:667 + class com::sun::star::uno::Any vcl::PrinterOptionsHelper::setRangeControlOpt(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,int,int,int,const struct vcl::PrinterOptionsHelper::UIControlOptions &) + const class rtl::OUString & i_rTitle + "" +include/vcl/print.hxx:675 + class com::sun::star::uno::Any vcl::PrinterOptionsHelper::setEditControlOpt(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const struct vcl::PrinterOptionsHelper::UIControlOptions &) + const class rtl::OUString & i_rTitle + "" +include/vcl/toolbox.hxx:420 + void ToolBox::SetHelpText(struct o3tl::strong_int,const class rtl::OUString &) + const class rtl::OUString & rText + "" +include/vcl/toolkit/field.hxx:313 + class tools::Time TimeFormatter::SpinTime(_Bool,const class tools::Time &,enum TimeFieldFormat,_Bool,const class rtl::OUString &,int,const class LocaleDataWrapper &) + _Bool bDuration + IsDuration() +include/vcl/toolkit/field.hxx:313 + class tools::Time TimeFormatter::SpinTime(_Bool,const class tools::Time &,enum TimeFieldFormat,_Bool,const class rtl::OUString &,int,const class LocaleDataWrapper &) + const class LocaleDataWrapper & rLocaleDataWrapper + ImplGetLocaleDataWrapper() +include/vcl/toolkit/field.hxx:418 + int DateFormatter::GetDateArea(enum ExtDateFieldFormat,const class rtl::OUString &,int,const class LocaleDataWrapper &) + const class LocaleDataWrapper & rLocaleDataWrapper + ImplGetLocaleDataWrapper() +include/vcl/toolkit/svlbitm.hxx:115 + void SvLBoxString::SvLBoxString(const class rtl::OUString &) + const class rtl::OUString & rText + "" +include/vcl/toolkit/unowrap.hxx:70 + class com::sun::star::uno::Reference UnoWrapperBase::CreateAccessible(class Menu *,_Bool) + _Bool bIsMenuBar + IsMenuBar() +include/vcl/transfer.hxx:320 + class com::sun::star::uno::Any TransferableDataHelper::GetAny(enum SotClipboardFormatId,const class rtl::OUString &) const + const class rtl::OUString & rDestDoc + "" +include/vcl/transfer.hxx:358 + class com::sun::star::uno::Sequence TransferableDataHelper::GetSequence(enum SotClipboardFormatId,const class rtl::OUString &) + const class rtl::OUString & rDestDoc + "" +include/vcl/virdev.hxx:164 + _Bool VirtualDevice::SetOutputSizePixelScaleOffsetAndLOKBuffer(const class Size &,const class Fraction &,const class Point &,unsigned char *) + const class Point & rNewOffset + Point() +include/vcl/weld.hxx:635 + void weld::ComboBoxEntry::ComboBoxEntry(const class rtl::OUString &) + const class rtl::OUString & rString + "" +include/vcl/weld.hxx:713 + void weld::ComboBox::append(const class rtl::OUString &,const class rtl::OUString &,class VirtualDevice &) + const class rtl::OUString & rId + "" +include/vcl/weld.hxx:2334 + void weld::Toolbar::append_separator(const class rtl::OUString &) + const class rtl::OUString & rId + "" +include/xmloff/txtparae.hxx:407 + void XMLTextParagraphExport::exportTextStyles(_Bool,_Bool) + _Bool bProg + IsShowProgress() +include/xmloff/txtparae.hxx:457 + void XMLTextParagraphExport::collectTextAutoStyles(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,_Bool) + _Bool bIsProgress + IsShowProgress() +include/xmloff/txtparae.hxx:487 + void XMLTextParagraphExport::exportText(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,_Bool) + _Bool bIsProgress + IsShowProgress() +include/xmloff/xmlexp.hxx:279 + void SvXMLExport::SvXMLExport(const class com::sun::star::uno::Reference &,const class rtl::OUString &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const enum FieldUnit,enum SvXMLExportFlags) + const class rtl::OUString & implementationName + "" +include/xmloff/xmlexp.hxx:279 + void SvXMLExport::SvXMLExport(const class com::sun::star::uno::Reference &,const class rtl::OUString &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const enum FieldUnit,enum SvXMLExportFlags) + const class rtl::OUString & rFileName + "" +include/xmloff/XMLFontStylesContext.hxx:51 + void XMLFontStylesContext::XMLFontStylesContext(class SvXMLImport &,unsigned short) + unsigned short eDfltEnc + osl_getThreadTextEncoding() +lotuswordpro/inc/lwpoverride.hxx:189 + void LwpBulletOverride::OverrideSkip(_Bool) + _Bool bOver + IsSkip() +lotuswordpro/inc/lwpoverride.hxx:190 + void LwpBulletOverride::OverrideRightAligned(_Bool) + _Bool bOver + IsRightAligned() +lotuswordpro/inc/lwpoverride.hxx:399 + void LwpIndentOverride::OverrideUseRelative(_Bool) + _Bool use + IsUseRelative() +lotuswordpro/source/filter/lwpbreaksoverride.hxx:121 + void LwpBreaksOverride::OverridePageBreakBefore(_Bool) + _Bool bVal + IsPageBreakBefore() +lotuswordpro/source/filter/lwpbreaksoverride.hxx:122 + void LwpBreaksOverride::OverridePageBreakAfter(_Bool) + _Bool bVal + IsPageBreakAfter() +lotuswordpro/source/filter/lwpbreaksoverride.hxx:123 + void LwpBreaksOverride::OverridePageBreakWithin(_Bool) + _Bool bVal + IsPageBreakWithin() +lotuswordpro/source/filter/lwpbreaksoverride.hxx:124 + void LwpBreaksOverride::OverrideColumnBreakBefore(_Bool) + _Bool bVal + IsColumnBreakBefore() +lotuswordpro/source/filter/lwpbreaksoverride.hxx:125 + void LwpBreaksOverride::OverrideColumnBreakAfter(_Bool) + _Bool bVal + IsColumnBreakAfter() +lotuswordpro/source/filter/lwpbreaksoverride.hxx:126 + void LwpBreaksOverride::OverrideKeepWithNext(_Bool) + _Bool bVal + IsKeepWithNext() +lotuswordpro/source/filter/lwpbreaksoverride.hxx:127 + void LwpBreaksOverride::OverrideKeepWithPrevious(_Bool) + _Bool bVal + IsKeepWithPrevious() +lotuswordpro/source/filter/lwpbreaksoverride.hxx:128 + void LwpBreaksOverride::OverrideUseNextStyle(_Bool) + _Bool bVal + IsUseNextStyle() +opencl/source/opencl_device.cxx:432 + void (anonymous namespace)::LogWriter::text(const class rtl::OString &) + const class rtl::OString & rText + "" +opencl/source/openclwrapper.cxx:707 + struct _cl_device_id * findDeviceIdByDeviceString(class std::basic_string_view >,const class std::__debug::vector > &) + const class std::__debug::vector > & rPlatforms + fillOpenCLInfo() +reportdesign/source/ui/dlg/Condition.hxx:129 + void rptui::Condition::setConditionIndex(unsigned long,unsigned long) + unsigned long _nCondCount + impl_getConditionCount() +sal/qa/osl/file/osl_File.cxx:377 + class rtl::OString outputError(const class rtl::OString &,const class rtl::OString &,const char *) + const char * msg + "" +sc/inc/rangeseq.hxx:99 + _Bool ScByteSequenceToString::GetString(class rtl::OUString &,const class com::sun::star::uno::Any &,unsigned short) + unsigned short nEncoding + osl_getThreadTextEncoding() +sc/inc/table.hxx:788 + void ScTable::SetOptimalHeightOnly(class sc::RowHeightContext &,int,int,class ScProgress *,unsigned long) + int nEndRow + MaxRow() +sc/inc/typedstrdata.hxx:42 + _Bool ScTypedStrData::LessCaseInsensitive::operator()(const class ScTypedStrData &,const class ScTypedStrData &) const + const class ScTypedStrData & left + LessCaseInsensitive() +sc/qa/extras/check_xcell_ranges_query.cxx:38 + void sc_apitest::CheckXCellRangesQuery::_queryEmptyCells(const class rtl::OUString &) + const class rtl::OUString & expected + "" +sc/qa/unit/helper/qahelper.hxx:193 + class tools::SvRef ScBootstrapFixture::saveAndReload(class ScDocShell *,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,enum SfxFilterFlags,const class rtl::OUString *) + const class rtl::OUString & rUserData + "" +sc/source/core/data/documen3.cxx:1755 + _Bool lcl_AddTwipsWhile(long &,long,int &,int,const class ScTable *,_Bool) + int nEndRow + MaxRow() +sc/source/core/tool/token.cxx:4818 + void appendTokenByType(struct ScSheetLimits &,struct sc::TokenStringContext &,class rtl::OUStringBuffer &,const class formula::FormulaToken &,const class ScAddress &,_Bool) + _Bool bFromRangeName + IsFromRangeName() +sc/source/filter/excel/xeformula.cxx:150 + void (anonymous namespace)::XclExpFuncData::FinishParam(unsigned short) + unsigned short nTokPos + PopOperandPos() +sc/source/filter/excel/xltoolbar.hxx:46 + _Bool ScTBC::ImportToolBarControl(class ScCTBWrapper &,const class com::sun::star::uno::Reference &,class CustomToolBarImportHelper &,_Bool) + _Bool bIsMenuBar + IsMenuToolbar() +sc/source/filter/inc/workbookhelper.hxx:166 + class ScRangeData * oox::xls::WorkbookHelper::createNamedRangeObject(class rtl::OUString &,const class com::sun::star::uno::Sequence &,int,int) const + const class com::sun::star::uno::Sequence & rTokens + ApiTokenSequence() +sc/source/filter/inc/workbookhelper.hxx:175 + class ScRangeData * oox::xls::WorkbookHelper::createLocalNamedRangeObject(class rtl::OUString &,const class com::sun::star::uno::Sequence &,int,int,int) const + const class com::sun::star::uno::Sequence & rTokens + ApiTokenSequence() +sc/source/filter/inc/xechart.hxx:798 + void XclExpChChart3d::Convert(const class ScfPropertySet &,_Bool) + _Bool b3dWallChart + Is3dWallChart() +sc/source/filter/inc/xestream.hxx:287 + void XclExpXmlStream::XclExpXmlStream(const class com::sun::star::uno::Reference &,_Bool,_Bool) + _Bool bExportTemplate + isExportTemplate() +sc/source/filter/inc/xestyle.hxx:145 + _Bool CheckItems(const class XclExpRoot &,const class SfxItemSet &,short,_Bool) + _Bool bDeep + IsStyleXF() +sc/source/filter/inc/xichart.hxx:893 + class com::sun::star::uno::Reference XclImpChType::CreateCoordSystem(_Bool) const + _Bool b3dChart + Is3dChart() +sc/source/filter/inc/xichart.hxx:896 + class com::sun::star::uno::Reference XclImpChType::CreateChartType(const class com::sun::star::uno::Reference &,_Bool) const + _Bool b3dChart + Is3dChart() +sc/source/filter/inc/xichart.hxx:913 + void XclImpChChart3d::Convert(class ScfPropertySet &,_Bool) const + _Bool b3dWallChart + Is3dWallChart() +sc/source/filter/inc/xistream.hxx:445 + void XclImpStream::IgnoreUniString(unsigned short,unsigned char) + unsigned char nFlags + ReaduInt8() +sc/source/filter/inc/xlescher.hxx:423 + _Bool XclControlHelper::FillMacroDescriptor(struct com::sun::star::script::ScriptEventDescriptor &,enum XclTbxEventType,const class rtl::OUString &,class SfxObjectShell *) + enum XclTbxEventType eEventType + DoGetEventType() +sc/source/filter/oox/formulabuffer.cxx:317 + void processSheetFormulaCells(class ScDocumentImport &,struct oox::xls::FormulaBuffer::SheetItem &,class SvNumberFormatter &,const class com::sun::star::uno::Sequence &,_Bool) + _Bool bGeneratorKnownGood + isGeneratorKnownGood() +sc/source/ui/inc/AccessibleCsvControl.hxx:445 + void ScAccessibleCsvCell::ScAccessibleCsvCell(class ScCsvGrid &,const class rtl::OUString &,int,int) + class ScCsvGrid & rGrid + implGetGrid() +sc/source/ui/vba/vbasheetobject.hxx:174 + void ScVbaButton::ScVbaButton(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &) + const class com::sun::star::uno::Reference & rxFormIC + createForm() +sc/source/ui/vba/vbawindows.cxx:106 + void (anonymous namespace)::WindowEnumImpl::WindowEnumImpl(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Any &) + const class com::sun::star::uno::Any & aApplication + Application() +sd/source/filter/eppt/eppt.hxx:177 + unsigned int PPTWriter::ImplInsertBookmarkURL(const class rtl::OUString &,const unsigned int,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &) + const class rtl::OUString & rStringVer2 + "" +sd/source/filter/eppt/pptx-animations.cxx:563 + void (anonymous namespace)::NodeContext::initValid(_Bool,_Bool) + _Bool bHasValidChild + initChildNodes() +sd/source/filter/xml/sdxmlwrp.cxx:136 + const struct (anonymous namespace)::XML_SERVICES * getServices(_Bool,_Bool,unsigned long) + _Bool bDraw + IsDraw() +sd/source/ui/annotations/annotationtag.cxx:164 + void sd::(anonymous namespace)::AnnotationHdl::AnnotationHdl(const class rtl::Reference &,const class com::sun::star::uno::Reference &,const class Point &) + const class Point & rPnt + Point() +sd/source/ui/slidesorter/cache/SlsRequestFactory.hxx:31 + void sd::slidesorter::cache::RequestFactory::operator()(class sd::slidesorter::cache::RequestQueue &,const class std::shared_ptr &) + class sd::slidesorter::cache::RequestQueue & rRequestQueue + RequestFactory() +sdext/source/pdfimport/inc/contentsink.hxx:130 + void pdfi::ContentSink::strokePath(const class com::sun::star::uno::Reference &) + const class com::sun::star::uno::Reference & rPath + readPath() +sdext/source/pdfimport/inc/contentsink.hxx:132 + void pdfi::ContentSink::fillPath(const class com::sun::star::uno::Reference &) + const class com::sun::star::uno::Reference & rPath + readPath() +sdext/source/pdfimport/inc/contentsink.hxx:134 + void pdfi::ContentSink::eoFillPath(const class com::sun::star::uno::Reference &) + const class com::sun::star::uno::Reference & rPath + readPath() +sdext/source/pdfimport/inc/contentsink.hxx:137 + void pdfi::ContentSink::intersectClip(const class com::sun::star::uno::Reference &) + const class com::sun::star::uno::Reference & rPath + readPath() +sdext/source/pdfimport/inc/contentsink.hxx:139 + void pdfi::ContentSink::intersectEoClip(const class com::sun::star::uno::Reference &) + const class com::sun::star::uno::Reference & rPath + readPath() +sdext/source/pdfimport/inc/contentsink.hxx:151 + void pdfi::ContentSink::drawMask(const class com::sun::star::uno::Sequence &,_Bool) + const class com::sun::star::uno::Sequence & xBitmap + readImageImpl() +sdext/source/presenter/PresenterConfigurationAccess.hxx:116 + class com::sun::star::uno::Reference sdext::presenter::PresenterConfigurationAccess::GetNodeProperties(const class com::sun::star::uno::Reference &,const class rtl::OUString &) + const class rtl::OUString & rsPathToNode + "" +sfx2/source/inc/versdlg.hxx:51 + void SfxVersionDialog::SfxVersionDialog(class weld::Window *,class SfxViewFrame *,_Bool) + _Bool + IsSaveVersionOnClose() +slideshow/source/engine/opengl/TransitionImpl.cxx:636 + class std::shared_ptr makeSimpleTransition(const class std::__debug::vector > &,const class std::__debug::vector > &,const class std::__debug::vector, class std::allocator > > &,const struct TransitionSettings &) + const struct TransitionSettings & rSettings + TransitionSettings() +slideshow/source/engine/opengl/TransitionImpl.cxx:2033 + class std::shared_ptr makeGlitterTransition(const class std::__debug::vector > &,const class std::__debug::vector > &,const struct TransitionSettings &) + const struct TransitionSettings & rSettings + TransitionSettings() +slideshow/source/inc/transitionfactory.hxx:61 + class std::shared_ptr createShapeTransition(const struct slideshow::internal::ActivitiesFactory::CommonParameters &,const class std::shared_ptr &,const class std::shared_ptr &,const class basegfx::B2DVector &,const class com::sun::star::uno::Reference &) + const struct slideshow::internal::ActivitiesFactory::CommonParameters & rParms + fillCommonParameters() +soltools/cpp/cpp.h:212 + void peektokens(struct tokenrow *,char *) + char * + "" +starmath/inc/cursor.hxx:185 + void SmCursor::Draw(class OutputDevice &,class Point,_Bool) + _Bool isCaretVisible + IsCursorVisible() +starmath/inc/token.hxx:199 + void SmColorTokenTableEntry::SmColorTokenTableEntry(const char *,enum SmTokenType,unsigned int) + const char * name + "" +store/source/lockbyte.cxx:269 + void store::(anonymous namespace)::FileHandle::CloseFile::operator()(struct store::(anonymous namespace)::FileHandle &) const + struct store::(anonymous namespace)::FileHandle & rFile + destructor_type() +store/source/lockbyte.cxx:495 + void store::(anonymous namespace)::FileMapping::UnmapFile::operator()(struct store::(anonymous namespace)::FileMapping &) const + struct store::(anonymous namespace)::FileMapping & rMapping + destructor_type() +store/source/lockbyte.cxx:827 + void store::(anonymous namespace)::ResourceHolder::ResourceHolder(const type-parameter-?-? &) + const type-parameter-?-? & value + T() +svx/inc/dragmt3d.hxx:91 + void E3dDragRotate::E3dDragRotate(class SdrDragView &,const class SdrMarkList &,enum E3dDragConstraint,_Bool) + _Bool bFull + IsSolidDragging() +svx/inc/dragmt3d.hxx:108 + void E3dDragMove::E3dDragMove(class SdrDragView &,const class SdrMarkList &,enum SdrHdlKind,enum E3dDragConstraint,_Bool) + _Bool bFull + IsSolidDragging() +svx/source/inc/treevisitor.hxx:29 + void TreeVisitor::TreeVisitor(type-parameter-?-?) + type-parameter-?-? _nodeInfo + FormHierarchyComparator() +svx/source/inc/xmlxtexp.hxx:46 + _Bool SvxXMLXTableExportComponent::save(const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,class rtl::OUString *) + const class com::sun::star::uno::Reference & xTable + createInstance() +svx/source/inc/xmlxtimp.hxx:42 + _Bool SvxXMLXTableImport::load(const class rtl::OUString &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,_Bool *) + const class com::sun::star::uno::Reference & xTable + createInstance() +svx/source/svdraw/svdmodel.cxx:1817 + void addPair(class std::__debug::vector, class std::allocator > > &,const class rtl::OUString &,const type-parameter-?-?) + const type-parameter-?-? val + IsAnchoredTextOverflowLegacy() +sw/inc/ftnidx.hxx:38 + _Bool CompareSwFootnoteIdxs::operator()(class SwTextFootnote *const &,class SwTextFootnote *const &) const + class SwTextFootnote *const & lhs + Compare() +sw/inc/ndarr.hxx:73 + _Bool CompareSwOutlineNodes::operator()(class SwNode *const &,class SwNode *const &) const + class SwNode *const & lhs + Compare() +sw/inc/shellio.hxx:165 + void SwReader::SwReader(class SvStream &,const class rtl::OUString &,const class rtl::OUString &,class SwPaM &) + const class rtl::OUString & rFilename + "" +sw/inc/shellio.hxx:167 + void SwReader::SwReader(const class com::sun::star::uno::Reference &,const class rtl::OUString &,class SwPaM &) + const class rtl::OUString & rFilename + "" +sw/inc/shellio.hxx:461 + class SvStream & Writer::OutLong(class SvStream &,long) + class SvStream & rStrm + Strm() +sw/inc/shellio.hxx:462 + class SvStream & Writer::OutULong(class SvStream &,unsigned long) + class SvStream & rStrm + Strm() +sw/inc/tblsel.hxx:47 + _Bool CompareSwSelBoxes::operator()(class SwTableBox *const &,class SwTableBox *const &) const + class SwTableBox *const & lhs + Compare() +sw/inc/tox.hxx:188 + class SwContentFrame * SwTOXType::FindContentFrame(const class SwDoc &,const class SwRootFrame &,const _Bool) const + const _Bool isReadOnlyAvailable + IsReadOnlyAvailable() +sw/source/core/access/acctable.cxx:102 + void SwAccessibleTableData_Impl::SwAccessibleTableData_Impl(class SwAccessibleMap &,const class SwTabFrame *,_Bool,_Bool) + _Bool bIsInPagePreview + IsInPagePreview() +sw/source/core/crsr/crstrvl.cxx:628 + void lcl_MakeFieldLst(class SetGetExpFields &,const class SwFieldType &,const _Bool,const _Bool) + const _Bool bInReadOnly + IsReadOnlyAvailable() +sw/source/core/graphic/grfatr.cxx:48 + _Bool lcl_IsHoriOnEvenPages(enum MirrorGraph,_Bool) + _Bool bToggle + IsGrfToggle() +sw/source/core/inc/anchoredobjectposition.hxx:182 + long objectpositioning::SwAnchoredObjectPosition::AdjustVertRelPos(const long,const _Bool,const _Bool,const class SwFrame &,const long,const _Bool,const _Bool) const + const _Bool bFollowTextFlow + DoesObjFollowsTextFlow() +sw/source/core/inc/layact.hxx:200 + void SwLayIdle::SwLayIdle(class SwRootFrame *,class SwViewShellImp *) + class SwViewShellImp * pImp + Imp() +sw/source/core/inc/swfont.hxx:77 + void SwSubFont::DrawText_(class SwDrawTextInfo &,const _Bool) + const _Bool bGrey + IsGreyWave() +sw/source/core/inc/wrong.hxx:83 + void SwWrongArea::SwWrongArea(const class rtl::OUString &,const class com::sun::star::uno::Reference &,int,int,class SwWrongList *) + const class rtl::OUString & rType + "" +sw/source/core/inc/wrong.hxx:325 + void SwWrongList::Insert(const class rtl::OUString &,const class com::sun::star::uno::Reference &,int,int,unsigned short) + const class rtl::OUString & rType + "" +sw/source/core/layout/laycache.cxx:950 + _Bool (anonymous namespace)::SdrObjectCompare::operator()(const class SdrObject *,const class SdrObject *) const + const class SdrObject * pF1 + Compare() +sw/source/core/layout/laycache.cxx:958 + _Bool (anonymous namespace)::FlyCacheCompare::operator()(const class SwFlyCache *,const class SwFlyCache *) const + const class SwFlyCache * pC1 + Compare() +sw/source/core/text/guess.hxx:47 + _Bool SwTextGuess::Guess(const class SwTextPortion &,class SwTextFormatInfo &,const unsigned short) + const unsigned short nHeight + Height() +sw/source/core/text/inftxt.hxx:401 + void SwTextPaintInfo::DrawPostIts(_Bool) const + _Bool bScript + IsScript() +sw/source/core/text/inftxt.hxx:542 + void SwTextFormatInfo::Left(const long) + const long nNew + Left() +sw/source/core/text/inftxt.hxx:544 + void SwTextFormatInfo::Right(const long) + const long nNew + Right() +sw/source/core/text/inftxt.hxx:546 + void SwTextFormatInfo::First(const long) + const long nNew + FirstLeft() +sw/source/core/text/inftxt.hxx:566 + void SwTextFormatInfo::ChkNoHyph(const unsigned char,const unsigned char) + const unsigned char bEnd + CntEndHyph() +sw/source/core/text/inftxt.hxx:566 + void SwTextFormatInfo::ChkNoHyph(const unsigned char,const unsigned char) + const unsigned char bMid + CntMidHyph() +sw/source/core/text/itrpaint.hxx:48 + void SwTextPainter::DrawTextLine(const class SwRect &,class SwSaveClip &,const _Bool) + const _Bool bUnderSz + IsUndersized() +sw/source/core/txtnode/modeltoviewhelper.cxx:52 + _Bool (anonymous namespace)::sortfieldresults::operator()(const struct (anonymous namespace)::FieldResult &,const struct (anonymous namespace)::FieldResult &) const + const struct (anonymous namespace)::FieldResult & rOne + Compare() +sw/source/filter/html/swcss1.hxx:84 + void SwCSS1Parser::SwCSS1Parser(class SwDoc *,const class SwHTMLParser &,const unsigned int *,const class rtl::OUString &,_Bool) + _Bool bNewDoc + IsNewDoc() +sw/source/filter/html/swhtml.hxx:914 + void SwHTMLParser::SwHTMLParser(class SwDoc *,class SwPaM &,class SvStream &,const class rtl::OUString &,const class rtl::OUString &,_Bool,class SfxMedium *,_Bool,_Bool,const class rtl::OUString &) + _Bool bReadUTF8 + IsReadUTF8() +sw/source/filter/inc/wrtswtbl.hxx:204 + _Bool SwWriteTableColLess::operator()(const class std::unique_ptr > &,const class std::unique_ptr > &) + const class std::unique_ptr > & lhs + Compare() +sw/source/filter/ww8/docxattributeoutput.cxx:6338 + _Bool (anonymous namespace)::OUStringIgnoreCase::operator()(const class rtl::OUString &,class std::basic_string_view >) const + const class rtl::OUString & lhs + Compare() +sw/source/filter/ww8/docxexport.hxx:276 + void DocxExport::DocxExport(class DocxExportFilter &,class SwDoc &,class std::shared_ptr &,class SwPaM &,_Bool,_Bool) + _Bool bTemplate + isExportTemplate() +sw/source/filter/ww8/wrtww8.hxx:269 + void WW8_WrPlcSepx::WriteSepx(class SvStream &) const + class SvStream & rStrm + Strm() +sw/source/filter/ww8/ww8scan.hxx:1538 + void WW8Fib::Write(class SvStream &) + class SvStream & rStrm + Strm() +sw/source/filter/xml/xmlimp.hxx:126 + void SwXMLImport::InsertStyles(_Bool) + _Bool bAuto + IsAutomaticStyle() +sw/source/filter/xml/xmltble.cxx:92 + _Bool (anonymous namespace)::SwXMLTableColumnCmpWidth_Impl::operator()(class SwXMLTableColumn_Impl *const &,class SwXMLTableColumn_Impl *const &) const + class SwXMLTableColumn_Impl *const & lhs + Compare() +sw/source/filter/xml/xmltexti.hxx:38 + void SwXMLTextImportHelper::SwXMLTextImportHelper(const class com::sun::star::uno::Reference &,class SvXMLImport &,const class com::sun::star::uno::Reference &,_Bool,_Bool,_Bool,_Bool) + _Bool bInsertM + IsInsertMode() +sw/source/filter/xml/xmltexti.hxx:38 + void SwXMLTextImportHelper::SwXMLTextImportHelper(const class com::sun::star::uno::Reference &,class SvXMLImport &,const class com::sun::star::uno::Reference &,_Bool,_Bool,_Bool,_Bool) + _Bool bStylesOnlyM + IsStylesOnlyMode() +sw/source/filter/xml/xmltexti.hxx:38 + void SwXMLTextImportHelper::SwXMLTextImportHelper(const class com::sun::star::uno::Reference &,class SvXMLImport &,const class com::sun::star::uno::Reference &,_Bool,_Bool,_Bool,_Bool) + _Bool bBlockM + IsBlockMode() +sw/source/ui/vba/vbadocuments.cxx:52 + void (anonymous namespace)::DocumentEnumImpl::DocumentEnumImpl(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Any &) + const class com::sun::star::uno::Any & aApplication + Application() +sw/source/uibase/inc/swuipardlg.hxx:34 + void SwParaDlg::SwParaDlg(class weld::Window *,class SwView &,const class SfxItemSet &,unsigned char,const class rtl::OUString *,_Bool,const class rtl::OString &) + const class rtl::OString & sDefPage + "" +sw/source/uibase/lingu/sdrhhcwrap.hxx:42 + void SdrHHCWrapper::SdrHHCWrapper(class SwView *,struct o3tl::strong_int,struct o3tl::strong_int,const class vcl::Font *,int,_Bool) + _Bool bInteractive + IsInteractive() +toolkit/inc/helper/unopropertyarrayhelper.hxx:38 + void UnoPropertyArrayHelper::UnoPropertyArrayHelper(const class com::sun::star::uno::Sequence &) + const class com::sun::star::uno::Sequence & rIDs + ImplGetPropertyIds() +vbahelper/source/vbahelper/vbacommandbarcontrols.hxx:36 + class com::sun::star::uno::Sequence ScVbaCommandBarControls::CreateMenuItemData(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,unsigned short,const class com::sun::star::uno::Any &,_Bool,_Bool) + const class rtl::OUString & sHelpURL + "" +vbahelper/source/vbahelper/vbacommandbarcontrols.hxx:43 + class com::sun::star::uno::Sequence ScVbaCommandBarControls::CreateToolbarItemData(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,unsigned short,const class com::sun::star::uno::Any &,_Bool,int) + const class rtl::OUString & sHelpURL + "" +vcl/inc/fontinstance.hxx:78 + _Bool LogicalFontInstance::GetGlyphBoundRect(unsigned short,class tools::Rectangle &,_Bool) const + _Bool + IsVertical() +vcl/inc/fontinstance.hxx:79 + _Bool LogicalFontInstance::GetGlyphOutline(unsigned short,class basegfx::B2DPolyPolygon &,_Bool) const + _Bool + IsVertical() +vcl/inc/unx/fc_fontoptions.hxx:33 + void FontConfigFontOptions::SyncPattern(const class rtl::OString &,unsigned int,unsigned int,_Bool) + _Bool bEmbolden + NeedsArtificialBold() +vcl/inc/WidgetDrawInterface.hxx:88 + _Bool vcl::WidgetDrawInterface::getNativeControlRegion(enum ControlType,enum ControlPart,const class tools::Rectangle &,enum ControlState,const class ImplControlValue &,const class rtl::OUString &,class tools::Rectangle &,class tools::Rectangle &) + const class rtl::OUString & aCaption + "" +vcl/skia/gdiimpl.cxx:936 + _Bool (anonymous namespace)::LessThan::operator()(const class basegfx::B2DPoint &,const class basegfx::B2DPoint &) const + const class basegfx::B2DPoint & point1 + Compare() +vcl/source/control/field2.cxx:393 + void ImplPatternProcessStrictModify(class Edit *,const class rtl::OString &,const class rtl::OUString &,_Bool) + _Bool bSameMask + ImplIsSameMask() +vcl/source/control/field2.cxx:1230 + _Bool ImplDateProcessKeyInput(const class KeyEvent &,enum ExtDateFieldFormat,const class LocaleDataWrapper &) + const class LocaleDataWrapper & rLocaleDataWrapper + ImplGetLocaleDataWrapper() +vcl/source/control/field2.cxx:2228 + _Bool ImplTimeProcessKeyInput(const class KeyEvent &,_Bool,_Bool,enum TimeFieldFormat,const class LocaleDataWrapper &) + _Bool bStrictFormat + IsStrictFormat() +vcl/source/control/field2.cxx:2228 + _Bool ImplTimeProcessKeyInput(const class KeyEvent &,_Bool,_Bool,enum TimeFieldFormat,const class LocaleDataWrapper &) + _Bool bDuration + IsDuration() +vcl/source/control/field2.cxx:2228 + _Bool ImplTimeProcessKeyInput(const class KeyEvent &,_Bool,_Bool,enum TimeFieldFormat,const class LocaleDataWrapper &) + const class LocaleDataWrapper & rLocaleDataWrapper + ImplGetLocaleDataWrapper() +vcl/source/control/field.cxx:916 + _Bool ImplMetricProcessKeyInput(const class KeyEvent &,_Bool,const class LocaleDataWrapper &) + _Bool bUseThousandSep + IsUseThousandSep() +vcl/source/control/field.cxx:916 + _Bool ImplMetricProcessKeyInput(const class KeyEvent &,_Bool,const class LocaleDataWrapper &) + const class LocaleDataWrapper & rWrapper + ImplGetLocaleDataWrapper() +vcl/source/control/field.cxx:1638 + _Bool ImplCurrencyProcessKeyInput(const class KeyEvent &,_Bool,const class LocaleDataWrapper &) + _Bool bUseThousandSep + IsUseThousandSep() +vcl/source/control/field.cxx:1638 + _Bool ImplCurrencyProcessKeyInput(const class KeyEvent &,_Bool,const class LocaleDataWrapper &) + const class LocaleDataWrapper & rWrapper + ImplGetLocaleDataWrapper() +vcl/source/control/field.cxx:1645 + _Bool ImplCurrencyGetValue(const class rtl::OUString &,long &,unsigned short,const class LocaleDataWrapper &) + const class LocaleDataWrapper & rWrapper + ImplGetLocaleDataWrapper() +vcl/source/control/imivctl.hxx:405 + void SvxIconChoiceCtrl_Impl::SetColumn(unsigned short,const class SvxIconChoiceCtrlColumnInfo &) + const class SvxIconChoiceCtrlColumnInfo & + SvxIconChoiceCtrlColumnInfo() +vcl/source/edit/vclmedit.cxx:101 + void ImpVclMEdit::Enable(_Bool) + _Bool bEnable + IsEnabled() +vcl/source/treelist/iconview.cxx:246 + void lcl_DumpEntryAndSiblings(class tools::JsonWriter &,class SvTreeListEntry *,class SvTreeListBox *) + class SvTreeListEntry * pEntry + First() +vcl/unx/gtk3/gtk3gtkinst.cxx:9811 + _Bool (anonymous namespace)::CompareGtkTreePath::operator()(const struct _GtkTreePath *,const struct _GtkTreePath *) const + const struct _GtkTreePath * lhs + Compare() +vcl/unx/kf5/KF5SalFrame.hxx:32 + void KF5SalFrame::KF5SalFrame(class KF5SalFrame *,enum SalFrameStyleFlags,_Bool) + _Bool bUseCairo + useCairo() +writerfilter/source/rtftok/rtflookahead.hxx:28 + void writerfilter::rtftok::RTFLookahead::RTFLookahead(class SvStream &,unsigned long) + class SvStream & rStream + Strm() +writerperfect/qa/unit/WpftLoader.hxx:70 + void writerperfect::test::WpftLoader::WpftLoader(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &) + const class com::sun::star::uno::Reference & rxInputStream + createDummyInput() +xmlhelp/source/cxxhelp/provider/urlparameter.cxx:292 + void (anonymous namespace)::InputStreamTransformer::InputStreamTransformer(class chelp::URLParameter *,class chelp::Databases *,_Bool) + _Bool isRoot + isRoot() +xmlhelp/source/cxxhelp/provider/urlparameter.hxx:214 + _Bool chelp::URLParameter::name(_Bool) + _Bool modulePresent + module() +xmloff/source/style/xmlexppr.cxx:97 + _Bool (anonymous namespace)::ComparePropertyState::operator()(const struct XMLPropertyState &,const struct XMLPropertyState &) + const struct XMLPropertyState & lhs + Compare() +xmloff/source/style/XMLFontAutoStylePool.cxx:122 + _Bool (anonymous namespace)::XMLFontAutoStylePoolEntryCmp_Impl::operator()(const class std::unique_ptr > &,const class std::unique_ptr > &) const + const class std::unique_ptr > & r1 + Compare() +xmloff/source/text/XMLTextListAutoStylePool.cxx:123 + _Bool (anonymous namespace)::XMLTextListAutoStylePoolEntryCmp_Impl::operator()(const class std::unique_ptr > &,const class std::unique_ptr > &) const + const class std::unique_ptr > & r1 + Compare() diff --git a/compilerplugins/clang/constantparam.cxx b/compilerplugins/clang/constantparam.cxx new file mode 100644 index 0000000000..db82bc4df9 --- /dev/null +++ b/compilerplugins/clang/constantparam.cxx @@ -0,0 +1,298 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include +#include + +#include "plugin.hxx" +#include "compat.hxx" +#include "check.hxx" +#include "functionaddress.hxx" + +/* + Find params on methods where the param is only ever passed as a single constant value. + + The process goes something like this: + $ make check + $ make FORCE_COMPILE=all COMPILER_PLUGIN_TOOL='constantparam' check + $ ./compilerplugins/clang/constantparam.py + + TODO look for OUString and OString params and check for call-params that are always either "" or default constructed + + FIXME this plugin manages to trigger crashes inside clang, when calling EvaluateAsInt, so I end up disabling it for a handful of files + here and there. +*/ + +namespace { + +struct MyCallSiteInfo +{ + std::string returnType; + std::string nameAndParams; + std::string paramName; + std::string paramType; + int paramIndex; // because in some declarations the names are empty + std::string callValue; + std::string sourceLocation; +}; +bool operator < (const MyCallSiteInfo &lhs, const MyCallSiteInfo &rhs) +{ + return std::tie(lhs.sourceLocation, lhs.paramIndex, lhs.callValue) + < std::tie(rhs.sourceLocation, rhs.paramIndex, rhs.callValue); +} + + +// try to limit the voluminous output a little +static std::set callSet; + +class ConstantParam: + public loplugin::FunctionAddress> +{ +public: + explicit ConstantParam(loplugin::InstantiationData const & data): FunctionAddress(data) {} + + virtual void run() override + { + handler.enableTreeWideAnalysisMode(); + + // ignore some files that make clang crash inside EvaluateAsInt + std::string fn(handler.getMainFileName()); + loplugin::normalizeDotDotInFilePath(fn); + if (loplugin::isSamePathname(fn, SRCDIR "/basegfx/source/matrix/b2dhommatrix.cxx") + || loplugin::isSamePathname(fn, SRCDIR "/basegfx/source/matrix/b3dhommatrix.cxx")) + return; + + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + + // this catches places that take the address of a method + for (auto functionDecl : getFunctionsWithAddressTaken()) + { + for (unsigned i = 0; i < functionDecl->getNumParams(); ++i) + addToCallSet(functionDecl, i, functionDecl->getParamDecl(i)->getName(), "unknown3"); + } + + // dump all our output in one write call - this is to try and limit IO "crosstalk" between multiple processes + // writing to the same logfile + + std::string output; + for (const MyCallSiteInfo & s : callSet) + output += s.returnType + "\t" + s.nameAndParams + "\t" + s.sourceLocation + "\t" + + s.paramName + "\t" + s.paramType + "\t" + s.callValue + "\n"; + std::ofstream myfile; + myfile.open( WORKDIR "/loplugin.constantparam.log", std::ios::app | std::ios::out); + myfile << output; + myfile.close(); + } + + bool shouldVisitTemplateInstantiations () const { return true; } + bool shouldVisitImplicitCode () const { return true; } + + bool VisitCallExpr( const CallExpr* ); + bool VisitCXXConstructExpr( const CXXConstructExpr* ); +private: + void addToCallSet(const FunctionDecl* functionDecl, int paramIndex, llvm::StringRef paramName, const std::string& callValue); + std::string getCallValue(const Expr* arg); +}; + +void ConstantParam::addToCallSet(const FunctionDecl* functionDecl, int paramIndex, llvm::StringRef paramName, const std::string& callValue) +{ + if (functionDecl->getInstantiatedFromMemberFunction()) + functionDecl = functionDecl->getInstantiatedFromMemberFunction(); + else if (functionDecl->getTemplateInstantiationPattern()) + functionDecl = functionDecl->getTemplateInstantiationPattern(); + + if (!functionDecl->getNameInfo().getLoc().isValid()) + return; + if (functionDecl->isVariadic()) + return; + // ignore stuff that forms part of the stable URE interface + if (isInUnoIncludeFile(functionDecl)) + return; + SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( functionDecl->getLocation() ); + StringRef filename = getFilenameOfLocation(expansionLoc); + if (!loplugin::hasPathnamePrefix(filename, SRCDIR "/")) + return; + filename = filename.substr(strlen(SRCDIR)+1); + + MyCallSiteInfo aInfo; + aInfo.returnType = functionDecl->getReturnType().getCanonicalType().getAsString(); + + if (isa(functionDecl)) { + const CXXRecordDecl* recordDecl = dyn_cast(functionDecl)->getParent(); + aInfo.nameAndParams += recordDecl->getQualifiedNameAsString(); + aInfo.nameAndParams += "::"; + } + aInfo.nameAndParams += functionDecl->getNameAsString() + "("; + bool bFirst = true; + for (const ParmVarDecl *pParmVarDecl : functionDecl->parameters()) { + if (bFirst) + bFirst = false; + else + aInfo.nameAndParams += ","; + aInfo.nameAndParams += pParmVarDecl->getType().getCanonicalType().getAsString(); + } + aInfo.nameAndParams += ")"; + if (isa(functionDecl) && dyn_cast(functionDecl)->isConst()) { + aInfo.nameAndParams += " const"; + } + aInfo.paramName = paramName.str(); + aInfo.paramIndex = paramIndex; + if (paramIndex < (int)functionDecl->getNumParams()) + aInfo.paramType = functionDecl->getParamDecl(paramIndex)->getType().getCanonicalType().getAsString(); + + aInfo.callValue = callValue; + aInfo.sourceLocation = filename.str() + ":" + std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc)); + loplugin::normalizeDotDotInFilePath(aInfo.sourceLocation); + + callSet.insert(aInfo); +} + +std::string ConstantParam::getCallValue(const Expr* arg) +{ + arg = arg->IgnoreParenCasts(); + if (isa(arg)) { + arg = dyn_cast(arg)->getExpr(); + } + arg = arg->IgnoreParenCasts(); + // ignore this, it seems to trigger an infinite recursion + if (isa(arg)) + return "unknown1"; + if (arg->isValueDependent()) + return "unknown2"; + APSInt x1; + if (compat::EvaluateAsInt(arg, x1, compiler.getASTContext())) + { + return compat::toString(x1, 10); + } + if (isa(arg)) { + return "0"; + } + if (isa(arg)) + { + const CXXBindTemporaryExpr* strippedArg = dyn_cast_or_null(arg->IgnoreParenCasts()); + if (strippedArg) + { + auto temp = dyn_cast(strippedArg->getSubExpr()); + if (temp->getNumArgs() == 0) + { + if (loplugin::TypeCheck(temp->getType()).Class("OUString").Namespace("rtl").GlobalNamespace()) { + return "\"\""; + } + if (loplugin::TypeCheck(temp->getType()).Class("OString").Namespace("rtl").GlobalNamespace()) { + return "\"\""; + } + return "defaultConstruct"; + } + } + } + + // Get the expression contents. + // This helps us find params which are always initialised with something like "OUString()". + SourceManager& SM = compiler.getSourceManager(); + SourceLocation startLoc = arg->getBeginLoc(); + SourceLocation endLoc = arg->getEndLoc(); + const char *p1 = SM.getCharacterData( startLoc ); + const char *p2 = SM.getCharacterData( endLoc ); + if (!p1 || !p2 || (p2 - p1) < 0 || (p2 - p1) > 40) { + return "unknown"; + } + unsigned n = Lexer::MeasureTokenLength( endLoc, SM, compiler.getLangOpts()); + std::string s( p1, p2 - p1 + n); + // sanitize call value, makes using command line tools (and python) much less error prone + for (auto const & ch : s) + if (ch < 32) + return "sanitised"; + + // now normalize the value. For some params, like OUString, we can pass it as OUString() or "" and they are the same thing + if (s == "OUString()") + s = "\"\""; + else if (s == "OString()") + s = "\"\""; + return s; +} + +bool ConstantParam::VisitCallExpr(const CallExpr * callExpr) { + if (ignoreLocation(callExpr)) { + return true; + } + const FunctionDecl* functionDecl; + if (isa(callExpr)) { + functionDecl = dyn_cast(callExpr)->getMethodDecl(); + } + else { + functionDecl = callExpr->getDirectCallee(); + } + if (!functionDecl) + return true; + functionDecl = functionDecl->getCanonicalDecl(); + // method overrides don't always specify the same default params (although they probably should) + // so we need to work our way up to the root method + while (isa(functionDecl)) { + const CXXMethodDecl* methodDecl = dyn_cast(functionDecl); + if (methodDecl->size_overridden_methods()==0) + break; + functionDecl = *methodDecl->begin_overridden_methods(); + } + // work our way back to the root definition for template methods + if (functionDecl->getInstantiatedFromMemberFunction()) + functionDecl = functionDecl->getInstantiatedFromMemberFunction(); + else if (functionDecl->getTemplateInstantiationPattern()) + functionDecl = functionDecl->getTemplateInstantiationPattern(); + + unsigned len = std::max(callExpr->getNumArgs(), functionDecl->getNumParams()); + for (unsigned i = 0; i < len; ++i) { + const Expr* valExpr; + if (i < callExpr->getNumArgs()) + valExpr = callExpr->getArg(i); + else if (i < functionDecl->getNumParams() && functionDecl->getParamDecl(i)->hasDefaultArg()) + valExpr = functionDecl->getParamDecl(i)->getDefaultArg(); + else + // can happen in template code + continue; + std::string callValue = getCallValue(valExpr); + std::string paramName = i < functionDecl->getNumParams() + ? functionDecl->getParamDecl(i)->getName().str() + : "###" + std::to_string(i); + addToCallSet(functionDecl, i, paramName, callValue); + } + return true; +} + +bool ConstantParam::VisitCXXConstructExpr( const CXXConstructExpr* constructExpr ) +{ + const CXXConstructorDecl* constructorDecl = constructExpr->getConstructor(); + constructorDecl = constructorDecl->getCanonicalDecl(); + + unsigned len = std::max(constructExpr->getNumArgs(), constructorDecl->getNumParams()); + for (unsigned i = 0; i < len; ++i) { + const Expr* valExpr; + if (i < constructExpr->getNumArgs()) + valExpr = constructExpr->getArg(i); + else if (i < constructorDecl->getNumParams() && constructorDecl->getParamDecl(i)->hasDefaultArg()) + valExpr = constructorDecl->getParamDecl(i)->getDefaultArg(); + else + // can happen in template code + continue; + std::string callValue = getCallValue(valExpr); + std::string paramName = i < constructorDecl->getNumParams() + ? constructorDecl->getParamDecl(i)->getName().str() + : "###" + std::to_string(i); + addToCallSet(constructorDecl, i, paramName, callValue); + } + return true; +} + + +loplugin::Plugin::Registration< ConstantParam > X("constantparam", false); + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/constantparam.numbers.results b/compilerplugins/clang/constantparam.numbers.results new file mode 100644 index 0000000000..4dab02d817 --- /dev/null +++ b/compilerplugins/clang/constantparam.numbers.results @@ -0,0 +1,3424 @@ +basctl/source/inc/dlged.hxx:77 + void basctl::DlgEdHint::DlgEdHint(enum basctl::DlgEdHint::Kind,class basctl::DlgEdObj *) + enum basctl::DlgEdHint::Kind + 2 +basctl/source/inc/sbxitem.hxx:47 + void basctl::SbxItem::SbxItem(unsigned short,const class basctl::ScriptDocument &,const class rtl::OUString &,const class rtl::OUString &,enum basctl::ItemType) + unsigned short nWhich + 30799 +basctl/source/inc/sbxitem.hxx:48 + void basctl::SbxItem::SbxItem(unsigned short,const class basctl::ScriptDocument &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,enum basctl::ItemType) + unsigned short nWhich + 30799 +basic/source/classes/sbunoobj.cxx:3206 + class com::sun::star::uno::Reference getTypeDescriptorEnumeration(const class rtl::OUString &,const class com::sun::star::uno::Sequence &,enum com::sun::star::reflection::TypeDescriptionSearchDepth) + enum com::sun::star::reflection::TypeDescriptionSearchDepth depth + -1 +basic/source/inc/expr.hxx:177 + void SbiExpression::SbiExpression(class SbiParser *,double,enum SbxDataType) + enum SbxDataType + 2 +basic/source/inc/runtime.hxx:347 + _Bool SbiRuntime::IsImageFlag(enum SbiImageFlags) const + enum SbiImageFlags n + 2 +basic/source/inc/sbjsmeth.hxx:31 + void SbJScriptMethod::SbJScriptMethod(enum SbxDataType) + enum SbxDataType + 12 +canvas/inc/verifyinput.hxx:103 + void verifyInput(const struct com::sun::star::geometry::Matrix2D &,const char *,const class com::sun::star::uno::Reference &,short) + short nArgPos + 2 +canvas/workben/canvasdemo.cxx:143 + void (anonymous namespace)::DemoRenderer::drawStringAt(class rtl::OString,double,double) + double y + 15 +canvas/workben/canvasdemo.cxx:482 + void (anonymous namespace)::DemoRenderer::drawRegularPolygon(double,double,int,double) + double centery + 35 +canvas/workben/canvasdemo.cxx:482 + void (anonymous namespace)::DemoRenderer::drawRegularPolygon(double,double,int,double) + double r + 15 +chart2/qa/extras/chart2export.cxx:522 + void checkPolynomialTrendline(const class com::sun::star::uno::Reference &,const class rtl::OUString &,int,double,double,double) + int aExpectedDegree + 3 +chart2/qa/extras/chart2export.cxx:544 + void checkMovingAverageTrendline(const class com::sun::star::uno::Reference &,const class rtl::OUString &,int) + int aExpectedPeriod + 3 +chart2/qa/extras/chart2export.cxx:1057 + void ::change(const class com::sun::star::uno::Reference &,short) + short nNumFmtTypeFlag + 16 +chart2/qa/extras/PivotChartTest.cxx:78 + void lclModifyFunction(const class com::sun::star::uno::Reference &,class std::basic_string_view >,enum com::sun::star::sheet::GeneralFunction) + enum com::sun::star::sheet::GeneralFunction eFunction + 2 +chart2/source/controller/inc/AccessibleBase.hxx:145 + void chart::AccessibleBase::RemoveState(short) + short aState + 23 +chart2/source/inc/LinePropertiesHelper.hxx:62 + void SetLineColor(const class com::sun::star::uno::Reference &,int) + int nColor + 14540253 +chart2/source/inc/ObjectIdentifier.hxx:180 + class rtl::OUString chart::ObjectIdentifier::createSeriesSubObjectStub(enum chart::ObjectType,const class rtl::OUString &,class std::basic_string_view >,class std::basic_string_view >) + enum chart::ObjectType eSubObjectType + 12 +chart2/source/inc/StatisticsHelper.hxx:75 + class com::sun::star::uno::Reference addErrorBars(const class com::sun::star::uno::Reference &,int,_Bool) + int nStyle + 2 +chart2/source/tools/RangeHighlighter.cxx:48 + void lcl_fillRanges(class com::sun::star::uno::Sequence &,const class com::sun::star::uno::Sequence &,class Color,int) + int nIndex + -1 +codemaker/source/javamaker/classfile.cxx:86 + void writeU4(class FileStream &,unsigned int) + unsigned int data + 3405691582 +comphelper/qa/unit/variadictemplates.cxx:57 + void extract(const class com::sun::star::uno::Sequence &,int,optional &,const class com::sun::star::uno::Reference &) + int nArg + 4 +connectivity/source/drivers/firebird/StatementCommonBase.hxx:92 + short connectivity::firebird::OStatementCommonBase::getSqlInfoItem(char) + char aInfoItem + 21 +connectivity/source/drivers/firebird/Util.hxx:121 + class rtl::OUString escapeWith(const class rtl::OUString &,const char,const char) + const char aKey + 39 +connectivity/source/drivers/firebird/Util.hxx:121 + class rtl::OUString escapeWith(const class rtl::OUString &,const char,const char) + const char aEscapeChar + 39 +connectivity/source/drivers/postgresql/pq_connection.cxx:363 + void properties2arrays(const class com::sun::star::uno::Sequence &,const class com::sun::star::uno::Reference &,unsigned short,class pq_sdbc_driver::(anonymous namespace)::cstr_vector &,class pq_sdbc_driver::(anonymous namespace)::cstr_vector &) + unsigned short enc + 76 +connectivity/source/drivers/postgresql/pq_statics.cxx:80 + void pq_sdbc_driver::(anonymous namespace)::PropertyDefEx::PropertyDefEx(const class rtl::OUString &,const class com::sun::star::uno::Type &,int) + int a + 16 +connectivity/source/inc/java/sql/ConnectionLog.hxx:105 + void connectivity::java::sql::ConnectionLog::log(const int,const class rtl::OUString &,type-parameter-?-?,type-parameter-?-?,type-parameter-?-?) const + const int _nLogLevel + 300 +connectivity/source/inc/java/sql/ConnectionLog.hxx:111 + void connectivity::java::sql::ConnectionLog::log(const int,const class rtl::OUString &,type-parameter-?-?,type-parameter-?-?,type-parameter-?-?,type-parameter-?-?) const + const int _nLogLevel + 300 +connectivity/source/inc/java/sql/ConnectionLog.hxx:117 + void connectivity::java::sql::ConnectionLog::log(const int,const class rtl::OUString &,type-parameter-?-?,type-parameter-?-?,type-parameter-?-?,type-parameter-?-?,type-parameter-?-?) const + const int _nLogLevel + 300 +connectivity/source/inc/mysql/YTable.hxx:83 + void connectivity::mysql::OMySQLTable::OMySQLTable(class connectivity::sdbcx::OCollection *,const class com::sun::star::uno::Reference &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,int) + int _nPrivileges + 511 +connectivity/source/inc/odbc/OPreparedStatement.hxx:75 + void connectivity::odbc::OPreparedStatement::setParameter(int,int,const class com::sun::star::uno::Sequence &) + int _nType + -2 +connectivity/source/inc/odbc/OTools.hxx:197 + class com::sun::star::uno::Sequence connectivity::odbc::OTools::getBytesValue(const class connectivity::odbc::OConnection *,void *,int,short,_Bool &,const class com::sun::star::uno::Reference &) + short _fSqlType + -2 +cppcanvas/source/inc/implrenderer.hxx:181 + _Bool cppcanvas::internal::ImplRenderer::isActionContained(class GDIMetaFile &,const char *,enum MetaActionType) + enum MetaActionType nType + 147 +cui/source/inc/autocdlg.hxx:308 + void OfaQuoteTabPage::CreateEntry(class weld::TreeView &,const class rtl::OUString &,unsigned short,unsigned short) + unsigned short nCol + 2 +cui/source/inc/autocdlg.hxx:308 + void OfaQuoteTabPage::CreateEntry(class weld::TreeView &,const class rtl::OUString &,unsigned short,unsigned short) + unsigned short nTextCol + 2 +cui/source/inc/chardlg.hxx:272 + void SvxCharPositionPage::UpdatePreview_Impl(unsigned char,unsigned char,short) + unsigned char nProp + 100 +cui/source/inc/cuihyperdlg.hxx:49 + void SvxHlinkCtrl::SvxHlinkCtrl(unsigned short,class SfxBindings &,class SvxHpLinkDlg *) + unsigned short nId + 10361 +cui/source/inc/optlingu.hxx:145 + void SvxLinguTabPage::HideGroups(unsigned short) + unsigned short nGrp + 8 +cui/source/inc/SpellDialog.hxx:110 + void svx::SentenceEditWindow_Impl::UndoActionStart(unsigned short) + unsigned short nId + 205 +cui/source/inc/SvxToolbarConfigPage.hxx:63 + void SvxToolbarConfigPage::AddFunction(int) + int nTarget + -1 +cui/source/options/cfgchart.hxx:89 + void SvxChartColorTableItem::SvxChartColorTableItem(unsigned short,const class SvxChartColorTable &) + unsigned short nWhich + 10437 +cui/source/options/connpoolsettings.hxx:75 + void offapp::DriverPoolingSettingsItem::DriverPoolingSettingsItem(unsigned short,const class offapp::DriverPoolingSettings &) + unsigned short _nId + 17148 +cui/source/options/dbregistersettings.hxx:67 + void svx::DatabaseMapItem::DatabaseMapItem(unsigned short,const class std::__debug::map, class std::allocator > > &) + unsigned short _nId + 17149 +cui/source/tabpages/align.cxx:60 + void lcl_MaybeResetAlignToDistro(class weld::ComboBox &,unsigned short,const class SfxItemSet &,unsigned short,unsigned short,type-parameter-?-?) + type-parameter-?-? eBlock + 4 +dbaccess/source/core/dataaccess/documentdefinition.hxx:183 + void dbaccess::ODocumentDefinition::firePropertyChange(int,const class com::sun::star::uno::Any &,const class com::sun::star::uno::Any &,_Bool,const struct dbaccess::ODocumentDefinition::NotifierAccess &) + int i_nHandle + 7 +dbaccess/source/core/inc/columnsettings.hxx:39 + void dbaccess::IPropertyContainer::registerMayBeVoidProperty(const class rtl::OUString &,int,int,class com::sun::star::uno::Any *,const class com::sun::star::uno::Type &) + int _nAttributes + 3 +dbaccess/source/ui/dlg/adminpages.hxx:219 + void dbaui::OGenericAdministrationPage::fillString(class SfxItemSet &,const class dbaui::OConnectionURLEdit *,unsigned short,_Bool &) + unsigned short _nID + 3 +dbaccess/source/ui/dlg/dsnItem.hxx:38 + void dbaui::DbuTypeCollectionItem::DbuTypeCollectionItem(short,class dbaccess::ODsnTypeCollection *) + short nWhich + 5 +dbaccess/source/ui/inc/charsetlistbox.hxx:36 + _Bool dbaui::CharSetListBox::StoreSelectedCharSet(class SfxItemSet &,const unsigned short) + const unsigned short _nItemId + 11 +dbaccess/source/ui/inc/FieldDescControl.hxx:139 + void dbaui::OFieldDescControl::CellModified(int,unsigned short) + int nRow + -1 +dbaccess/source/ui/inc/JAccess.hxx:57 + void dbaui::OJoinDesignViewAccess::notifyAccessibleEvent(const short,const class com::sun::star::uno::Any &,const class com::sun::star::uno::Any &) + const short _nEventId + 7 +dbaccess/source/ui/querydesign/SelectionBrowseBox.hxx:88 + class rtl::Reference dbaui::OSelectionBrowseBox::InsertField(const class rtl::Reference &,unsigned short,_Bool,_Bool) + unsigned short _nColumnPosition + 65535 +drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx:111 + class drawinglayer::primitive3d::Primitive3DContainer getLineTubeSegments(unsigned int,const class drawinglayer::attribute::MaterialAttribute3D &) + unsigned int nSegments + 8 +drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx:189 + class drawinglayer::primitive3d::Primitive3DContainer getLineCapSegments(unsigned int,const class drawinglayer::attribute::MaterialAttribute3D &) + unsigned int nSegments + 8 +drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx:285 + class drawinglayer::primitive3d::Primitive3DContainer getLineCapRoundSegments(unsigned int,const class drawinglayer::attribute::MaterialAttribute3D &) + unsigned int nSegments + 8 +drawinglayer/source/primitive3d/polygontubeprimitive3d.cxx:294 + class drawinglayer::primitive3d::Primitive3DContainer getLineJoinSegments(unsigned int,const class drawinglayer::attribute::MaterialAttribute3D &,double,double,enum basegfx::B2DLineJoin) + unsigned int nSegments + 8 +editeng/source/editeng/impedit.hxx:699 + _Bool ImpEditEngine::HasScriptType(int,unsigned short) const + unsigned short nType + 3 +editeng/source/editeng/impedit.hxx:1017 + void ImpEditEngine::SetLanguageAndFont(const struct ESelection &,struct o3tl::strong_int,unsigned short,const class vcl::Font *,unsigned short) + unsigned short nLangWhichId + 4040 +editeng/source/editeng/impedit.hxx:1017 + void ImpEditEngine::SetLanguageAndFont(const struct ESelection &,struct o3tl::strong_int,unsigned short,const class vcl::Font *,unsigned short) + unsigned short nFontWhichId + 4042 +editeng/source/editeng/textconv.hxx:87 + void TextConvWrapper::SetLanguageAndFont(const struct ESelection &,struct o3tl::strong_int,unsigned short,const class vcl::Font *,unsigned short) + unsigned short nLangWhichId + 4040 +editeng/source/editeng/textconv.hxx:87 + void TextConvWrapper::SetLanguageAndFont(const struct ESelection &,struct o3tl::strong_int,unsigned short,const class vcl::Font *,unsigned short) + unsigned short nFontWhichId + 4042 +editeng/source/outliner/outlundo.hxx:31 + void OutlinerUndoBase::OutlinerUndoBase(unsigned short,class Outliner *) + unsigned short nId + 200 +filter/source/config/cache/filtercache.hxx:330 + _Bool filter::config::FilterCache::isFillState(enum filter::config::FilterCache::EFillState) const + enum filter::config::FilterCache::EFillState eRequired + 2 +filter/source/msfilter/mscodec.cxx:57 + void lclRotateLeft(type-parameter-?-? &,unsigned char,unsigned char) + unsigned char nWidth + 15 +filter/source/msfilter/mscodec.cxx:72 + unsigned short lclGetKey(const unsigned char *,unsigned long) + unsigned long nBufferSize + 16 +filter/source/msfilter/mscodec.cxx:97 + unsigned short lclGetHash(const unsigned char *,unsigned long) + unsigned long nBufferSize + 16 +forms/source/richtext/richtextcontrol.cxx:83 + void implAdjustTriStateFlag(const class com::sun::star::uno::Reference &,const class rtl::OUString &,long &,long,long) + long _nPositiveFlag + 256 +forms/source/richtext/richtextcontrol.cxx:83 + void implAdjustTriStateFlag(const class com::sun::star::uno::Reference &,const class rtl::OUString &,long &,long,long) + long nNegativeFlag + 512 +forms/source/richtext/rtattributes.hxx:51 + void frm::AttributeState::AttributeState(enum frm::AttributeCheckState) + enum frm::AttributeCheckState _eCheckState + 2 +formula/source/core/api/FormulaCompiler.cxx:254 + const char16_t * lcl_UnicodeStrChr(const char16_t *,char16_t) + char16_t c + 34 +fpicker/source/office/autocmpledit.hxx:39 + void AutocompleteEdit::select_region(int,int) + int nEndPos + -1 +fpicker/source/office/iodlg.hxx:205 + void SvtFileDialog::displayIOException(const class rtl::OUString &,enum com::sun::star::ucb::IOErrorCode) + enum com::sun::star::ucb::IOErrorCode _eCode + 5 +framework/inc/uielement/macrosmenucontroller.hxx:50 + void framework::MacrosMenuController::addScriptItems(class PopupMenu *,unsigned short) + unsigned short startItemId + 4 +framework/source/uielement/thesaurusmenucontroller.cxx:48 + void (anonymous namespace)::ThesaurusMenuController::getMeanings(class std::__debug::vector > &,const class rtl::OUString &,const struct com::sun::star::lang::Locale &,unsigned long) + unsigned long nMaxSynonms + 7 +hwpfilter/source/hgzip.h:90 + int gz_flush(struct gz_stream *,int) + int flush + 4 +hwpfilter/source/hwpfile.h:253 + _Bool HWPFile::already_importing_type(unsigned char) const + unsigned char scflag + 16 +hwpfilter/source/lexer.cxx:202 + struct (anonymous namespace)::yy_buffer_state * yy_create_buffer(struct _IO_FILE *,int) + int size + 16384 +hwpfilter/source/mzstring.h:124 + int MzString::rfind(char) + char c + 125 +hwpfilter/source/mzstring.h:128 + void MzString::replace(int,char) + char c + 32 +idlc/inc/astattribute.hxx:39 + void AstAttribute::AstAttribute(enum NodeType,unsigned int,const class AstType *,const class rtl::OString &,class AstScope *) + enum NodeType nodeType + 12 +idlc/inc/astconstant.hxx:30 + void AstConstant::AstConstant(const enum ExprType,const enum NodeType,class AstExpression *,const class rtl::OString &,class AstScope *) + const enum ExprType type + 2 +idlc/inc/astconstant.hxx:30 + void AstConstant::AstConstant(const enum ExprType,const enum NodeType,class AstExpression *,const class rtl::OString &,class AstScope *) + const enum NodeType nodeType + 20 +idlc/inc/astexpression.hxx:97 + void AstExpression::AstExpression(int,enum ExprType) + enum ExprType et + 10 +idlc/inc/astmember.hxx:37 + void AstMember::AstMember(enum NodeType,const class AstType *,const class rtl::OString &,class AstScope *) + enum NodeType type + 14 +idlc/inc/astservice.hxx:35 + void AstService::AstService(const enum NodeType,const class rtl::OString &,class AstScope *) + const enum NodeType type + 24 +idlc/inc/aststruct.hxx:41 + void AstStruct::AstStruct(const enum NodeType,const class rtl::OString &,const class AstStruct *,class AstScope *) + const enum NodeType type + 10 +idlc/inc/errorhandler.hxx:83 + void ErrorHandler::error3(enum ErrorCode,const class AstDeclaration *,const class AstDeclaration *,const class AstDeclaration *) + enum ErrorCode e + 3 +include/basegfx/curve/b2dbeziertools.hxx:44 + void basegfx::B2DCubicBezierHelper::B2DCubicBezierHelper(const class basegfx::B2DCubicBezier &,unsigned int) + unsigned int nDivisions + 9 +include/basegfx/range/b2ibox.hxx:71 + void basegfx::B2IBox::B2IBox(int,int,int,int) + int x2 + 10 +include/basegfx/range/b2ibox.hxx:71 + void basegfx::B2IBox::B2IBox(int,int,int,int) + int y2 + 10 +include/basegfx/utils/tools.hxx:118 + class basegfx::B2DPolyPolygon number2PolyPolygon(double,int,int,_Bool) + int nTotalDigits + 10 +include/basegfx/utils/tools.hxx:118 + class basegfx::B2DPolyPolygon number2PolyPolygon(double,int,int,_Bool) + int nDecPlaces + 3 +include/basic/sbxcore.hxx:65 + _Bool SbxBase::IsReset(enum SbxFlagBits) const + enum SbxFlagBits n + 256 +include/comphelper/docpasswordhelper.hxx:268 + class rtl::OUString comphelper::DocPasswordHelper::GetOoxHashAsBase64(const class rtl::OUString &,const class rtl::OUString &,unsigned int,enum comphelper::Hash::IterCount,class std::basic_string_view >) + enum comphelper::Hash::IterCount eIterCount + 2 +include/comphelper/docpasswordhelper.hxx:324 + class com::sun::star::uno::Sequence comphelper::DocPasswordHelper::GenerateRandomByteSequence(int) + int nLength + 16 +include/comphelper/propagg.hxx:124 + void comphelper::OPropertyArrayAggregationHelper::OPropertyArrayAggregationHelper(const class com::sun::star::uno::Sequence &,const class com::sun::star::uno::Sequence &,class comphelper::IPropertyInfoService *,int) + int _nFirstAggregateId + 10000 +include/comphelper/propagg.hxx:290 + void comphelper::OPropertySetAggregationHelper::declareForwardedProperty(int) + int _nHandle + 194 +include/comphelper/property.hxx:52 + void ModifyPropertyAttributes(class com::sun::star::uno::Sequence &,const class rtl::OUString &,short,short) + short _nRemoveAttrib + 8 +include/comphelper/seqstream.hxx:104 + void comphelper::OSequenceOutputStream::OSequenceOutputStream(class com::sun::star::uno::Sequence &,double,int) + int _nMinimumResize + 128 +include/comphelper/storagehelper.hxx:118 + class com::sun::star::uno::Reference comphelper::OStorageHelper::GetStorageFromStream(const class com::sun::star::uno::Reference &,int,const class com::sun::star::uno::Reference &) + int nStorageMode + 7 +include/connectivity/dbtools.hxx:303 + class com::sun::star::sdbc::SQLException prependErrorInfo(const class com::sun::star::sdbc::SQLException &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,const enum dbtools::StandardSQLState) + const enum dbtools::StandardSQLState _eSQLState + 2147483647 +include/connectivity/sqlerror.hxx:82 + class rtl::OUString connectivity::SQLError::getErrorMessage(const int) const + const int _eCondition + 300 +include/connectivity/sqlerror.hxx:93 + int connectivity::SQLError::getErrorCode(const int) + const int _eCondition + 550 +include/connectivity/sqlerror.hxx:161 + void connectivity::SQLError::raiseException(const int) const + const int _eCondition + 200 +include/connectivity/sqlerror.hxx:186 + void connectivity::SQLError::raiseTypedException(const int,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Type &) const + const int _eCondition + 100 +include/dbaccess/genericcontroller.hxx:311 + _Bool dbaui::OGenericUnoController::isFeatureSupported(int) + int _nId + 5502 +include/drawinglayer/attribute/fillhatchattribute.hxx:51 + void drawinglayer::attribute::FillHatchAttribute::FillHatchAttribute(enum drawinglayer::attribute::HatchStyle,double,double,const class basegfx::BColor &,unsigned int,_Bool) + unsigned int nMinimalDiscreteDistance + 3 +include/drawinglayer/primitive2d/mediaprimitive2d.hxx:63 + void drawinglayer::primitive2d::MediaPrimitive2D::MediaPrimitive2D(const class basegfx::B2DHomMatrix &,const class rtl::OUString &,const class basegfx::BColor &,unsigned int,const class Graphic &) + unsigned int nDiscreteBorder + 4 +include/editeng/AccessibleParaManager.hxx:128 + void accessibility::AccessibleParaManager::FireEvent(int,const short) const + const short nEventId + 21 +include/editeng/AccessibleParaManager.hxx:242 + void accessibility::AccessibleParaManager::SetState(int,const short) + const short nStateId + 11 +include/editeng/AccessibleParaManager.hxx:244 + void accessibility::AccessibleParaManager::UnSetState(int,const short) + const short nStateId + 11 +include/editeng/bulletitem.hxx:60 + void SvxBulletItem::SvxBulletItem(unsigned short) + unsigned short nWhich + 4017 +include/editeng/editeng.hxx:299 + struct ESelection EditEngine::GetWord(const struct ESelection &,unsigned short) const + unsigned short nWordType + 2 +include/editeng/editeng.hxx:311 + void EditEngine::InsertParagraph(int,const class EditTextObject &,const _Bool) + int nPara + 2147483647 +include/editeng/editeng.hxx:344 + void EditEngine::UndoActionStart(unsigned short,const struct ESelection &) + unsigned short nId + 111 +include/editeng/editstat.hxx:89 + void SetFlags(enum EVControlBits &,enum EVControlBits,_Bool) + enum EVControlBits nMask + 16 +include/editeng/editund2.hxx:39 + void EditUndoManager::EditUndoManager(unsigned short) + unsigned short nMaxUndoActionCount + 20 +include/editeng/editview.hxx:256 + void EditView::RemoveCharAttribs(int,unsigned short) + unsigned short nWhich + 4029 +include/editeng/editview.hxx:358 + void EditView::InitLOKSpecialPositioning(enum MapUnit,const class tools::Rectangle &,const class Point &) + enum MapUnit eUnit + 9 +include/editeng/fhgtitem.hxx:72 + void SvxFontHeightItem::SetHeight(unsigned int,unsigned short,enum MapUnit,enum MapUnit) + enum MapUnit eUnit + 8 +include/editeng/flditem.hxx:73 + void SvxFieldItem::SvxFieldItem(class std::unique_ptr >,const unsigned short) + const unsigned short nId + 4061 +include/editeng/flditem.hxx:74 + void SvxFieldItem::SvxFieldItem(const class SvxFieldData &,const unsigned short) + const unsigned short nId + 4061 +include/editeng/justifyitem.hxx:33 + void SvxHorJustifyItem::SvxHorJustifyItem(const unsigned short) + const unsigned short nId + 1059 +include/editeng/justifyitem.hxx:60 + void SvxVerJustifyItem::SvxVerJustifyItem(const unsigned short) + const unsigned short nId + 1060 +include/editeng/legacyitem.hxx:172 + void Create(class SvxFormatBreakItem &,class SvStream &,unsigned short) + unsigned short nItemVersion + 5050 +include/editeng/legacyitem.hxx:179 + void Create(class SvxFormatKeepItem &,class SvStream &,unsigned short) + unsigned short nItemVersion + 5050 +include/editeng/legacyitem.hxx:186 + void Create(class SvxShadowItem &,class SvStream &,unsigned short) + unsigned short nItemVersion + 5050 +include/editeng/nhypitem.hxx:29 + void SvxNoHyphenItem::SvxNoHyphenItem(const unsigned short) + const unsigned short nId + 19 +include/editeng/opaqitem.hxx:36 + void SvxOpaqueItem::SvxOpaqueItem(const unsigned short,const _Bool) + const unsigned short nId + 99 +include/editeng/outliner.hxx:154 + void Paragraph::RemoveFlag(enum ParaFlag) + enum ParaFlag nFlag + 256 +include/editeng/outliner.hxx:373 + void OutlinerViewShell::NotifyOtherView(class OutlinerViewShell *,int,const class rtl::OString &,const class rtl::OString &) + int nType + 25 +include/editeng/outliner.hxx:846 + void Outliner::SetParaFlag(class Paragraph *,enum ParaFlag) + enum ParaFlag nFlag + 256 +include/editeng/outliner.hxx:847 + _Bool Outliner::HasParaFlag(const class Paragraph *,enum ParaFlag) + enum ParaFlag nFlag + 256 +include/editeng/outlobj.hxx:111 + void OutlinerParaObject::SetStyleSheets(unsigned short,const class rtl::OUString &,const enum SfxStyleFamily &) + const enum SfxStyleFamily & rNewFamily + 8 +include/editeng/prntitem.hxx:38 + void SvxPrintItem::SvxPrintItem(const unsigned short,const _Bool) + const unsigned short nId + 98 +include/editeng/svxrtf.hxx:223 + class rtl::OUString & SvxRTFParser::DelCharAtEnd(class rtl::OUString &,const char16_t) + const char16_t cDel + 59 +include/editeng/txtrange.hxx:61 + void TextRanger::TextRanger(const class basegfx::B2DPolyPolygon &,const class basegfx::B2DPolyPolygon *,unsigned short,unsigned short,unsigned short,_Bool,_Bool,_Bool) + unsigned short nCacheSize + 30 +include/editeng/txtrange.hxx:61 + void TextRanger::TextRanger(const class basegfx::B2DPolyPolygon &,const class basegfx::B2DPolyPolygon *,unsigned short,unsigned short,unsigned short,_Bool,_Bool,_Bool) + unsigned short nLeft + 2 +include/editeng/txtrange.hxx:61 + void TextRanger::TextRanger(const class basegfx::B2DPolyPolygon &,const class basegfx::B2DPolyPolygon *,unsigned short,unsigned short,unsigned short,_Bool,_Bool,_Bool) + unsigned short nRight + 2 +include/editeng/unoedhlp.hxx:45 + void SvxEditSourceHint::SvxEditSourceHint(enum SfxHintId) + enum SfxHintId nId + 30 +include/editeng/unoedhlp.hxx:46 + void SvxEditSourceHint::SvxEditSourceHint(enum SfxHintId,unsigned long,int,int) + enum SfxHintId nId + 29 +include/editeng/writingmodeitem.hxx:31 + void SvxWritingModeItem::SvxWritingModeItem(enum com::sun::star::text::WritingMode,unsigned short) + unsigned short nWhich + 1162 +include/filter/msfilter/dffpropset.hxx:64 + class rtl::OUString DffPropSet::GetPropertyString(unsigned int,class SvStream &) const + unsigned int nId + 896 +include/filter/msfilter/escherex.hxx:726 + void EscherPropertyContainer::Commit(class SvStream &,unsigned short,unsigned short) + unsigned short nVersion + 3 +include/filter/msfilter/msdffimp.hxx:568 + _Bool SvxMSDffManager::SeekToRec2(unsigned short,unsigned short,unsigned long) const + unsigned short nRecId1 + 4008 +include/filter/msfilter/msdffimp.hxx:568 + _Bool SvxMSDffManager::SeekToRec2(unsigned short,unsigned short,unsigned long) const + unsigned short nRecId2 + 4000 +include/filter/msfilter/rtfutil.hxx:28 + class rtl::OString OutHex(unsigned long,unsigned char) + unsigned char nLen + 2 +include/filter/msfilter/rtfutil.hxx:64 + class rtl::OString WriteHex(const unsigned char *,unsigned int,class SvStream *,unsigned int) + unsigned int nLimit + 64 +include/filter/msfilter/util.hxx:103 + _Bool msfilter::util::WW8ReadFieldParams::GetTokenSttFromTo(int *,int *,int) + int _nMax + 9 +include/formula/tokenarray.hxx:286 + unsigned short formula::FormulaTokenArray::RemoveToken(unsigned short,unsigned short) + unsigned short nCount + 2 +include/formula/tokenarray.hxx:534 + void formula::FormulaTokenIterator::Item::Item(const class formula::FormulaTokenArray *,short,short) + short pc + -1 +include/formula/tokenarray.hxx:534 + void formula::FormulaTokenIterator::Item::Item(const class formula::FormulaTokenArray *,short,short) + short stop + 32767 +include/formula/tokenarray.hxx:657 + void formula::FormulaTokenArrayPlainIterator::AfterRemoveToken(unsigned short,unsigned short) + unsigned short nCount + 2 +include/linguistic/spelldta.hxx:87 + class com::sun::star::uno::Reference linguistic::SpellAlternatives::CreateSpellAlternatives(const class rtl::OUString &,struct o3tl::strong_int,short,const class com::sun::star::uno::Sequence &) + short nTypeP + 4 +include/o3tl/typed_flags_set.hxx:135 + typename typed_flags::Wrap operator^(type-parameter-?-?,typename typed_flags::Wrap) + type-parameter-?-? lhs + 1535 +include/o3tl/unit_conversion.hxx:213 + auto convertSaturate(type-parameter-?-?,type-parameter-?-?,type-parameter-?-?) + type-parameter-?-? to + 7 +include/oox/core/contexthandler2.hxx:168 + _Bool oox::core::ContextHandler2Helper::isParentElement(int,int) const + int nElement + 525391 +include/oox/core/contexthandler2.hxx:168 + _Bool oox::core::ContextHandler2Helper::isParentElement(int,int) const + int nCountBack + 4 +include/oox/drawingml/drawingmltypes.hxx:226 + void oox::drawingml::EmuRectangle::EmuRectangle(long,long,long,long) + long nX + -1 +include/oox/drawingml/drawingmltypes.hxx:226 + void oox::drawingml::EmuRectangle::EmuRectangle(long,long,long,long) + long nY + -1 +include/oox/drawingml/drawingmltypes.hxx:226 + void oox::drawingml::EmuRectangle::EmuRectangle(long,long,long,long) + long nWidth + -1 +include/oox/drawingml/drawingmltypes.hxx:226 + void oox::drawingml::EmuRectangle::EmuRectangle(long,long,long,long) + long nHeight + -1 +include/oox/export/drawingml.hxx:183 + _Bool oox::drawingml::DrawingML::HasEnhancedCustomShapeSegmentCommand(const class com::sun::star::uno::Reference &,const short) + const short nCommand + 6 +include/oox/export/drawingml.hxx:209 + void oox::drawingml::DrawingML::WriteSolidFill(const class Color,const class com::sun::star::uno::Sequence &,int) + int nAlpha + 100000 +include/oox/export/drawingml.hxx:222 + void oox::drawingml::DrawingML::WriteBlipFill(const class com::sun::star::uno::Reference &,const class rtl::OUString &,int) + int nXmlNamespace + 421 +include/oox/export/vmlexport.hxx:167 + void oox::vml::VMLExport::AddShapeAttribute(int,const class rtl::OString &) + int nAttribute + 5459 +include/oox/helper/attributelist.hxx:101 + class oox::drawingml::Color oox::AttributeList::getHighlightColor(int) const + int nAttrToken + 988640 +include/oox/helper/attributelist.hxx:145 + const char * oox::AttributeList::getChar(int) const + int nAttrToken + 4180 +include/oox/helper/attributelist.hxx:168 + unsigned int oox::AttributeList::getUnsignedHex(int,unsigned int) const + int nAttrToken + 4319 +include/oox/helper/attributelist.hxx:168 + unsigned int oox::AttributeList::getUnsignedHex(int,unsigned int) const + unsigned int nDefault + 4294967295 +include/oox/helper/binaryoutputstream.hxx:86 + void oox::BinaryOutputStream::writeCharArrayUC(class std::basic_string_view >,unsigned short) + unsigned short eTextEnc + 12 +include/oox/helper/binarystreambase.hxx:103 + void oox::BinaryStreamBase::alignToBlock(int,long) + int nBlockSize + 4 +include/oox/helper/containerhelper.hxx:193 + class rtl::OUString oox::ContainerHelper::insertByUnusedName(const class com::sun::star::uno::Reference &,const class rtl::OUString &,char16_t,const class com::sun::star::uno::Any &) + char16_t cSeparator + 32 +include/oox/helper/helper.hxx:115 + type-parameter-?-? getIntervalValue(type-parameter-?-?,type-parameter-?-?,type-parameter-?-?) + type-parameter-?-? nEnd + 360 +include/oox/helper/propertyset.hxx:110 + _Bool oox::PropertySet::setProperty(int,class Color) + int nPropId + 515 +include/oox/helper/textinputstream.hxx:42 + void oox::TextInputStream::TextInputStream(const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,unsigned short) + unsigned short eTextEnc + 76 +include/oox/mathml/importutils.hxx:123 + class rtl::OUString & oox::formulaimport::XmlStream::AttributeList::operator[](int) + ###1 + 1512928 +include/oox/mathml/importutils.hxx:136 + void oox::formulaimport::XmlStream::Tag::Tag(int,const class com::sun::star::uno::Reference &) + int token + -1 +include/oox/mathml/importutils.hxx:151 + _Bool oox::formulaimport::XmlStream::Tag::attribute(int,_Bool) const + int token + 1512928 +include/oox/mathml/importutils.hxx:155 + char16_t oox::formulaimport::XmlStream::Tag::attribute(int,char16_t) const + int token + 1512928 +include/oox/ole/axcontrol.hxx:949 + type-parameter-?-? & oox::ole::EmbeddedControl::createModel(const type-parameter-?-? &) + const type-parameter-?-? & rParam + 6 +include/oox/ole/olehelper.hxx:77 + void oox::ole::StdFontInfo::StdFontInfo(const class rtl::OUString &,unsigned int) + unsigned int nHeight + 82500 +include/oox/ole/vbaproject.hxx:154 + void oox::ole::VbaProject::addDummyModule(const class rtl::OUString &,int) + int nType + 4 +include/sfx2/app.hxx:85 + void SfxLinkItem::SfxLinkItem(unsigned short,const class Link &) + unsigned short nWhichId + 5646 +include/sfx2/ctrlitem.hxx:91 + void SfxStatusForwarder::SfxStatusForwarder(unsigned short,class SfxControllerItem &) + unsigned short nSlotId + 10930 +include/sfx2/evntconf.hxx:72 + void SfxEventNamesItem::SfxEventNamesItem(const unsigned short) + const unsigned short nId + 6101 +include/sfx2/fcontnr.hxx:54 + class std::shared_ptr SfxFilterContainer::GetAnyFilter(enum SfxFilterFlags,enum SfxFilterFlags) const + enum SfxFilterFlags nMust + 3 +include/sfx2/fcontnr.hxx:54 + class std::shared_ptr SfxFilterContainer::GetAnyFilter(enum SfxFilterFlags,enum SfxFilterFlags) const + enum SfxFilterFlags nDont + 393216 +include/sfx2/fcontnr.hxx:55 + class std::shared_ptr SfxFilterContainer::GetFilter4EA(const class rtl::OUString &,enum SfxFilterFlags,enum SfxFilterFlags) const + enum SfxFilterFlags nMust + 2 +include/sfx2/fcontnr.hxx:55 + class std::shared_ptr SfxFilterContainer::GetFilter4EA(const class rtl::OUString &,enum SfxFilterFlags,enum SfxFilterFlags) const + enum SfxFilterFlags nDont + 393216 +include/sfx2/fcontnr.hxx:56 + class std::shared_ptr SfxFilterContainer::GetFilter4Extension(const class rtl::OUString &,enum SfxFilterFlags,enum SfxFilterFlags) const + enum SfxFilterFlags nDont + 393216 +include/sfx2/fcontnr.hxx:57 + class std::shared_ptr SfxFilterContainer::GetFilter4FilterName(const class rtl::OUString &,enum SfxFilterFlags,enum SfxFilterFlags) const + enum SfxFilterFlags nDont + 393216 +include/sfx2/fcontnr.hxx:88 + class std::shared_ptr SfxFilterMatcher::GetFilter4Mime(const class rtl::OUString &,enum SfxFilterFlags,enum SfxFilterFlags) const + enum SfxFilterFlags nDont + 393216 +include/sfx2/fcontnr.hxx:109 + void SfxFilterMatcherIter::SfxFilterMatcherIter(const class SfxFilterMatcher &,enum SfxFilterFlags,enum SfxFilterFlags) + enum SfxFilterFlags nNotMask + 393216 +include/sfx2/frame.hxx:192 + void SfxUnoFrameItem::SfxUnoFrameItem(unsigned short,const class com::sun::star::uno::Reference &) + unsigned short nWhich + 6516 +include/sfx2/linkmgr.hxx:65 + _Bool sfx2::LinkManager::InsertLink(class sfx2::SvBaseLink *,enum sfx2::SvBaseLinkObjectType,enum SfxLinkUpdateMode,const class rtl::OUString *) + enum SfxLinkUpdateMode nUpdateType + 3 +include/sfx2/lokhelper.hxx:33 + void LokMouseEventData::LokMouseEventData(int,class Point,int,enum MouseEventModifiers,int,int) + enum MouseEventModifiers eModifiers + 256 +include/sfx2/lokhelper.hxx:87 + void SfxLokHelper::notifyOtherViews(const class SfxViewShell *,int,const class boost::property_tree::basic_ptree, class std::allocator >, class std::__cxx11::basic_string, class std::allocator >, struct std::less, class std::allocator > > > &) + int nType + 24 +include/sfx2/lokhelper.hxx:112 + void SfxLokHelper::notifyAllViews(int,const class rtl::OString &) + int nType + 38 +include/sfx2/objsh.hxx:675 + void SfxObjectShell::AppendInfoBarWhenReady(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,enum InfobarType,_Bool) + enum InfobarType aInfobarType + 2 +include/sfx2/opengrf.hxx:38 + void SvxOpenGraphicDialog::SvxOpenGraphicDialog(const class rtl::OUString &,class weld::Window *,short) + short nDialogType + 13 +include/sfx2/request.hxx:64 + void SfxRequest::SfxRequest(unsigned short,enum SfxCallMode,const class SfxAllItemSet &,const class SfxAllItemSet &) + unsigned short nSlot + 5904 +include/sfx2/sfxhtml.hxx:64 + _Bool SfxHTMLParser::ParseAreaOptions(class ImageMap *,const class rtl::OUString &,enum SvMacroItemId,enum SvMacroItemId) + enum SvMacroItemId nEventMouseOver + 5100 +include/sfx2/sfxhtml.hxx:64 + _Bool SfxHTMLParser::ParseAreaOptions(class ImageMap *,const class rtl::OUString &,enum SvMacroItemId,enum SvMacroItemId) + enum SvMacroItemId nEventMouseOut + 5102 +include/sfx2/sidebar/SidebarController.hxx:132 + _Bool sfx2::sidebar::SidebarController::IsDeckOpen(const int) + const int nIndex + -1 +include/sfx2/tabdlg.hxx:51 + void SfxTabDialogItem::SfxTabDialogItem(unsigned short,const class SfxItemSet &) + unsigned short nId + 11022 +include/sot/stg.hxx:99 + class BaseStorage * BaseStorage::OpenUCBStorage(const class rtl::OUString &,enum StreamMode,_Bool) + enum StreamMode + 2050 +include/sot/stg.hxx:102 + class BaseStorage * BaseStorage::OpenOLEStorage(const class rtl::OUString &,enum StreamMode,_Bool) + enum StreamMode + 2050 +include/sot/storage.hxx:44 + void SotTempStream::SotTempStream(const class rtl::OUString &,enum StreamMode) + enum StreamMode + 2051 +include/store/store.h:62 + storeError store_createMemoryFile(unsigned short,void **) + unsigned short nPageSize + 1024 +include/store/store.h:79 + storeError store_openFile(struct _rtl_uString *,enum storeAccessMode,unsigned short,void **) + unsigned short nPageSize + 1024 +include/svl/globalnameitem.hxx:34 + void SfxGlobalNameItem::SfxGlobalNameItem(unsigned short,const class SvGlobalName &) + unsigned short nWhich + 5561 +include/svl/int64item.hxx:21 + void SfxInt64Item::SfxInt64Item(unsigned short,long) + unsigned short nWhich + 11141 +include/svl/int64item.hxx:21 + void SfxInt64Item::SfxInt64Item(unsigned short,long) + long nVal + 75 +include/svl/itemset.hxx:206 + void SfxItemSet::PutExtended(const class SfxItemSet &,enum SfxItemState,enum SfxItemState) + enum SfxItemState eDontCareAs + 16 +include/svl/languageoptions.hxx:120 + _Bool SvtSystemLanguageOptions::isKeyboardLayoutTypeInstalled(short) const + short scriptType + 2 +include/svl/svdde.hxx:157 + void DdePoke::DdePoke(class DdeConnection &,const class rtl::OUString &,const class DdeData &,long) + long + 30000 +include/svl/svdde.hxx:164 + void DdeExecute::DdeExecute(class DdeConnection &,const class rtl::OUString &,long) + long + 30000 +include/svl/urihelper.hxx:51 + class rtl::OUString SmartRel2Abs(const class INetURLObject &,const class rtl::OUString &,const class Link &,_Bool,_Bool,enum INetURLObject::EncodeMechanism,enum INetURLObject::DecodeMechanism,unsigned short,enum FSysStyle) + unsigned short eCharset + 76 +include/svl/urihelper.hxx:51 + class rtl::OUString SmartRel2Abs(const class INetURLObject &,const class rtl::OUString &,const class Link &,_Bool,_Bool,enum INetURLObject::EncodeMechanism,enum INetURLObject::DecodeMechanism,unsigned short,enum FSysStyle) + enum FSysStyle eStyle + 7 +include/svl/urihelper.hxx:116 + class rtl::OUString FindFirstURLInText(const class rtl::OUString &,int &,int &,const class CharClass &,enum INetURLObject::EncodeMechanism,unsigned short) + unsigned short eCharset + 76 +include/svl/urihelper.hxx:148 + class rtl::OUString removePassword(const class rtl::OUString &,enum INetURLObject::EncodeMechanism,enum INetURLObject::DecodeMechanism,unsigned short) + enum INetURLObject::DecodeMechanism eDecodeMechanism + 3 +include/svl/urihelper.hxx:148 + class rtl::OUString removePassword(const class rtl::OUString &,enum INetURLObject::EncodeMechanism,enum INetURLObject::DecodeMechanism,unsigned short) + unsigned short eCharset + 76 +include/svl/zformat.hxx:396 + _Bool SvNumberformat::IsInQuote(const class rtl::OUString &,int,char16_t,char16_t,char16_t) + char16_t cEscOut + 92 +include/svl/zformat.hxx:411 + int SvNumberformat::GetQuoteEnd(const class rtl::OUString &,int,char16_t,char16_t) + char16_t cQuote + 34 +include/svtools/brwbox.hxx:643 + void BrowseBox::commitBrowseBoxEvent(short,const class com::sun::star::uno::Any &,const class com::sun::star::uno::Any &) + short nEventId + 7 +include/svtools/ctrlbox.hxx:382 + void FontNameBox::set_size_request(int,int) + int nHeight + -1 +include/svtools/ctrlbox.hxx:462 + void FontSizeBox::EnableRelativeMode(unsigned short,unsigned short,unsigned short) + unsigned short nMin + 5 +include/svtools/ctrlbox.hxx:462 + void FontSizeBox::EnableRelativeMode(unsigned short,unsigned short,unsigned short) + unsigned short nMax + 995 +include/svtools/ctrlbox.hxx:462 + void FontSizeBox::EnableRelativeMode(unsigned short,unsigned short,unsigned short) + unsigned short nStep + 5 +include/svtools/ctrlbox.hxx:463 + void FontSizeBox::EnablePtRelativeMode(short,short,short) + short nStep + 10 +include/svtools/htmlout.hxx:69 + class SvStream & HTMLOutFuncs::Out_Hex(class SvStream &,unsigned long,unsigned char) + unsigned char nLen + 2 +include/svtools/unitconv.hxx:42 + long ControlToItem(long,enum FieldUnit,enum MapUnit) + enum FieldUnit eCtrl + 5 +include/svx/AccessibleShape.hxx:208 + _Bool accessibility::AccessibleShape::GetState(short) + short aState + 11 +include/svx/chrtitem.hxx:83 + void SvxChartRegressItem::SvxChartRegressItem(enum SvxChartRegress,unsigned short) + unsigned short nId + 90 +include/svx/chrtitem.hxx:94 + void SvxChartTextOrderItem::SvxChartTextOrderItem(enum SvxChartTextOrder,unsigned short) + unsigned short nId + 68 +include/svx/chrtitem.hxx:108 + void SvxChartKindErrorItem::SvxChartKindErrorItem(enum SvxChartKindError,unsigned short) + unsigned short nId + 20 +include/svx/chrtitem.hxx:119 + void SvxChartIndicateItem::SvxChartIndicateItem(enum SvxChartIndicate,unsigned short) + unsigned short nId + 25 +include/svx/dbaexchange.hxx:57 + void svx::OColumnTransferable::OColumnTransferable(enum ColumnTransferFormatFlags) + enum ColumnTransferFormatFlags nFormats + 7 +include/svx/dbaexchange.hxx:97 + void svx::OColumnTransferable::OColumnTransferable(const class com::sun::star::uno::Reference &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,enum ColumnTransferFormatFlags) + enum ColumnTransferFormatFlags _nFormats + 5 +include/svx/dlgctrl.hxx:106 + void SvxRectCtl::SetControlSettings(enum RectPoint,unsigned short) + enum RectPoint eRpt + 4 +include/svx/dlgctrl.hxx:106 + void SvxRectCtl::SetControlSettings(enum RectPoint,unsigned short) + unsigned short nBorder + 240 +include/svx/drawitem.hxx:59 + void SvxGradientListItem::SvxGradientListItem(const class rtl::Reference &,unsigned short) + unsigned short nWhich + 10180 +include/svx/drawitem.hxx:83 + void SvxHatchListItem::SvxHatchListItem(const class rtl::Reference &,unsigned short) + unsigned short nWhich + 10181 +include/svx/drawitem.hxx:108 + void SvxBitmapListItem::SvxBitmapListItem(const class rtl::Reference &,unsigned short) + unsigned short nWhich + 10182 +include/svx/drawitem.hxx:133 + void SvxPatternListItem::SvxPatternListItem(const class rtl::Reference &,unsigned short) + unsigned short nWhich + 10183 +include/svx/drawitem.hxx:157 + void SvxDashListItem::SvxDashListItem(const class rtl::Reference &,unsigned short) + unsigned short nWhich + 10184 +include/svx/drawitem.hxx:182 + void SvxLineEndListItem::SvxLineEndListItem(const class rtl::Reference &,unsigned short) + unsigned short nWhich + 10185 +include/svx/float3d.hxx:266 + void Svx3DCtrlItem::Svx3DCtrlItem(unsigned short,class SfxBindings *) + unsigned short + 10645 +include/svx/fmgridcl.hxx:43 + void FmGridHeader::FmGridHeader(class BrowseBox *,long) + long nWinBits + 1051648 +include/svx/fmview.hxx:88 + void FmFormView::createControlLabelPair(const class OutputDevice *,int,int,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,enum SdrObjKind,enum SdrInventor,enum SdrObjKind,class SdrModel &,class std::unique_ptr &,class std::unique_ptr &) + enum SdrInventor _nInventor + 827609170 +include/svx/fmview.hxx:88 + void FmFormView::createControlLabelPair(const class OutputDevice *,int,int,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,enum SdrObjKind,enum SdrInventor,enum SdrObjKind,class SdrModel &,class std::unique_ptr &,class std::unique_ptr &) + enum SdrObjKind _nLabelObjectID + 501 +include/svx/fontworkgallery.hxx:60 + void svx::FontWorkGalleryDialog::initFavorites(unsigned short) + unsigned short nThemeId + 37 +include/svx/fontworkgallery.hxx:62 + void svx::FontWorkGalleryDialog::fillFavorites(unsigned short) + unsigned short nThemeId + 37 +include/svx/framelink.hxx:117 + void svx::frame::Style::Style(double,double,double,enum SvxBorderLineStyle,double) + double nP + 3 +include/svx/gallery.hxx:110 + _Bool GalleryExplorer::FillObjListTitle(const unsigned int,class std::__debug::vector > &) + const unsigned int nThemeId + 16 +include/svx/gallery.hxx:117 + _Bool GalleryExplorer::GetGraphicObj(unsigned int,unsigned int,class Graphic *) + unsigned int nThemeId + 3 +include/svx/galmisc.hxx:188 + void GalleryHint::GalleryHint(enum GalleryHintType,const class rtl::OUString &,const class rtl::OUString &) + enum GalleryHintType nType + 2 +include/svx/grfcrop.hxx:33 + void SvxGrfCrop::SvxGrfCrop(unsigned short) + unsigned short + 134 +include/svx/langbox.hxx:72 + void SvxLanguageBox::InsertLanguage(const struct o3tl::strong_int,short) + short nType + 4 +include/svx/numinf.hxx:33 + void SvxNumberInfoItem::SvxNumberInfoItem(const unsigned short) + const unsigned short nId + 10086 +include/svx/numinf.hxx:38 + void SvxNumberInfoItem::SvxNumberInfoItem(class SvNumberFormatter *,const double &,const unsigned short) + const unsigned short nId + 10086 +include/svx/numinf.hxx:41 + void SvxNumberInfoItem::SvxNumberInfoItem(class SvNumberFormatter *,const double &,const class rtl::OUString &,const unsigned short) + const unsigned short nId + 10086 +include/svx/ofaitem.hxx:32 + void OfaPtrItem::OfaPtrItem(unsigned short,void *) + unsigned short nWhich + 11021 +include/svx/ofaitem.hxx:46 + void OfaRefItem::OfaRefItem(unsigned short,const Reference &) + unsigned short _nWhich + 10441 +include/svx/optgrid.hxx:77 + void SvxGridItem::SvxGridItem(unsigned short) + unsigned short _nWhich + 10298 +include/svx/relfld.hxx:43 + void SvxRelativeField::EnableRelativeMode(unsigned short,unsigned short) + unsigned short nMax + 999 +include/svx/ruler.hxx:244 + _Bool SvxRuler::IsActLastColumn(_Bool,unsigned short) const + unsigned short nAct + 65535 +include/svx/ruler.hxx:247 + _Bool SvxRuler::IsActFirstColumn(_Bool,unsigned short) const + unsigned short nAct + 65535 +include/svx/sdtaitm.hxx:38 + void SdrTextVertAdjustItem::SdrTextVertAdjustItem(enum SdrTextVertAdjust,unsigned short) + unsigned short nWhich + 130 +include/svx/svdetc.hxx:104 + class std::unique_ptr > RemoveWhichRange(const unsigned short *,unsigned short,unsigned short) + unsigned short nRangeBeg + 4006 +include/svx/svdetc.hxx:104 + class std::unique_ptr > RemoveWhichRange(const unsigned short *,unsigned short,unsigned short) + unsigned short nRangeEnd + 4061 +include/svx/svdhdl.hxx:349 + void SdrHdlLine::SdrHdlLine(class SdrHdl &,class SdrHdl &,enum SdrHdlKind) + enum SdrHdlKind eNewKind + 14 +include/svx/svdhdl.hxx:362 + void SdrHdlBezWgt::SdrHdlBezWgt(const class SdrHdl *,enum SdrHdlKind) + enum SdrHdlKind eNewKind + 10 +include/svx/svdhdl.hxx:393 + void ImpEdgeHdl::ImpEdgeHdl(const class Point &,enum SdrHdlKind) + enum SdrHdlKind eNewKind + 9 +include/svx/svdhdl.hxx:409 + void ImpMeasureHdl::ImpMeasureHdl(const class Point &,enum SdrHdlKind) + enum SdrHdlKind eNewKind + 20 +include/svx/svdmodel.hxx:119 + void SdrHint::SdrHint(enum SdrHintKind,const class SdrPage *) + enum SdrHintKind eNewHint + 2 +include/svx/svdmrkv.hxx:292 + _Bool SdrMarkView::PickMarkedObj(const class Point &,class SdrObject *&,class SdrPageView *&,enum SdrSearchOptions) const + enum SdrSearchOptions nOptions + 128 +include/svx/svdpage.hxx:114 + void SdrObjList::InsertObjectThenMakeNameUnique(class SdrObject *,class std::__debug::unordered_set, struct std::equal_to, class std::allocator > &,unsigned long) + unsigned long nPos + 18446744073709551615 +include/svx/txencbox.hxx:151 + int SvxTextEncodingTreeView::get_height_rows(int) const + int nRows + 6 +include/svx/txencbox.hxx:155 + void SvxTextEncodingTreeView::set_size_request(int,int) + int nWidth + -1 +include/svx/unoapi.hxx:44 + class rtl::Reference CreateSvxShapeByTypeAndInventor(unsigned short,enum SdrInventor,const class rtl::OUString &) + enum SdrInventor nInventor + 1917081171 +include/svx/xflclit.hxx:37 + void XFillColorItem::XFillColorItem(int,const class Color &) + int nIndex + -1 +include/svx/xflgrit.hxx:39 + void XFillGradientItem::XFillGradientItem(int,const class XGradient &) + int nIndex + -1 +include/svx/xlnclit.hxx:33 + void XLineColorItem::XLineColorItem(int,const class Color &) + int nIndex + -1 +include/svx/xpoly.hxx:74 + void XPolygon::Insert(unsigned short,const class XPolygon &) + unsigned short nPos + 65535 +include/test/helper/form.hxx:40 + class com::sun::star::uno::Reference createCommandButton(const class com::sun::star::uno::Reference &,const int,const int,const int,const int) + const int nX + 15000 +include/test/helper/form.hxx:40 + class com::sun::star::uno::Reference createCommandButton(const class com::sun::star::uno::Reference &,const int,const int,const int,const int) + const int nY + 10000 +include/test/helper/form.hxx:40 + class com::sun::star::uno::Reference createCommandButton(const class com::sun::star::uno::Reference &,const int,const int,const int,const int) + const int nHeight + 3000 +include/test/helper/form.hxx:40 + class com::sun::star::uno::Reference createCommandButton(const class com::sun::star::uno::Reference &,const int,const int,const int,const int) + const int nWidth + 4500 +include/test/helper/shape.hxx:55 + class com::sun::star::uno::Reference createLine(const class com::sun::star::uno::Reference &,const int,const int,const int,const int) + const int nX + 7500 +include/test/helper/shape.hxx:55 + class com::sun::star::uno::Reference createLine(const class com::sun::star::uno::Reference &,const int,const int,const int,const int) + const int nY + 10000 +include/test/helper/shape.hxx:55 + class com::sun::star::uno::Reference createLine(const class com::sun::star::uno::Reference &,const int,const int,const int,const int) + const int nWidth + 5000 +include/test/helper/shape.hxx:55 + class com::sun::star::uno::Reference createLine(const class com::sun::star::uno::Reference &,const int,const int,const int,const int) + const int nHeight + 3500 +include/test/helper/shape.hxx:69 + class com::sun::star::uno::Reference createRectangle(const class com::sun::star::uno::Reference &,const int,const int,const int,const int) + const int nY + 5000 +include/test/helper/shape.hxx:69 + class com::sun::star::uno::Reference createRectangle(const class com::sun::star::uno::Reference &,const int,const int,const int,const int) + const int nWidth + 5000 +include/test/unoapi_property_testers.hxx:85 + void testLongOptionalProperty(const class com::sun::star::uno::Reference &,const class rtl::OUString &,const int &) + const int & nValue + 42 +include/test/unoapi_property_testers.hxx:166 + void testColorProperty(const class com::sun::star::uno::Reference &,const class rtl::OUString &,const int &) + const int & rValue + 305419896 +include/toolkit/controls/unocontrolbase.hxx:47 + int UnoControlBase::ImplGetPropertyValue_INT32(unsigned short) + unsigned short nProp + 74 +include/tools/b3dtrans.hxx:113 + void B3dTransformationSet::SetDeviceRectangle(double,double,double,double) + double fL + -2 +include/tools/b3dtrans.hxx:113 + void B3dTransformationSet::SetDeviceRectangle(double,double,double,double) + double fR + 2 +include/tools/b3dtrans.hxx:113 + void B3dTransformationSet::SetDeviceRectangle(double,double,double,double) + double fB + -2 +include/tools/b3dtrans.hxx:113 + void B3dTransformationSet::SetDeviceRectangle(double,double,double,double) + double fT + 2 +include/tools/datetime.hxx:87 + class DateTime operator+(const class DateTime &,int) + int nDays + 10 +include/tools/fract.hxx:70 + class Fraction & Fraction::operator*=(double) + ###1 + -1 +include/tools/fract.hxx:103 + class Fraction operator+(double,const class Fraction &) + double v1 + 21600 +include/tools/fract.hxx:104 + class Fraction operator-(double,const class Fraction &) + double v1 + 21600 +include/tools/gen.hxx:92 + class Point & Point::operator*=(const long) + ###1 + -1 +include/tools/gen.hxx:93 + class Point & Point::operator/=(const long) + ###1 + 2 +include/tools/gen.hxx:97 + class Point operator*(const class Point &,const long) + const long nVal2 + -1 +include/tools/gen.hxx:203 + void Size::extendBy(long,long) + long x + 10 +include/tools/gen.hxx:203 + void Size::extendBy(long,long) + long y + 10 +include/tools/poly.hxx:96 + void tools::Polygon::Polygon(const class Point &,const class Point &,const class Point &,const class Point &,unsigned short) + unsigned short nPoints + 25 +include/tools/urlobj.hxx:271 + class rtl::OUString INetURLObject::GetURLNoMark(enum INetURLObject::DecodeMechanism,unsigned short) const + unsigned short eCharset + 76 +include/tools/urlobj.hxx:276 + class rtl::OUString INetURLObject::getAbbreviated(const class com::sun::star::uno::Reference &,int,enum INetURLObject::DecodeMechanism,unsigned short) const + enum INetURLObject::DecodeMechanism eMechanism + 3 +include/tools/urlobj.hxx:276 + class rtl::OUString INetURLObject::getAbbreviated(const class com::sun::star::uno::Reference &,int,enum INetURLObject::DecodeMechanism,unsigned short) const + unsigned short eCharset + 76 +include/tools/urlobj.hxx:294 + _Bool INetURLObject::SetURL(const class rtl::OUString &,enum INetURLObject::EncodeMechanism,unsigned short) + unsigned short eCharset + 76 +include/tools/urlobj.hxx:344 + class rtl::OUString INetURLObject::GetAbsURL(const class rtl::OUString &,const class rtl::OUString &,enum INetURLObject::EncodeMechanism,enum INetURLObject::DecodeMechanism,unsigned short) + unsigned short eCharset + 76 +include/tools/urlobj.hxx:351 + class rtl::OUString INetURLObject::GetRelURL(const class rtl::OUString &,const class rtl::OUString &,enum INetURLObject::EncodeMechanism,enum INetURLObject::DecodeMechanism,unsigned short,enum FSysStyle) + unsigned short eCharset + 76 +include/tools/urlobj.hxx:351 + class rtl::OUString INetURLObject::GetRelURL(const class rtl::OUString &,const class rtl::OUString &,enum INetURLObject::EncodeMechanism,enum INetURLObject::DecodeMechanism,unsigned short,enum FSysStyle) + enum FSysStyle eStyle + 7 +include/tools/urlobj.hxx:362 + _Bool INetURLObject::translateToExternal(const class rtl::OUString &,class rtl::OUString &,enum INetURLObject::DecodeMechanism,unsigned short) + unsigned short eCharset + 76 +include/tools/urlobj.hxx:369 + _Bool INetURLObject::translateToInternal(const class rtl::OUString &,class rtl::OUString &,enum INetURLObject::DecodeMechanism,unsigned short) + enum INetURLObject::DecodeMechanism eDecodeMechanism + 3 +include/tools/urlobj.hxx:369 + _Bool INetURLObject::translateToInternal(const class rtl::OUString &,class rtl::OUString &,enum INetURLObject::DecodeMechanism,unsigned short) + unsigned short eCharset + 76 +include/tools/urlobj.hxx:416 + class rtl::OUString INetURLObject::GetUser(enum INetURLObject::DecodeMechanism,unsigned short) const + unsigned short eCharset + 76 +include/tools/urlobj.hxx:421 + class rtl::OUString INetURLObject::GetPass(enum INetURLObject::DecodeMechanism,unsigned short) const + unsigned short eCharset + 76 +include/tools/urlobj.hxx:438 + class rtl::OUString INetURLObject::GetHost(enum INetURLObject::DecodeMechanism,unsigned short) const + unsigned short eCharset + 76 +include/tools/urlobj.hxx:443 + class rtl::OUString INetURLObject::GetHostPort(enum INetURLObject::DecodeMechanism,unsigned short) const + enum INetURLObject::DecodeMechanism eMechanism + 2 +include/tools/urlobj.hxx:443 + class rtl::OUString INetURLObject::GetHostPort(enum INetURLObject::DecodeMechanism,unsigned short) const + unsigned short eCharset + 76 +include/tools/urlobj.hxx:462 + _Bool INetURLObject::SetURLPath(const class rtl::OUString &,enum INetURLObject::EncodeMechanism,unsigned short) + unsigned short eCharset + 76 +include/tools/urlobj.hxx:516 + _Bool INetURLObject::removeSegment(int,_Bool) + int nIndex + -1 +include/tools/urlobj.hxx:586 + _Bool INetURLObject::setName(const class rtl::OUString &,enum INetURLObject::EncodeMechanism,unsigned short) + unsigned short eCharset + 76 +include/tools/urlobj.hxx:606 + class rtl::OUString INetURLObject::getBase(int,_Bool,enum INetURLObject::DecodeMechanism,unsigned short) const + int nIndex + -1 +include/tools/urlobj.hxx:606 + class rtl::OUString INetURLObject::getBase(int,_Bool,enum INetURLObject::DecodeMechanism,unsigned short) const + unsigned short eCharset + 76 +include/tools/urlobj.hxx:630 + _Bool INetURLObject::setBase(const class rtl::OUString &,int,enum INetURLObject::EncodeMechanism,unsigned short) + int nIndex + -1 +include/tools/urlobj.hxx:630 + _Bool INetURLObject::setBase(const class rtl::OUString &,int,enum INetURLObject::EncodeMechanism,unsigned short) + unsigned short eCharset + 76 +include/tools/urlobj.hxx:659 + class rtl::OUString INetURLObject::getExtension(int,_Bool,enum INetURLObject::DecodeMechanism,unsigned short) const + int nIndex + -1 +include/tools/urlobj.hxx:659 + class rtl::OUString INetURLObject::getExtension(int,_Bool,enum INetURLObject::DecodeMechanism,unsigned short) const + unsigned short eCharset + 76 +include/tools/urlobj.hxx:683 + _Bool INetURLObject::setExtension(const class rtl::OUString &,int,_Bool,unsigned short) + int nIndex + -1 +include/tools/urlobj.hxx:683 + _Bool INetURLObject::setExtension(const class rtl::OUString &,int,_Bool,unsigned short) + unsigned short eCharset + 76 +include/tools/urlobj.hxx:702 + _Bool INetURLObject::removeExtension(int,_Bool) + int nIndex + -1 +include/tools/urlobj.hxx:735 + class rtl::OUString INetURLObject::GetParam(unsigned short) const + unsigned short eCharset + 76 +include/tools/urlobj.hxx:739 + _Bool INetURLObject::SetParam(const class rtl::OUString &,enum INetURLObject::EncodeMechanism,unsigned short) + unsigned short eCharset + 76 +include/tools/urlobj.hxx:747 + class rtl::OUString INetURLObject::GetMark(enum INetURLObject::DecodeMechanism,unsigned short) const + unsigned short eCharset + 76 +include/tools/urlobj.hxx:752 + _Bool INetURLObject::SetMark(const class rtl::OUString &,enum INetURLObject::EncodeMechanism,unsigned short) + unsigned short eCharset + 76 +include/tools/urlobj.hxx:897 + _Bool INetURLObject::Append(const class rtl::OUString &,enum INetURLObject::EncodeMechanism,unsigned short) + unsigned short eCharset + 76 +include/tools/urlobj.hxx:1031 + _Bool INetURLObject::setUser(const class rtl::OUString &,unsigned short) + unsigned short eCharset + 76 +include/tools/urlobj.hxx:1037 + _Bool INetURLObject::setPassword(const class rtl::OUString &,unsigned short) + unsigned short eCharset + 76 +include/tools/urlobj.hxx:1052 + _Bool INetURLObject::setHost(const class rtl::OUString &,unsigned short) + unsigned short eCharset + 76 +include/ucbhelper/simpleinteractionrequest.hxx:79 + void ucbhelper::SimpleInteractionRequest::SimpleInteractionRequest(const class com::sun::star::uno::Any &,const enum ContinuationFlags) + const enum ContinuationFlags nContinuations + 12 +include/unotools/compatibility.hxx:210 + void SvtCompatibilityOptions::SetDefault(enum SvtCompatibilityEntry::Index,_Bool) + enum SvtCompatibilityEntry::Index rIdx + 12 +include/unotools/confignode.hxx:254 + class utl::OConfigurationTreeRoot utl::OConfigurationTreeRoot::tryCreateWithComponentContext(const class com::sun::star::uno::Reference &,const class rtl::OUString &,int,enum utl::OConfigurationTreeRoot::CREATION_MODE) + int _nDepth + -1 +include/unotools/configvaluecontainer.hxx:83 + void utl::OConfigurationValueContainer::OConfigurationValueContainer(const class com::sun::star::uno::Reference &,class osl::Mutex &,const char *,const int) + const int _nLevels + 2 +include/unotools/fontdefs.hxx:43 + class rtl::OUString GetSubsFontName(const class rtl::OUString &,enum SubsFontFlags) + enum SubsFontFlags nFlags + 3 +include/unotools/useroptions.hxx:90 + void SvtUserOptions::SetBoolValue(enum UserOptToken,_Bool) + enum UserOptToken nToken + 19 +include/vcl/accessiblefactory.hxx:113 + class com::sun::star::uno::Reference vcl::IAccessibleFactory::createAccessibleBrowseBoxHeaderBar(const class com::sun::star::uno::Reference &,class vcl::IAccessibleTableProvider &,enum AccessibleBrowseBoxObjType) const + enum AccessibleBrowseBoxObjType _eObjType + 3 +include/vcl/bitmap.hxx:539 + _Bool Bitmap::ImplConvertDown(enum vcl::PixelFormat,const class Color *) + enum vcl::PixelFormat ePixelFormat + 8 +include/vcl/BitmapAlphaClampFilter.hxx:21 + void BitmapAlphaClampFilter::BitmapAlphaClampFilter(unsigned char) + unsigned char cThreshold + 253 +include/vcl/BitmapBasicMorphologyFilter.hxx:50 + void BitmapErodeFilter::BitmapErodeFilter(int,unsigned char) + unsigned char nValueOutside + 255 +include/vcl/bitmapex.hxx:52 + void BitmapEx::BitmapEx(class Size,enum vcl::PixelFormat) + enum vcl::PixelFormat ePixelFormat + 24 +include/vcl/bitmapex.hxx:452 + void BitmapEx::CombineMaskOr(class Color,unsigned char) + unsigned char nTol + 9 +include/vcl/errinf.hxx:187 + void TwoStringErrorInfo::TwoStringErrorInfo(class ErrCode,const class rtl::OUString &,const class rtl::OUString &,enum DialogMask) + enum DialogMask nMask + 4097 +include/vcl/fieldvalues.hxx:60 + double ConvertDoubleValue(long,unsigned short,enum FieldUnit,enum MapUnit) + enum MapUnit eOutUnit + 9 +include/vcl/fieldvalues.hxx:66 + double ConvertDoubleValue(long,unsigned short,enum MapUnit,enum FieldUnit) + enum MapUnit eInUnit + 9 +include/vcl/filter/PDFiumLibrary.hxx:216 + _Bool vcl::pdf::PDFiumDocument::saveWithVersion(class SvMemoryStream &,int) + int nFileVersion + 16 +include/vcl/font.hxx:94 + void vcl::Font::IncreaseQualityBy(int) + int + 50 +include/vcl/font.hxx:95 + void vcl::Font::DecreaseQualityBy(int) + int + 100 +include/vcl/font/Feature.hxx:75 + void vcl::font::FeatureDefinition::FeatureDefinition(unsigned int,const char *,class std::__debug::vector >) + unsigned int nCode + 1718772067 +include/vcl/imap.hxx:117 + unsigned long ImageMap::Read(class SvStream &,enum IMapFormat) + enum IMapFormat nFormat + 15 +include/vcl/outdev.hxx:1193 + int OutputDevice::GetTextBreak(const class rtl::OUString &,long,char16_t,int &,int,int,long,const class vcl::TextLayoutCache *) const + char16_t nExtraChar + 45 +include/vcl/print.hxx:667 + class com::sun::star::uno::Any vcl::PrinterOptionsHelper::setRangeControlOpt(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,int,int,int,const struct vcl::PrinterOptionsHelper::UIControlOptions &) + int i_nMinValue + 10 +include/vcl/print.hxx:667 + class com::sun::star::uno::Any vcl::PrinterOptionsHelper::setRangeControlOpt(const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,const class rtl::OUString &,int,int,int,const struct vcl::PrinterOptionsHelper::UIControlOptions &) + int i_nMaxValue + 1000 +include/vcl/svapp.hxx:752 + struct ImplSVEvent * Application::PostGestureEvent(enum VclEventId,class vcl::Window *,const class GestureEventPan *) + enum VclEventId nEvent + 130 +include/vcl/texteng.hxx:132 + class TextPaM TextEngine::ImpInsertText(const class TextSelection &,char16_t,_Bool) + char16_t c + 9 +include/vcl/toolbox.hxx:328 + void ToolBox::InsertBreak(unsigned long) + unsigned long nPos + 18446744073709551615 +include/vcl/toolkit/lstbox.hxx:117 + void ListBox::ListBox(enum WindowType) + enum WindowType nType + 331 +include/vcl/toolkit/svtabbx.hxx:85 + class rtl::OUString SvTabListBox::GetEntryText(unsigned long,unsigned short) const + unsigned short nCol + 65535 +include/vcl/toolkit/svtabbx.hxx:90 + void SvTabListBox::SetTabJustify(unsigned short,enum SvTabJustify) + enum SvTabJustify + 8 +include/vcl/toolkit/treelistbox.hxx:498 + class SvLBoxTab * SvTreeListBox::GetFirstTab(enum SvLBoxTabFlags,unsigned short &) + enum SvLBoxTabFlags nFlagMask + 16 +include/vcl/toolkit/treelistbox.hxx:499 + void SvTreeListBox::GetLastTab(enum SvLBoxTabFlags,unsigned short &) + enum SvLBoxTabFlags nFlagMask + 16 +include/vcl/toolkit/treelistbox.hxx:658 + void SvTreeListBox::SetHighlightRange(unsigned short,unsigned short) + unsigned short nLastTab + 65535 +include/vcl/transfer.hxx:228 + void TransferableHelper::RemoveFormat(enum SotClipboardFormatId) + enum SotClipboardFormatId nFormat + 59 +include/vcl/transfer.hxx:326 + _Bool TransferableDataHelper::GetBitmapEx(enum SotClipboardFormatId,class BitmapEx &) + enum SotClipboardFormatId nFormat + 2 +include/vcl/transfer.hxx:337 + _Bool TransferableDataHelper::GetGDIMetaFile(enum SotClipboardFormatId,class GDIMetaFile &,unsigned long) + enum SotClipboardFormatId nFormat + 3 +include/vcl/transfer.hxx:343 + _Bool TransferableDataHelper::GetImageMap(enum SotClipboardFormatId,class ImageMap &) + enum SotClipboardFormatId nFormat + 13 +include/vcl/transfer.hxx:358 + class com::sun::star::uno::Sequence TransferableDataHelper::GetSequence(enum SotClipboardFormatId,const class rtl::OUString &) + enum SotClipboardFormatId nFormat + 59 +include/vcl/TypeSerializer.hxx:29 + unsigned int createMagic(char,char,char,char) + char char4 + 48 +include/vcl/uitest/logger.hxx:51 + void UITestLogger::logAction(class vcl::Window *const &,enum VclEventId) + enum VclEventId nEvent + 85 +include/vcl/weld.hxx:958 + void weld::TreeView::insert_separator(int,const class rtl::OUString &) + int pos + -1 +include/vcl/weld.hxx:998 + void weld::TreeView::set_sensitive(int,_Bool,int) + int col + -1 +include/vcl/window.hxx:1507 + void vcl::Window::SimulateKeyPress(unsigned short) const + unsigned short nKeyCode + 1312 +include/vcl/wrkwin.hxx:61 + void WorkWindow::WorkWindow(enum WindowType) + enum WindowType nType + 369 +include/vcl/wrkwin.hxx:67 + void WorkWindow::WorkWindow(class vcl::Window *,const class com::sun::star::uno::Any &,long) + long nStyle + 1312 +include/xmloff/txtparae.hxx:349 + void XMLTextParagraphExport::exportListAndSectionChange(class com::sun::star::uno::Reference &,class MultiPropertySetHelper &,short,const class com::sun::star::uno::Reference &,const class XMLTextNumRuleInfo &,const class XMLTextNumRuleInfo &,_Bool) + short nTextSectionId + 5 +include/xmloff/txtparae.hxx:381 + void XMLTextParagraphExport::Add(enum XmlStyleFamily,class MultiPropertySetHelper &,const class com::sun::star::uno::Reference &) + enum XmlStyleFamily nFamily + 100 +include/xmloff/xmlaustp.hxx:94 + void SvXMLAutoStylePoolP::SetFamilyPropSetMapper(enum XmlStyleFamily,const class rtl::Reference &) + enum XmlStyleFamily nFamily + 203 +include/xmloff/xmlaustp.hxx:101 + void SvXMLAutoStylePoolP::RegisterDefinedName(enum XmlStyleFamily,const class rtl::OUString &) + enum XmlStyleFamily nFamily + 204 +include/xmloff/xmlerror.hxx:135 + void XMLErrors::ThrowErrorAsSAXException(int) + int nIdMask + 1073741824 +include/xmloff/xmlexp.hxx:272 + void SvXMLExport::SvXMLExport(const class com::sun::star::uno::Reference &,const class rtl::OUString &,const class rtl::OUString &,const short,const class com::sun::star::uno::Reference &) + const short eDefaultMeasureUnit + 3 +include/xmloff/xmlexp.hxx:337 + void SvXMLExport::AddAttributeASCII(unsigned short,const char *,const char *) + unsigned short nPrefix + 34 +include/xmloff/xmlexp.hxx:512 + void SvXMLExport::SetError(int,const class com::sun::star::uno::Sequence &) + int nId + 1074266113 +include/xmloff/xmlexppr.hxx:135 + void SvXMLExportPropertyMapper::exportXML(class SvXMLExport &,const class std::__debug::vector > &,enum SvXmlExportFlags,_Bool) const + enum SvXmlExportFlags nFlags + 8 +include/xmloff/xmlnumfi.hxx:205 + _Bool SvXMLNumFormatContext::ReplaceNfKeyword(unsigned short,unsigned short) + unsigned short nOld + 24 +include/xmloff/xmlnumfi.hxx:205 + _Bool SvXMLNumFormatContext::ReplaceNfKeyword(unsigned short,unsigned short) + unsigned short nNew + 25 +include/xmloff/XMLSettingsExportContext.hxx:37 + void xmloff::XMLSettingsExportContext::AddAttribute(enum xmloff::token::XMLTokenEnum,const class rtl::OUString &) + enum xmloff::token::XMLTokenEnum i_eName + 1250 +include/xmloff/XMLSettingsExportContext.hxx:39 + void xmloff::XMLSettingsExportContext::AddAttribute(enum xmloff::token::XMLTokenEnum,enum xmloff::token::XMLTokenEnum) + enum xmloff::token::XMLTokenEnum i_eName + 1907 +libreofficekit/qa/tilebench/tilebench.cxx:72 + void dumpTile(const char *,const int,const int,const int,const unsigned char *,const int,const int,int) + int nTotalWidth + -1 +libreofficekit/qa/tilebench/tilebench.cxx:345 + int testJoinsAt(class lok::Document *,long,long,const long,const long) + const long nTilePixelSize + 256 +lotuswordpro/inc/xfilter/xfdrawstyle.hxx:95 + void XFDrawStyle::SetLineDashStyle(enum enumXFLineStyle,double,double,double) + enum enumXFLineStyle style + 3 +lotuswordpro/inc/xfilter/xfdrawstyle.hxx:118 + void XFDrawStyle::SetFontWorkStyle(enum enumXFFWStyle,enum enumXFFWAdjust) + enum enumXFFWStyle eStyle + 4 +lotuswordpro/inc/xfilter/xffont.hxx:203 + void XFFont::SetPosition(_Bool,short,short) + short pos + 33 +lotuswordpro/inc/xfilter/xffont.hxx:203 + void XFFont::SetPosition(_Bool,short,short) + short scale + 58 +lotuswordpro/inc/xfilter/xfindex.hxx:100 + void XFIndexTemplate::AddTabEntry(enum enumXFTab,double,char16_t,char16_t,const class rtl::OUString &) + enum enumXFTab type + 3 +lotuswordpro/inc/xfilter/xfindex.hxx:100 + void XFIndexTemplate::AddTabEntry(enum enumXFTab,double,char16_t,char16_t,const class rtl::OUString &) + char16_t delimiter + 100 +lotuswordpro/source/filter/bento.hxx:215 + void OpenStormBento::LtcBenContainer::SeekFromEnd(long) + long Offset + -24 +lotuswordpro/source/filter/tocread.hxx:87 + enum OpenStormBento::BenError OpenStormBento::CBenTOCReader::GetData(void *,unsigned long) + unsigned long Amt + 4 +o3tl/qa/cow_wrapper_clients.hxx:69 + void o3tltests::cow_wrapper_client2::cow_wrapper_client2(int) + int nVal + 4 +o3tl/qa/cow_wrapper_clients.hxx:100 + void o3tltests::cow_wrapper_client3::cow_wrapper_client3(int) + int nVal + 7 +o3tl/qa/cow_wrapper_clients.hxx:132 + void o3tltests::cow_wrapper_client4::cow_wrapper_client4(int) + int + 4 +oox/source/core/xmlfilterbase.cxx:595 + void writeElement(const class std::shared_ptr &,int,const class com::sun::star::uno::Sequence &) + int nXmlElement + 93653875 +oox/source/core/xmlfilterbase.cxx:612 + void writeElement(const class std::shared_ptr &,int,const class LanguageTag &) + int nXmlElement + 110103439 +oox/source/export/vmlexport.cxx:333 + void impl_AddInt(class sax_fastparser::FastAttributeList *,int,unsigned int) + int nElement + 5723 +package/inc/ThreadedDeflater.hxx:55 + void ZipUtils::ThreadedDeflater::ThreadedDeflater(int) + int nSetLevel + -1 +reportdesign/source/filter/xml/xmlExport.hxx:124 + void rptxml::ORptExport::collectStyleNames(enum XmlStyleFamily,const class std::__debug::vector > &,class std::__debug::vector > &) + enum XmlStyleFamily _nFamily + 202 +reportdesign/source/filter/xml/xmlExport.hxx:125 + void rptxml::ORptExport::collectStyleNames(enum XmlStyleFamily,const class std::__debug::vector > &,const class std::__debug::vector > &,class std::__debug::vector > &) + enum XmlStyleFamily _nFamily + 203 +reportdesign/source/filter/xml/xmlStyleImport.hxx:59 + void rptxml::OControlStyleContext::AddProperty(short,const class com::sun::star::uno::Any &) + short nContextID + 28673 +reportdesign/source/ui/inc/UITools.hxx:142 + class SdrObject * isOver(const class tools::Rectangle &,const class SdrPage &,const class SdrView &,_Bool,class std::unique_ptr *,int) + int _nIgnoreListLength + 2 +sal/osl/unx/file_path_helper.cxx:173 + void (anonymous namespace)::path_list_iterator::path_list_iterator(const class rtl::OUString &,char16_t) + char16_t list_separator + 58 +sal/osl/unx/file_url.cxx:503 + _Bool _islastchr(char16_t *,char16_t) + char16_t Chr + 47 +sal/osl/unx/file_url.hxx:36 + int TextToUnicode(const char *,unsigned long,char16_t *,int) + int unic_text_buffer_size + 4096 +sal/osl/unx/nlsupport.cxx:106 + char * compose_locale(struct _rtl_Locale *,char *,unsigned long) + unsigned long n + 64 +sal/osl/unx/profile.cxx:137 + void osl_ProfileGenerateExtension(const char *,const char *,char *,int) + int BufferMaxLen + 4096 +sal/osl/unx/readwrite_helper.hxx:22 + _Bool safeRead(int,void *,unsigned long) + unsigned long count + 511 +sal/osl/unx/uunxapi.hxx:78 + int mkdir(const class rtl::OString &,unsigned int) + unsigned int aMode + 511 +sal/qa/osl/file/osl_File.cxx:106 + _Bool t_compareTime(struct TimeValue *,struct TimeValue *,int) + int nDelta + 2000 +sax/inc/xml2utf.hxx:96 + int sax_expatwrap::XMLFile2UTFConverter::readAndConvert(class com::sun::star::uno::Sequence &,int) + int nMaxToRead + 16384 +sax/source/tools/converter.cxx:56 + long toInt64_WithLength(const char16_t *,short,int) + short radix + 10 +sax/source/tools/converter.cxx:60 + long toInt64_WithLength(const char *,short,int) + short radix + 10 +sax/source/tools/converter.cxx:1175 + enum sax::(anonymous namespace)::Result readUnsignedNumberMaxDigits(int,type-parameter-?-?,unsigned long &,int &) + int maxDigits + 9 +sc/inc/address.hxx:333 + void ScAddress::Format(class rtl::OStringBuffer &,enum ScRefFlags,const class ScDocument *,const struct ScAddress::Details &) const + enum ScRefFlags nFlags + 32768 +sc/inc/autoform.hxx:81 + void ScAfVersions::Write(class SvStream &,unsigned short) + unsigned short fileVersion + 5050 +sc/inc/autoform.hxx:162 + void ScAutoFormatData::CopyItem(unsigned short,unsigned short,unsigned short) + unsigned short nWhich + 150 +sc/inc/autoform.hxx:172 + _Bool ScAutoFormatData::Save(class SvStream &,unsigned short) + unsigned short fileVersion + 5050 +sc/inc/cellsuno.hxx:491 + void ScCellRangeObj::SetArrayFormula_Impl(const class rtl::OUString &,const enum formula::FormulaGrammar::Grammar) + const enum formula::FormulaGrammar::Grammar eGrammar + 16908294 +sc/inc/chgtrack.hxx:219 + void ScChangeAction::ScChangeAction(enum ScChangeActionType,const class ScBigRange &,const unsigned long) + enum ScChangeActionType + 8 +sc/inc/colcontainer.hxx:33 + void ScColContainer::ScColContainer(const struct ScSheetLimits &,const unsigned long) + const unsigned long nSize + 64 +sc/inc/column.hxx:266 + void ScColumn::DeleteRanges(const class std::__debug::vector > &,enum InsertDeleteFlags) + enum InsertDeleteFlags nDelFlag + 2071 +sc/inc/column.hxx:527 + unsigned short ScColumn::GetOptimalColWidth(class OutputDevice *,double,double,const class Fraction &,const class Fraction &,_Bool,unsigned short,const class ScMarkData *,const struct ScColWidthParam *) const + unsigned short nOldWidth + 1167 +sc/inc/column.hxx:614 + void ScColumn::BroadcastRows(int,int,enum SfxHintId) + enum SfxHintId nHint + 52 +sc/inc/compressedarray.hxx:192 + void ScBitMaskCompressedArray::AndValue(type-parameter-?-?,const type-parameter-?-? &) + const type-parameter-?-? & rValueToAnd + 7 +sc/inc/compressedarray.hxx:198 + void ScBitMaskCompressedArray::CopyFromAnded(const ScBitMaskCompressedArray &,type-parameter-?-?,type-parameter-?-?,const type-parameter-?-? &) + const type-parameter-?-? & rValueToAnd + 8 +sc/inc/compressedarray.hxx:205 + type-parameter-?-? ScBitMaskCompressedArray::GetLastAnyBitAccess(const type-parameter-?-? &) const + const type-parameter-?-? & rBitMask + 15 +sc/inc/document.hxx:1334 + _Bool ScDocument::CompileErrorCells(enum FormulaError) + enum FormulaError nErrCode + 525 +sc/inc/document.hxx:1678 + void ScDocument::UndoToDocument(short,int,short,short,int,short,enum InsertDeleteFlags,_Bool,class ScDocument &) + enum InsertDeleteFlags nFlags + 2303 +sc/inc/document.hxx:1868 + void ScDocument::DeleteSelectionTab(short,enum InsertDeleteFlags,const class ScMarkData &) + enum InsertDeleteFlags nDelFlag + 2303 +sc/inc/document.hxx:1926 + void ScDocument::SetRowFlags(int,int,short,enum CRFlags) + enum CRFlags nNewFlags + 8 +sc/inc/document.hxx:2254 + void ScDocument::BroadcastCells(const class ScRange &,enum SfxHintId,_Bool) + enum SfxHintId nHint + 31 +sc/inc/dpsave.hxx:317 + class ScDPSaveDimension * ScDPSaveData::GetFirstDimension(enum com::sun::star::sheet::DataPilotFieldOrientation) + enum com::sun::star::sheet::DataPilotFieldOrientation eOrientation + 4 +sc/inc/externalrefmgr.hxx:796 + void ScExternalRefManager::purgeStaleSrcDocument(int) + int nTimeOut + 30000 +sc/inc/formulacell.hxx:376 + void ScFormulaCell::AddRecalcMode(enum ScRecalcMode) + enum ScRecalcMode + 4 +sc/inc/global.hxx:639 + void ScGlobal::AddQuotes(class rtl::OUString &,char16_t,_Bool) + char16_t cQuote + 34 +sc/inc/global.hxx:662 + const char16_t * ScGlobal::FindUnquoted(const char16_t *,char16_t) + char16_t cChar + 46 +sc/inc/nameuno.hxx:63 + void ScNamedRangeObj::Modify_Impl(const class rtl::OUString *,const class ScTokenArray *,const class rtl::OUString *,const class ScAddress *,const enum ScRangeData::Type *,const enum formula::FormulaGrammar::Grammar) + const enum formula::FormulaGrammar::Grammar eGrammar + 16908294 +sc/inc/optutil.hxx:43 + void ScLinkConfigItem::ScLinkConfigItem(const class rtl::OUString &,enum ConfigItemMode) + enum ConfigItemMode nMode + 2 +sc/inc/rangeutl.hxx:110 + int ScRangeStringConverter::GetTokenCount(const class rtl::OUString &,char16_t) + char16_t cSeparator + 32 +sc/inc/rangeutl.hxx:126 + _Bool ScRangeStringConverter::GetAddressFromString(class ScAddress &,const class rtl::OUString &,const class ScDocument &,enum formula::FormulaGrammar::AddressConvention,int &,char16_t,char16_t) + char16_t cSeparator + 32 +sc/inc/rangeutl.hxx:126 + _Bool ScRangeStringConverter::GetAddressFromString(class ScAddress &,const class rtl::OUString &,const class ScDocument &,enum formula::FormulaGrammar::AddressConvention,int &,char16_t,char16_t) + char16_t cQuote + 39 +sc/inc/rangeutl.hxx:142 + _Bool ScRangeStringConverter::GetRangeListFromString(class ScRangeList &,const class rtl::OUString &,const class ScDocument &,enum formula::FormulaGrammar::AddressConvention,char16_t,char16_t) + char16_t cQuote + 39 +sc/inc/rangeutl.hxx:150 + _Bool ScRangeStringConverter::GetAreaFromString(class ScArea &,const class rtl::OUString &,const class ScDocument &,enum formula::FormulaGrammar::AddressConvention,int &,char16_t) + char16_t cSeparator + 32 +sc/inc/rangeutl.hxx:159 + _Bool ScRangeStringConverter::GetRangeFromString(struct com::sun::star::table::CellRangeAddress &,const class rtl::OUString &,const class ScDocument &,enum formula::FormulaGrammar::AddressConvention,int &,char16_t) + char16_t cSeparator + 32 +sc/inc/rangeutl.hxx:184 + void ScRangeStringConverter::GetStringFromRangeList(class rtl::OUString &,const class ScRangeList *,const class ScDocument *,enum formula::FormulaGrammar::AddressConvention,char16_t) + char16_t cSeparator + 32 +sc/inc/rangeutl.hxx:191 + void ScRangeStringConverter::GetStringFromArea(class rtl::OUString &,const class ScArea &,const class ScDocument *,enum formula::FormulaGrammar::AddressConvention,char16_t,_Bool,enum ScRefFlags) + char16_t cSeparator + 32 +sc/inc/rangeutl.hxx:191 + void ScRangeStringConverter::GetStringFromArea(class rtl::OUString &,const class ScArea &,const class ScDocument *,enum formula::FormulaGrammar::AddressConvention,char16_t,_Bool,enum ScRefFlags) + enum ScRefFlags nFormatFlags + 32776 +sc/inc/rangeutl.hxx:201 + void ScRangeStringConverter::GetStringFromAddress(class rtl::OUString &,const struct com::sun::star::table::CellAddress &,const class ScDocument *,enum formula::FormulaGrammar::AddressConvention,char16_t,_Bool) + char16_t cSeparator + 32 +sc/inc/rangeutl.hxx:208 + void ScRangeStringConverter::GetStringFromRange(class rtl::OUString &,const struct com::sun::star::table::CellRangeAddress &,const class ScDocument *,enum formula::FormulaGrammar::AddressConvention,char16_t,_Bool,enum ScRefFlags) + enum ScRefFlags nFormatFlags + 32776 +sc/inc/rangeutl.hxx:216 + void ScRangeStringConverter::GetStringFromRangeList(class rtl::OUString &,const class com::sun::star::uno::Sequence &,const class ScDocument *,enum formula::FormulaGrammar::AddressConvention,char16_t) + char16_t cSeparator + 32 +sc/inc/scmod.hxx:241 + void ScModule::RegisterRefController(unsigned short,class std::shared_ptr &,class weld::Window *) + unsigned short nSlotId + 26161 +sc/inc/scmod.hxx:242 + void ScModule::UnregisterRefController(unsigned short,const class std::shared_ptr &) + unsigned short nSlotId + 26161 +sc/inc/scmod.hxx:243 + class std::shared_ptr ScModule::Find1RefWindow(unsigned short,const class weld::Window *) + unsigned short nSlotId + 26161 +sc/inc/simpleformulacalc.hxx:38 + void ScSimpleFormulaCalculator::ScSimpleFormulaCalculator(class ScDocument &,const class ScAddress &,const class rtl::OUString &,_Bool,enum formula::FormulaGrammar::Grammar) + enum formula::FormulaGrammar::Grammar eGram + 65539 +sc/inc/stlpool.hxx:53 + class ScStyleSheet * ScStyleSheetPool::FindCaseIns(const class rtl::OUString &,enum SfxStyleFamily) + enum SfxStyleFamily eFam + 2 +sc/inc/stringutil.hxx:150 + _Bool ScStringUtil::parseSimpleNumber(const char *,unsigned long,char,char,double &) + char dsep + 46 +sc/inc/stringutil.hxx:150 + _Bool ScStringUtil::parseSimpleNumber(const char *,unsigned long,char,char,double &) + char gsep + 44 +sc/inc/table.hxx:419 + void ScTable::SetFormula(short,int,const class ScTokenArray &,enum formula::FormulaGrammar::Grammar) + enum formula::FormulaGrammar::Grammar eGram + 65539 +sc/inc/table.hxx:682 + _Bool ScTable::HasAttribSelection(const class ScMarkData &,enum HasAttrFlags) const + enum HasAttrFlags nMask + 8 +sc/inc/tokenarray.hxx:261 + void ScTokenArray::WrapReference(const class ScAddress &,short,int) + short nMaxCol + 255 +sc/inc/tokenarray.hxx:261 + void ScTokenArray::WrapReference(const class ScAddress &,short,int) + int nMaxRow + 65535 +sc/inc/zforauto.hxx:38 + void ScNumFormatAbbrev::Save(class SvStream &,unsigned short) const + unsigned short eByteStrSet + 76 +sc/qa/extras/new_cond_format.cxx:375 + void testColorScaleEntries(const class com::sun::star::uno::Reference &,int,int,const class rtl::OUString &,class Color,int,const class rtl::OUString &,class Color,int,const class rtl::OUString &,class Color) + int nMediumType + 2 +sc/qa/extras/scpdfexport.cxx:54 + void ScPDFExportTest::setFont(class ScFieldEditEngine &,int,int,const class rtl::OUString &) + int nEnd + 4 +sc/qa/unit/filters-test.cxx:531 + void impl_testLegacyCellAnchoredRotatedShape(class ScDocument &,const class tools::Rectangle &,const class ScDrawObjData &,long) + long TOLERANCE + 30 +sc/qa/unit/parallelism.cxx:404 + void lcl_setupCommon(class ScDocument *,unsigned long,unsigned long) + unsigned long nNumRows + 1048 +sc/qa/unit/parallelism.cxx:404 + void lcl_setupCommon(class ScDocument *,unsigned long,unsigned long) + unsigned long nConstCellValue + 20 +sc/qa/unit/parallelism.cxx:534 + void lcl_setupMultipleFGColumn(class ScDocument *,unsigned long,unsigned long,unsigned long) + unsigned long nNumRowsInBlock + 200 +sc/qa/unit/parallelism.cxx:534 + void lcl_setupMultipleFGColumn(class ScDocument *,unsigned long,unsigned long,unsigned long) + unsigned long nNumFG + 50 +sc/qa/unit/parallelism.cxx:534 + void lcl_setupMultipleFGColumn(class ScDocument *,unsigned long,unsigned long,unsigned long) + unsigned long nOffset + 100 +sc/qa/unit/subsequent_export-test.cxx:212 + class std::unique_ptr ScExportTest::testTdf95640(class std::basic_string_view >,int,int) + int nDestFormat + 2 +sc/qa/unit/subsequent_export-test.cxx:1817 + _Bool ::isOverline(const struct editeng::Section &,enum FontLineStyle) + enum FontLineStyle eStyle + 2 +sc/qa/unit/subsequent_export-test.cxx:1824 + _Bool ::isUnderline(const struct editeng::Section &,enum FontLineStyle) + enum FontLineStyle eStyle + 2 +sc/qa/unit/ucalc.cxx:1198 + _Bool checkRelativeRefToken(class ScDocument &,const class ScAddress &,short,int) + short nRelCol + -1 +sc/qa/unit/ucalc.hxx:31 + void FormulaGrammarSwitch::FormulaGrammarSwitch(class ScDocument *,enum formula::FormulaGrammar::Grammar) + enum formula::FormulaGrammar::Grammar eGrammar + 17104900 +sc/qa/unit/ucalc.hxx:56 + void Test::pasteOneCellFromClip(class ScDocument *,const class ScRange &,class ScDocument *,enum InsertDeleteFlags) + enum InsertDeleteFlags eFlags + 2303 +sc/qa/unit/ucalc_formula.cxx:8496 + void (anonymous namespace)::ColumnTest::ColumnTest(class ScDocument *,int,int,int,int,int) + int nTotalRows + 330 +sc/qa/unit/ucalc_formula.cxx:8496 + void (anonymous namespace)::ColumnTest::ColumnTest(class ScDocument *,int,int,int,int,int) + int nStart1 + 9 +sc/qa/unit/ucalc_formula.cxx:8496 + void (anonymous namespace)::ColumnTest::ColumnTest(class ScDocument *,int,int,int,int,int) + int nEnd1 + 159 +sc/qa/unit/ucalc_formula.cxx:8496 + void (anonymous namespace)::ColumnTest::ColumnTest(class ScDocument *,int,int,int,int,int) + int nStart2 + 169 +sc/qa/unit/ucalc_formula.cxx:8496 + void (anonymous namespace)::ColumnTest::ColumnTest(class ScDocument *,int,int,int,int,int) + int nEnd2 + 319 +sc/source/core/data/documen8.cxx:512 + void (anonymous namespace)::IdleCalcTextWidthScope::incCol(short) + short nInc + -1 +sc/source/core/data/dpoutput.cxx:317 + void lcl_SetFrame(class ScDocument *,short,short,int,short,int,unsigned short) + unsigned short nWidth + 20 +sc/source/core/tool/compiler.cxx:1289 + void (anonymous namespace)::ConventionXL_A1::ConventionXL_A1(enum formula::FormulaGrammar::AddressConvention) + enum formula::FormulaGrammar::AddressConvention eConv + 4 +sc/source/core/tool/compiler.cxx:2051 + _Bool lcl_isUnicodeIgnoreAscii(const char16_t *,const char *,unsigned long) + unsigned long n + 4 +sc/source/core/tool/editutil.cxx:84 + class rtl::OUString lcl_GetDelimitedString(const class EditTextObject &,const char) + const char c + 10 +sc/source/core/tool/scmatrix.cxx:355 + unsigned long GetElementsMax(unsigned long) + unsigned long nMemory + 6442450944 +sc/source/filter/excel/xechart.cxx:134 + void lclSaveRecord(class XclExpStream &,const class rtl::Reference &,unsigned short,type-parameter-?-?) + unsigned short nRecId + 4129 +sc/source/filter/excel/xechart.cxx:144 + void lclSaveRecord(class XclExpStream &,type-parameter-?-? *,unsigned short,type-parameter-?-?) + unsigned short nRecId + 4124 +sc/source/filter/excel/xechart.cxx:561 + class rtl::Reference lclCreateLineFormat(const class XclExpChRoot &,const class ScfPropertySet &,enum XclChObjectType) + enum XclChObjectType eObjType + 9 +sc/source/filter/excel/xelink.cxx:297 + void (anonymous namespace)::XclExpSupbook::XclExpSupbook(const class XclExpRoot &,const class rtl::OUString &,enum XclSupbookType) + enum XclSupbookType + 5 +sc/source/filter/excel/xepage.cxx:376 + void (anonymous namespace)::XclExpXmlStartHeaderFooterElementRecord::XclExpXmlStartHeaderFooterElementRecord(const int,const _Bool) + const int nElement + 2614 +sc/source/filter/excel/xepivotxml.cxx:711 + void WriteGrabBagItemToStream(class XclExpXmlStream &,int,const class com::sun::star::uno::Any &) + int tokenId + 4010 +sc/source/filter/inc/addressconverter.hxx:489 + void oox::xls::AddressConverter::initializeMaxPos(short,int,int) + short nMaxXlsTab + 32767 +sc/source/filter/inc/addressconverter.hxx:489 + void oox::xls::AddressConverter::initializeMaxPos(short,int,int) + int nMaxXlsCol + 16383 +sc/source/filter/inc/addressconverter.hxx:489 + void oox::xls::AddressConverter::initializeMaxPos(short,int,int) + int nMaxXlsRow + 1048575 +sc/source/filter/inc/formulabase.hxx:276 + void oox::xls::ApiTokenVector::reserve(unsigned long) + unsigned long n + 8192 +sc/source/filter/inc/formulabase.hxx:772 + void oox::xls::FormulaProcessorBase::convertStringToStringList(class com::sun::star::uno::Sequence &,char16_t,_Bool) const + char16_t cStringSep + 44 +sc/source/filter/inc/ftools.hxx:48 + type-parameter-?-? llimit_cast(type-parameter-?-?,type-parameter-?-?) + type-parameter-?-? nMin + 8 +sc/source/filter/inc/pivottablebuffer.hxx:117 + void oox::xls::PivotTableField::PivotTableField(class oox::xls::PivotTable &,int) + int nFieldIndex + -2 +sc/source/filter/inc/tokstack.hxx:255 + _Bool TokenPool::IsSingleOp(const struct TokenId &,const enum OpCode) const + const enum OpCode eId + 13 +sc/source/filter/inc/unitconverter.hxx:70 + double oox::xls::UnitConverter::scaleValue(double,enum oox::xls::Unit,enum oox::xls::Unit) const + enum oox::xls::Unit eToUnit + 3 +sc/source/filter/inc/unitconverter.hxx:75 + double oox::xls::UnitConverter::scaleFromMm100(int,enum oox::xls::Unit) const + enum oox::xls::Unit eUnit + 6 +sc/source/filter/inc/xechart.hxx:196 + void XclExpChFutureRecordBase::XclExpChFutureRecordBase(const class XclExpChRoot &,enum XclFutureRecType,unsigned short,unsigned long) + unsigned short nRecId + 2155 +sc/source/filter/inc/xechart.hxx:196 + void XclExpChFutureRecordBase::XclExpChFutureRecordBase(const class XclExpChRoot &,enum XclFutureRecType,unsigned short,unsigned long) + unsigned long nRecSize + 4 +sc/source/filter/inc/xeescher.hxx:151 + void XclExpImgData::XclExpImgData(const class Graphic &,unsigned short) + unsigned short nRecId + 233 +sc/source/filter/inc/xeformula.hxx:63 + class std::shared_ptr XclExpFormulaCompiler::CreateFormula(enum XclFormulaType,const class ScAddress &) + enum XclFormulaType eType + 7 +sc/source/filter/inc/xeformula.hxx:69 + class std::shared_ptr XclExpFormulaCompiler::CreateFormula(enum XclFormulaType,const class ScRangeList &) + enum XclFormulaType eType + 5 +sc/source/filter/inc/xehelper.hxx:245 + class std::shared_ptr XclExpStringHelper::CreateString(const class XclExpRoot &,char16_t,enum XclStrFlags,unsigned short) + enum XclStrFlags nFlags + 2 +sc/source/filter/inc/xehelper.hxx:245 + class std::shared_ptr XclExpStringHelper::CreateString(const class XclExpRoot &,char16_t,enum XclStrFlags,unsigned short) + unsigned short nMaxLen + 32767 +sc/source/filter/inc/xelink.hxx:173 + unsigned short XclExpLinkManager::FindExtSheet(char16_t) + char16_t cCode + 4 +sc/source/filter/inc/xepivot.hxx:234 + void XclExpPTItem::XclExpPTItem(unsigned short,unsigned short) + unsigned short nCacheIdx + 65535 +sc/source/filter/inc/xepivot.hxx:336 + unsigned short XclExpPivotTable::GetDataFieldIndex(const class rtl::OUString &,unsigned short) const + unsigned short nDefaultIdx + 65535 +sc/source/filter/inc/xerecord.hxx:397 + void XclExpSubStream::XclExpSubStream(unsigned short) + unsigned short nSubStrmType + 32 +sc/source/filter/inc/xestream.hxx:300 + void XclExpXmlStream::WriteAttributes(int,type-parameter-?-? &&,type-parameter-?-? &&...) + ###26 + 4072 +sc/source/filter/inc/xestring.hxx:55 + void XclExpString::XclExpString(enum XclStrFlags,unsigned short) + unsigned short nMaxLen + 32767 +sc/source/filter/inc/xestyle.hxx:588 + unsigned int XclExpXFBuffer::InsertWithFont(const class ScPatternAttr *,short,unsigned short,_Bool) + short nScript + 4 +sc/source/filter/inc/xetable.hxx:80 + void XclExpRangeFmlaBase::XclExpRangeFmlaBase(unsigned short,unsigned int,const class ScRange &) + unsigned short nRecId + 545 +sc/source/filter/inc/xiescher.hxx:1197 + unsigned int XclImpDffPropSet::GetPropertyValue(unsigned short) const + unsigned short nPropId + 384 +sc/source/filter/inc/xiformula.hxx:40 + void XclImpFormulaCompiler::CreateRangeList(class ScRangeList &,enum XclFormulaType,const class XclTokenArray &,class XclImpStream &) + enum XclFormulaType eType + 7 +sc/source/filter/inc/xiformula.hxx:47 + class std::unique_ptr > XclImpFormulaCompiler::CreateFormula(enum XclFormulaType,const class XclTokenArray &) + enum XclFormulaType eType + 6 +sc/source/filter/inc/xipivot.hxx:223 + void XclImpPTField::XclImpPTField(const class XclImpPivotTable &,unsigned short) + unsigned short nCacheIdx + 65534 +sc/source/filter/inc/xlformula.hxx:517 + _Bool XclTokenArrayHelper::GetStringList(class rtl::OUString &,const class ScTokenArray &,char16_t) + char16_t cSep + 10 +sc/source/filter/inc/xlformula.hxx:525 + void XclTokenArrayHelper::ConvertStringToList(class ScTokenArray &,class svl::SharedStringPool &,char16_t) + char16_t cStringSep + 10 +sc/source/filter/xcl97/XclExpChangeTrack.cxx:1374 + void (anonymous namespace)::EndXmlElement::EndXmlElement(int) + int nElement + 2622 +sc/source/filter/xml/xmlfonte.cxx:41 + void (anonymous namespace)::ScXMLFontAutoStylePool_Impl::AddFontItems(const unsigned short *,unsigned char,const class SfxItemPool *,const _Bool) + unsigned char nIdCount + 3 +sc/source/filter/xml/xmlstyli.cxx:267 + void (anonymous namespace)::XMLTableCellPropsContext::XMLTableCellPropsContext(class SvXMLImport &,int,const class com::sun::star::uno::Reference &,unsigned int,class std::__debug::vector > &,const class rtl::Reference &) + unsigned int nFamily + 196608 +sc/source/ui/Accessibility/AccessibleCsvControl.cxx:218 + int lcl_ExpandSequence(class com::sun::star::uno::Sequence &,int) + int nExp + 7 +sc/source/ui/dbgui/pvfundlg.cxx:72 + _Bool lclFillListBox(class weld::ComboBox &,const class std::__debug::vector > &,int) + int nEmptyPos + 2 +sc/source/ui/inc/AccessibleCell.hxx:156 + void ScAccessibleCell::AddRelation(const class ScAddress &,const unsigned short,class utl::AccessibleRelationSetHelper *) + const unsigned short aRelationType + 4 +sc/source/ui/inc/AccessibleSpreadsheet.hxx:83 + _Bool ScAccessibleSpreadsheet::CalcScRangeListDifferenceMax(class ScRangeList *,class ScRangeList *,int,class std::__debug::vector > &) + int nMax + 10 +sc/source/ui/inc/content.hxx:150 + void ScContentTree::SelectEntryByName(const enum ScContentId,class std::basic_string_view >) + const enum ScContentId nRoot + 8 +sc/source/ui/inc/datatransformation.hxx:82 + void sc::SplitColumnTransformation::SplitColumnTransformation(short,char16_t) + short nCol + 2 +sc/source/ui/inc/datatransformation.hxx:82 + void sc::SplitColumnTransformation::SplitColumnTransformation(short,char16_t) + char16_t cSeparator + 44 +sc/source/ui/inc/datatransformation.hxx:148 + void sc::NumberTransformation::NumberTransformation(const class std::__debug::set, class std::allocator > &,const enum sc::NUMBER_TRANSFORM_TYPE,int) + int nPrecision + 4 +sc/source/ui/inc/docfunc.hxx:114 + _Bool ScDocFunc::SetCellText(const class ScAddress &,const class rtl::OUString &,_Bool,_Bool,_Bool,const enum formula::FormulaGrammar::Grammar) + const enum formula::FormulaGrammar::Grammar eGrammar + 16908294 +sc/source/ui/inc/imoptdlg.hxx:31 + void ScImportOptions::ScImportOptions(char16_t,char16_t,unsigned short) + char16_t nTextSep + 34 +sc/source/ui/inc/pvfundlg.hxx:44 + int ScDPFunctionListBox::get_height_rows(int) const + int nRows + 8 +sc/source/ui/inc/pvfundlg.hxx:45 + void ScDPFunctionListBox::set_size_request(int,int) + int nWidth + -1 +sc/source/ui/inc/select.hxx:33 + void ScViewSelectionEngine::ScViewSelectionEngine(class vcl::Window *,class ScTabView *,enum ScSplitPos) + enum ScSplitPos eSplitPos + 2 +sc/source/ui/inc/spellparam.hxx:46 + void ScConversionParam::ScConversionParam(enum ScConversionType,struct o3tl::strong_int,struct o3tl::strong_int,const class vcl::Font &,int,_Bool) + enum ScConversionType eConvType + 2 +sc/source/ui/inc/TableFillingAndNavigationTools.hxx:44 + void FormulaTemplate::applyRangeList(class std::basic_string_view >,const class ScRangeList &,char16_t) + char16_t cDelimiter + 59 +sc/source/ui/inc/tabview.hxx:425 + void ScTabView::MoveCursorPage(short,int,enum ScFollowMode,_Bool,_Bool) + enum ScFollowMode eMode + 2 +sc/source/ui/inc/tabview.hxx:427 + void ScTabView::MoveCursorArea(short,int,enum ScFollowMode,_Bool,_Bool) + enum ScFollowMode eMode + 3 +sc/source/ui/inc/uiitems.hxx:54 + void ScInputStatusItem::ScInputStatusItem(unsigned short,const class ScAddress &,const class ScAddress &,const class ScAddress &,const class rtl::OUString &,const class EditTextObject *) + unsigned short nWhich + 26100 +sc/source/ui/inc/uiitems.hxx:119 + void ScIndexHint::ScIndexHint(enum SfxHintId,unsigned short) + enum SfxHintId nNewId + 43 +sc/source/ui/inc/uiitems.hxx:130 + void ScSortItem::ScSortItem(unsigned short,class ScViewData *,const struct ScSortParam *) + unsigned short nWhich + 1102 +sc/source/ui/inc/uiitems.hxx:133 + void ScSortItem::ScSortItem(unsigned short,const struct ScSortParam *) + unsigned short nWhich + 1102 +sc/source/ui/inc/uiitems.hxx:151 + void ScQueryItem::ScQueryItem(unsigned short,class ScViewData *,const struct ScQueryParam *) + unsigned short nWhich + 1103 +sc/source/ui/inc/uiitems.hxx:250 + void ScSolveItem::ScSolveItem(unsigned short,const struct ScSolveParam *) + unsigned short nWhich + 1107 +sc/source/ui/inc/uiitems.hxx:265 + void ScTabOpItem::ScTabOpItem(unsigned short,const struct ScTabOpParam *) + unsigned short nWhich + 26345 +sc/source/ui/inc/viewdata.hxx:652 + _Bool ScViewData::SetLOKSheetFreezeIndex(const int,_Bool,short) + short nForTab + -1 +sc/source/ui/pagedlg/tptable.cxx:62 + _Bool lcl_PutScaleItem3(unsigned short,class SfxItemSet &,const class SfxItemSet &,const class weld::ComboBox &,unsigned short,const class weld::SpinButton &,unsigned short) + unsigned short nLBEntry + 2 +sc/source/ui/unoobj/cellsuno.cxx:1232 + _Bool lcl_PutFormulaArray(class ScDocShell &,const class ScRange &,const class com::sun::star::uno::Sequence > &,const enum formula::FormulaGrammar::Grammar) + const enum formula::FormulaGrammar::Grammar eGrammar + 16908294 +sc/source/ui/vba/vbarange.hxx:159 + class com::sun::star::uno::Reference ScVbaRange::getRangeObjectForName(const class com::sun::star::uno::Reference &,const class rtl::OUString &,class ScDocShell *,enum formula::FormulaGrammar::AddressConvention) + enum formula::FormulaGrammar::AddressConvention eConv + 3 +sc/source/ui/view/printfun.cxx:79 + unsigned short lcl_GetUShort(const class SfxItemSet *,unsigned short) + unsigned short nWhich + 176 +sc/source/ui/view/tabview.cxx:2500 + void (anonymous namespace)::ScRangeProvider::calculateDimensionBounds(const long,const long,_Bool,int &,int &,long &,long &,int,class ScViewData &) + int nEnlarge + 2 +sc/source/ui/view/viewfun3.cxx:832 + _Bool lcl_SelHasAttrib(const class ScDocument &,short,int,short,int,const class ScMarkData &,enum HasAttrFlags) + enum HasAttrFlags nMask + 4 +scaddins/source/analysis/analysishelper.hxx:95 + double ConvertToDec(const class rtl::OUString &,unsigned short,unsigned short) + unsigned short nCharLim + 10 +scaddins/source/analysis/analysishelper.hxx:98 + class rtl::OUString ConvertFromDec(double,double,double,unsigned short,int,int,_Bool) + int nMaxPlaces + 10 +scaddins/source/analysis/analysishelper.hxx:104 + class rtl::OUString GetString(double,_Bool,unsigned short) + unsigned short nMaxNumOfDigits + 15 +scaddins/source/analysis/analysishelper.hxx:537 + void sca::analysis::ConvertDataLinear::ConvertDataLinear(const char *,double,double,enum sca::analysis::ConvertDataClass,_Bool) + enum sca::analysis::ConvertDataClass eClass + 8 +sccomp/source/solver/DifferentialEvolution.hxx:48 + void DifferentialEvolutionAlgorithm::DifferentialEvolutionAlgorithm(type-parameter-?-? &,unsigned long) + unsigned long nPopulationSize + 50 +sccomp/source/solver/ParticelSwarmOptimization.hxx:67 + void ParticleSwarmOptimizationAlgorithm::ParticleSwarmOptimizationAlgorithm(type-parameter-?-? &,unsigned long) + unsigned long nNumOfParticles + 100 +sd/inc/Annotation.hxx:62 + void LOKCommentNotify(enum sd::CommentNotificationType,const class SfxViewShell *,const class com::sun::star::uno::Reference &) + enum sd::CommentNotificationType nType + 2 +sd/inc/CustomAnimationEffect.hxx:74 + void sd::CustomAnimationEffect::setPresetClassAndId(short,const class rtl::OUString &) + short nPresetClass + 4 +sd/inc/sdpage.hxx:347 + class SdStyleSheet * SdPage::getPresentationStyle(unsigned int) const + unsigned int nHelpId + 59865 +sd/qa/unit/tiledrendering/CallbackRecorder.hxx:20 + class std::__debug::vector > lcl_convertSeparated(const class rtl::OUString &,char16_t) + char16_t nSeparator + 59 +sd/qa/unit/tiledrendering/tiledrendering.cxx:260 + class std::__debug::vector > lcl_convertSeparated(const class rtl::OUString &,char16_t) + char16_t nSeparator + 59 +sd/source/core/sdpage.cxx:1208 + enum PresObjKind operator|(enum PresObjKind,int) + int x + 32768 +sd/source/filter/eppt/pptexanimations.hxx:83 + void ppt::AnimationExporter::exportAnimPropertyByte(class SvStream &,const unsigned short,const unsigned char) + const unsigned short nPropertyId + 13 +sd/source/ui/animations/STLPropertySet.hxx:61 + void sd::STLPropertySet::setPropertyState(int,enum sd::STLPropertyState) + enum sd::STLPropertyState nState + 3 +sd/source/ui/inc/animobjs.hxx:152 + void sd::AnimationControllerItem::AnimationControllerItem(unsigned short,class sd::AnimationWindow *,class SfxBindings *) + unsigned short + 27112 +sd/source/ui/inc/assclass.hxx:46 + void Assistent::Assistent(int) + int nNoOfPage + 6 +sd/source/ui/inc/assclass.hxx:48 + _Bool Assistent::IsEnabled(int) const + int nPage + 4 +sd/source/ui/inc/assclass.hxx:49 + void Assistent::EnablePage(int) + int nPage + 4 +sd/source/ui/inc/assclass.hxx:50 + void Assistent::DisablePage(int) + int nPage + 4 +sd/source/ui/inc/CustomAnimationList.hxx:109 + int sd::CustomAnimationList::get_height_rows(int) + int nRows + 8 +sd/source/ui/inc/navigatr.hxx:172 + void SdNavigatorControllerItem::SdNavigatorControllerItem(unsigned short,class SdNavigatorWin *,class SfxBindings *,const class std::function &) + unsigned short + 27288 +sd/source/ui/inc/navigatr.hxx:190 + void SdPageNameControllerItem::SdPageNameControllerItem(unsigned short,class SdNavigatorWin *,class SfxBindings *) + unsigned short + 27287 +sd/source/ui/inc/sdtreelb.hxx:193 + int SdPageObjsTLV::get_height_rows(int) const + int nRows + 12 +sd/source/ui/inc/smarttag.hxx:161 + void sd::SmartHdl::SmartHdl(const class rtl::Reference &,const class Point &,enum SdrHdlKind) + enum SdrHdlKind eNewKind + 23 +sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx:50 + class std::shared_ptr sd::tools::TimerBasedTaskExecution::Create(const class std::shared_ptr &,unsigned int,unsigned int) + unsigned int nMillisecondsBetweenSteps + 5 +sd/source/ui/inc/tools/TimerBasedTaskExecution.hxx:50 + class std::shared_ptr sd::tools::TimerBasedTaskExecution::Create(const class std::shared_ptr &,unsigned int,unsigned int) + unsigned int nMaxTimePerStep + 50 +sd/source/ui/inc/ViewShellManager.hxx:154 + class SfxShell * sd::ViewShellManager::GetShell(enum ToolbarId) const + enum ToolbarId nId + 23016 +sd/source/ui/remotecontrol/AvahiNetworkService.hxx:19 + void sd::AvahiNetworkService::AvahiNetworkService(const class std::__cxx11::basic_string, class std::allocator > &,unsigned int) + unsigned int aport + 1599 +sd/source/ui/remotecontrol/ImagePreparer.hxx:36 + class com::sun::star::uno::Sequence sd::ImagePreparer::preparePreview(unsigned int,unsigned int,unsigned int,unsigned long &) + unsigned int aWidth + 320 +sd/source/ui/remotecontrol/ImagePreparer.hxx:36 + class com::sun::star::uno::Sequence sd::ImagePreparer::preparePreview(unsigned int,unsigned int,unsigned int,unsigned long &) + unsigned int aHeight + 240 +sd/source/ui/sidebar/LayoutMenu.hxx:138 + class SfxRequest sd::sidebar::LayoutMenu::CreateRequest(unsigned short,enum AutoLayout) + unsigned short nSlotId + 27014 +sd/source/ui/slidesorter/controller/SlsSelectionFunction.cxx:109 + void sd::slidesorter::controller::SelectionFunction::EventDescriptor::EventDescriptor(unsigned int,const struct AcceptDropEvent &,const signed char,const class sd::slidesorter::SlideSorter &) + unsigned int nEventType + 2048 +sd/source/ui/slidesorter/inc/view/SlsPageObjectLayouter.hxx:135 + class tools::Rectangle sd::slidesorter::view::PageObjectLayouter::CalculatePreviewBoundingBox(class Size &,const class Size &,const int,const int) + const int nFocusIndicatorWidth + 3 +sd/source/ui/slidesorter/view/SlsLayeredDevice.hxx:61 + void sd::slidesorter::view::LayeredDevice::RemovePainter(const class std::shared_ptr &,const int) + const int nLayer + 2 +sd/source/ui/slidesorter/view/SlsLayouter.cxx:145 + int sd::slidesorter::view::Layouter::Implementation::ResolvePositionInGap(int,enum sd::slidesorter::view::Layouter::Implementation::GapMembership,int,int) + int nGap + 4 +sdext/source/minimizer/configurationaccess.hxx:90 + short ConfigurationAccess::GetConfigProperty(const enum PPPOptimizerTokenEnum,const short) const + const enum PPPOptimizerTokenEnum + 38 +sdext/source/minimizer/informationdialog.hxx:29 + class rtl::OUString InsertFixedText(class UnoDialog &,const class rtl::OUString &,const class rtl::OUString &,int,int,int,int,_Bool,short) + int nXPos + 35 +sdext/source/minimizer/informationdialog.hxx:29 + class rtl::OUString InsertFixedText(class UnoDialog &,const class rtl::OUString &,const class rtl::OUString &,int,int,int,int,_Bool,short) + int nYPos + 6 +sdext/source/minimizer/informationdialog.hxx:29 + class rtl::OUString InsertFixedText(class UnoDialog &,const class rtl::OUString &,const class rtl::OUString &,int,int,int,int,_Bool,short) + int nWidth + 199 +sdext/source/minimizer/informationdialog.hxx:29 + class rtl::OUString InsertFixedText(class UnoDialog &,const class rtl::OUString &,const class rtl::OUString &,int,int,int,int,_Bool,short) + int nHeight + 24 +sdext/source/minimizer/informationdialog.hxx:32 + class rtl::OUString InsertImage(class UnoDialog &,const class rtl::OUString &,const class rtl::OUString &,int,int,int,int,_Bool) + int nPosX + 5 +sdext/source/minimizer/informationdialog.hxx:32 + class rtl::OUString InsertImage(class UnoDialog &,const class rtl::OUString &,const class rtl::OUString &,int,int,int,int,_Bool) + int nPosY + 5 +sdext/source/minimizer/informationdialog.hxx:32 + class rtl::OUString InsertImage(class UnoDialog &,const class rtl::OUString &,const class rtl::OUString &,int,int,int,int,_Bool) + int nWidth + 25 +sdext/source/minimizer/informationdialog.hxx:32 + class rtl::OUString InsertImage(class UnoDialog &,const class rtl::OUString &,const class rtl::OUString &,int,int,int,int,_Bool) + int nHeight + 25 +sdext/source/minimizer/informationdialog.hxx:35 + class rtl::OUString InsertCheckBox(class UnoDialog &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,int,int,int,short) + int nXPos + 35 +sdext/source/minimizer/informationdialog.hxx:35 + class rtl::OUString InsertCheckBox(class UnoDialog &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,int,int,int,short) + int nYPos + 42 +sdext/source/minimizer/informationdialog.hxx:35 + class rtl::OUString InsertCheckBox(class UnoDialog &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,int,int,int,short) + int nWidth + 199 +sdext/source/minimizer/informationdialog.hxx:39 + class rtl::OUString InsertButton(class UnoDialog &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,int,int,int,short,const class rtl::OUString &) + int nXPos + 95 +sdext/source/minimizer/informationdialog.hxx:39 + class rtl::OUString InsertButton(class UnoDialog &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,int,int,int,short,const class rtl::OUString &) + int nWidth + 50 +sdext/source/minimizer/informationdialog.hxx:39 + class rtl::OUString InsertButton(class UnoDialog &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,int,int,int,short,const class rtl::OUString &) + short nTabIndex + 2 +sdext/source/minimizer/optimizerdialog.hxx:108 + void OptimizerDialog::EnablePage(short) + short nStep + 4 +sdext/source/minimizer/optimizerdialog.hxx:109 + void OptimizerDialog::DisablePage(short) + short nStep + 4 +sdext/source/minimizer/optimizerdialogcontrols.cxx:163 + class rtl::OUString InsertCheckBox(class OptimizerDialog &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,int,int,int,short) + int nXPos + 97 +sdext/source/minimizer/optimizerdialogcontrols.cxx:200 + class rtl::OUString InsertFormattedField(class OptimizerDialog &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,int,int,double,double,short) + int nXPos + 197 +sdext/source/minimizer/optimizerdialogcontrols.cxx:200 + class rtl::OUString InsertFormattedField(class OptimizerDialog &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,int,int,double,double,short) + int nYPos + 46 +sdext/source/minimizer/optimizerdialogcontrols.cxx:200 + class rtl::OUString InsertFormattedField(class OptimizerDialog &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const class com::sun::star::uno::Reference &,int,int,double,double,short) + double fEffectiveMax + 100 +sdext/source/minimizer/optimizerdialogcontrols.cxx:248 + class rtl::OUString InsertComboBox(class OptimizerDialog &,const class rtl::OUString &,const class com::sun::star::uno::Reference &,const _Bool,const class com::sun::star::uno::Sequence &,int,int,short) + int nXPos + 197 +sfx2/inc/SfxRedactionHelper.hxx:63 + class rtl::OUString SfxRedactionHelper::getStringParam(const class SfxRequest &,unsigned short) + unsigned short nParamId + 6734 +sfx2/source/dialog/filedlghelper.cxx:1917 + void SetToken(class rtl::OUString &,int,char16_t,const class rtl::OUString &) + char16_t cTok + 32 +sfx2/source/dialog/mgetempl.hxx:83 + _Bool SfxManageStyleSheetPage::Execute_Impl(unsigned short,const class rtl::OUString &,unsigned short) + unsigned short nId + 5550 +sfx2/source/doc/oleprops.cxx:100 + void (anonymous namespace)::SfxOleStringPropertyBase::SfxOleStringPropertyBase(int,int,const class SfxOleTextEncoding &) + int nPropType + 30 +sfx2/source/doc/oleprops.cxx:103 + void (anonymous namespace)::SfxOleStringPropertyBase::SfxOleStringPropertyBase(int,int,const class SfxOleTextEncoding &,const class rtl::OUString &) + int nPropType + 30 +sfx2/source/doc/oleprops.cxx:106 + void (anonymous namespace)::SfxOleStringPropertyBase::SfxOleStringPropertyBase(int,int,unsigned short) + int nPropType + 31 +sfx2/source/doc/oleprops.cxx:106 + void (anonymous namespace)::SfxOleStringPropertyBase::SfxOleStringPropertyBase(int,int,unsigned short) + unsigned short eTextEnc + 65535 +sfx2/source/doc/oleprops.hxx:306 + void SfxOleSection::SetThumbnailValue(int,const class com::sun::star::uno::Sequence &) + int nPropId + 17 +sfx2/source/doc/syspath.hxx:27 + _Bool GetUserTemplateLocation(char16_t *,int) + int nSize + 16000 +slideshow/source/engine/eventmultiplexer.cxx:107 + void slideshow::internal::ListenerOperations::pruneListeners(type-parameter-?-? &,unsigned long) + unsigned long nSizeThreshold + 16 +slideshow/source/engine/opengl/Operation.hxx:262 + class std::shared_ptr makeRotateAndScaleDepthByHeight(const struct glm::vec<3, float, glm::packed_highp> &,const struct glm::vec<3, float, glm::packed_highp> &,double,_Bool,_Bool,double,double) + double Angle + -120 +slideshow/source/engine/opengl/TransitionImpl.cxx:1825 + class std::shared_ptr makeVortexTransition(const class std::__debug::vector > &,const class std::__debug::vector > &,const struct TransitionSettings &,int,int) + int NX + 96 +slideshow/source/engine/opengl/TransitionImpl.cxx:1825 + class std::shared_ptr makeVortexTransition(const class std::__debug::vector > &,const class std::__debug::vector > &,const struct TransitionSettings &,int,int) + int NY + 96 +slideshow/source/engine/opengl/TransitionImpl.cxx:1939 + void createHexagon(class Primitive &,const int,const int,const int,const int) + const int NX + 80 +slideshow/source/engine/opengl/TransitionImpl.cxx:1939 + void createHexagon(class Primitive &,const int,const int,const int,const int) + const int NY + 106 +slideshow/source/engine/opengl/TransitionImpl.hxx:254 + class std::shared_ptr makeRevolvingCircles(unsigned short,unsigned short) + unsigned short nCircles + 8 +slideshow/source/engine/opengl/TransitionImpl.hxx:254 + class std::shared_ptr makeRevolvingCircles(unsigned short,unsigned short) + unsigned short nPointsOnCircles + 128 +slideshow/source/engine/opengl/TransitionImpl.hxx:255 + class std::shared_ptr makeHelix(unsigned short) + unsigned short nRows + 20 +slideshow/source/inc/box2dtools.hxx:257 + double box2d::utils::box2DWorld::stepAmount(const double,const float,const int,const int) + const int nVelocityIterations + 6 +slideshow/source/inc/box2dtools.hxx:257 + double box2d::utils::box2DWorld::stepAmount(const double,const float,const int,const int) + const int nPositionIterations + 2 +slideshow/source/inc/listenercontainer.hxx:103 + void slideshow::internal::ListenerOperations::pruneListeners(type-parameter-?-? &,unsigned long) + unsigned long + 16 +solenv/bin/concat-deps.c:443 + struct hash * hash_create(unsigned int) + unsigned int size + 4096 +sot/source/sdstor/stgdir.hxx:60 + void StgDirEntry::StgDirEntry(const void *,unsigned int,unsigned long,_Bool *) + unsigned int nBufferLen + 128 +sot/source/sdstor/stgstrms.hxx:80 + _Bool StgStrm::Copy(int,int) + int nFrom + -1 +sot/source/sdstor/stgstrms.hxx:141 + void StgSmallStrm::StgSmallStrm(class StgIo &,int) + int nBgn + -2 +starmath/inc/node.hxx:893 + void SmSpecialNode::SmSpecialNode(enum SmNodeType,const struct SmToken &,unsigned short) + unsigned short _nFontDesc + 7 +starmath/inc/node.hxx:1193 + void SmLineNode::SmLineNode(enum SmNodeType,const struct SmToken &) + enum SmNodeType eNodeType + 21 +starmath/inc/rect.hxx:172 + void SmRect::ExtendBy(const class SmRect &,enum RectCopyMBL,long) + enum RectCopyMBL eCopyMode + 2 +starmath/inc/view.hxx:135 + void SmGraphicController::SmGraphicController(class SmGraphicWindow &,unsigned short,class SfxBindings &) + unsigned short + 30357 +starmath/inc/view.hxx:146 + void SmEditController::SmEditController(class SmEditWindow &,unsigned short,class SfxBindings &) + unsigned short + 30356 +store/source/storbase.hxx:260 + void store::PageData::location(unsigned int) + unsigned int nAddr + -1 +store/source/stordir.cxx:46 + unsigned long convertTextToUnicode(void *,const char *,unsigned long,char16_t *,unsigned long) + unsigned long nDstLength + 255 +svl/source/items/itemset.cxx:1552 + unsigned short * AddRanges_Impl(unsigned short *,long,unsigned short) + unsigned short nIncr + 10 +svl/source/numbers/zforfind.hxx:394 + _Bool ImpSvNumberInputScan::IsDatePatternNumberOfType(unsigned short,char16_t) + char16_t cType + 89 +svl/source/numbers/zforscan.hxx:283 + _Bool ImpSvNumberformatScan::InsertSymbol(unsigned short &,enum svt::NfSymbolType,const class rtl::OUString &) + enum svt::NfSymbolType eType + -7 +svtools/inc/table/tablecontrol.hxx:125 + void svt::table::TableControl::commitCellEventIfAccessibleAlive(const short,const class com::sun::star::uno::Any &,const class com::sun::star::uno::Any &) + const short i_eventID + 4 +svtools/inc/table/tablecontrolinterface.hxx:218 + void svt::table::ITableControl::showTracking(const class tools::Rectangle &,const enum ShowTrackFlags) + const enum ShowTrackFlags i_flags + 4099 +svtools/source/dialogs/ServerDetailsControls.hxx:73 + void HostDetailsContainer::HostDetailsContainer(class PlaceEditDialog *,unsigned short,const class rtl::OUString &) + unsigned short nPort + 80 +svtools/source/misc/sampletext.cxx:567 + class rtl::OUString makeMinimalTextForScript(enum UScriptCode) + enum UScriptCode eScript + 19 +svtools/source/svhtml/htmlout.cxx:394 + unsigned long lcl_FlushContext(struct HTMLOutContext &,char *,unsigned int) + unsigned int nFlags + 6161 +svtools/source/svrtf/rtfout.cxx:29 + class SvStream & Out_Hex(class SvStream &,unsigned long,unsigned char) + unsigned char nLen + 2 +svtools/source/table/tablecontrol_impl.hxx:241 + void svt::table::TableControl_Impl::commitAccessibleEvent(const short) + const short i_eventID + 9 +svx/inc/AccessibleTableShape.hxx:121 + _Bool accessibility::AccessibleTableShape::ResetStateDirectly(short) + short aState + 11 +svx/inc/sxmoitm.hxx:30 + void SdrMeasureOverhangItem::SdrMeasureOverhangItem(long) + long nVal + 600 +svx/inc/xpolyimp.hxx:41 + void ImpXPolygon::ImpXPolygon(unsigned short,unsigned short) + unsigned short nResize + 16 +svx/qa/unit/customshapes.cxx:100 + void lcl_AssertRectEqualWithTolerance(class std::basic_string_view >,const class tools::Rectangle &,const class tools::Rectangle &,const int) + const int nTolerance + 3 +svx/source/dialog/fntctrl.cxx:495 + void SetPrevFontEscapement(class SvxFont &,unsigned char,unsigned char,short) + unsigned char nProp + 100 +svx/source/inc/AccessibleFrameSelector.hxx:111 + void svx::a11y::AccFrameSelectorChild::NotifyAccessibleEvent(const short,const class com::sun::star::uno::Any &,const class com::sun::star::uno::Any &) + const short _nEventId + 4 +svx/source/inc/charmapacc.hxx:209 + void svx::SvxShowCharSetItemAcc::fireEvent(const short,const class com::sun::star::uno::Any &,const class com::sun::star::uno::Any &) + const short _nEventId + 4 +svx/source/inc/fmcontrolbordermanager.hxx:70 + void svxform::UnderlineDescriptor::UnderlineDescriptor(short,class Color) + short _nUnderlineType + 10 +svx/source/inc/fmshimp.hxx:467 + void FmXFormShell::UpdateSlot_Lock(short) + short nId + 10636 +svx/source/inc/GraphCtlAccessibleContext.hxx:157 + void SvxGraphCtrlAccessibleContext::CommitChange(short,const class com::sun::star::uno::Any &,const class com::sun::star::uno::Any &) + short aEventId + 7 +svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx:68 + void textconversiondlgs::DictionaryList::set_size_request(int,int) + int nWidth + -1 +svx/source/unodialogs/textconversiondlgs/chinese_dictionarydialog.hxx:78 + int textconversiondlgs::DictionaryList::get_height_rows(int) const + int nRows + 8 +sw/inc/authfld.hxx:131 + void SwAuthorityFieldType::SetSortKeys(unsigned short,const struct SwTOXSortKey *) + unsigned short nKeyCount + 3 +sw/inc/crsrsh.hxx:824 + void SwCursorShell::FireSectionChangeEvent(unsigned short,unsigned short) + unsigned short nOldSection + 2 +sw/inc/crsrsh.hxx:825 + void SwCursorShell::FireColumnChangeEvent(unsigned short,unsigned short) + unsigned short nOldColumn + 2 +sw/inc/docary.hxx:295 + _Bool SwExtraRedlineTable::DeleteAllTableRedlines(class SwDoc &,const class SwTable &,_Bool,enum RedlineType) + enum RedlineType nRedlineTypeToDelete + 65535 +sw/inc/docary.hxx:296 + _Bool SwExtraRedlineTable::DeleteTableRowRedline(class SwDoc *,const class SwTableLine &,_Bool,enum RedlineType) + enum RedlineType nRedlineTypeToDelete + 65535 +sw/inc/docary.hxx:297 + _Bool SwExtraRedlineTable::DeleteTableCellRedline(class SwDoc *,const class SwTableBox &,_Bool,enum RedlineType) + enum RedlineType nRedlineTypeToDelete + 65535 +sw/inc/editsh.hxx:162 + void SwEditShell::Insert(char16_t,_Bool) + char16_t + 32 +sw/inc/editsh.hxx:239 + class std::__debug::vector > >, class std::allocator > > > > SwEditShell::GetItemWithPaM(unsigned short) + unsigned short nWhich + 8 +sw/inc/fesh.hxx:532 + _Bool SwFEShell::BeginCreate(enum SdrObjKind,enum SdrInventor,const class Point &) + enum SdrInventor eObjInventor + 825249094 +sw/inc/fmtcol.hxx:74 + void SwTextFormatColl::SwTextFormatColl(class SwAttrPool &,const char *,class SwTextFormatColl *,unsigned short) + unsigned short nFormatWh + 157 +sw/inc/fmteiro.hxx:32 + void SwFormatEditInReadonly::SwFormatEditInReadonly(unsigned short,_Bool) + unsigned short nId + 112 +sw/inc/frmfmt.hxx:86 + void SwFrameFormat::SwFrameFormat(class SwAttrPool &,const char *,class SwFrameFormat *,unsigned short,const unsigned short *) + unsigned short nFormatWhich + 155 +sw/inc/IDocumentMarkAccess.hxx:346 + class sw::mark::IMark * IDocumentMarkAccess::makeAnnotationBookmark(const class SwPaM &,const class rtl::OUString &,enum IDocumentMarkAccess::MarkType,enum sw::mark::InsertMode,const struct SwPosition *) + enum IDocumentMarkAccess::MarkType eMark + 2 +sw/inc/IDocumentRedlineAccess.hxx:164 + _Bool IDocumentRedlineAccess::DeleteRedline(const class SwStartNode &,_Bool,enum RedlineType) + enum RedlineType nDelType + 65535 +sw/inc/ndtxt.hxx:160 + void SwTextNode::SetLanguageAndFont(const class SwPaM &,struct o3tl::strong_int,unsigned short,const class vcl::Font *,unsigned short) + unsigned short nLangWhichId + 24 +sw/inc/ndtxt.hxx:160 + void SwTextNode::SetLanguageAndFont(const class SwPaM &,struct o3tl::strong_int,unsigned short,const class vcl::Font *,unsigned short) + unsigned short nFontWhichId + 22 +sw/inc/swfltopt.hxx:31 + void SwFilterOptions::SwFilterOptions(unsigned short,const char **,unsigned long *) + unsigned short nCnt + 13 +sw/inc/tblafmt.hxx:249 + _Bool SwTableAutoFormat::Save(class SvStream &,unsigned short) const + unsigned short fileVersion + 5050 +sw/inc/unostyle.hxx:97 + void sw::ICoreFrameStyle::SetItem(unsigned short,const class SfxPoolItem &) + unsigned short eAtr + 108 +sw/inc/unostyle.hxx:98 + const class SfxPoolItem * sw::ICoreFrameStyle::GetItem(unsigned short) + unsigned short eAtr + 108 +sw/inc/unotextcursor.hxx:86 + void SwXTextCursor::SwXTextCursor(const class com::sun::star::uno::Reference &,const class SwPaM &,const enum CursorType) + const enum CursorType eType + 7 +sw/qa/core/Test-BigPtrArray.cxx:55 + void fillBigPtrArray(class BigPtrArray &,unsigned long) + unsigned long numEntries + 10 +sw/source/core/access/accmap.cxx:419 + void SwAccessibleEvent_Impl::SwAccessibleEvent_Impl(enum SwAccessibleEvent_Impl::EventType,const class sw::access::SwAccessibleChild &) + enum SwAccessibleEvent_Impl::EventType eT + 5 +sw/source/core/access/accmap.cxx:430 + void SwAccessibleEvent_Impl::SwAccessibleEvent_Impl(enum SwAccessibleEvent_Impl::EventType) + enum SwAccessibleEvent_Impl::EventType eT + 4 +sw/source/core/access/accmap.cxx:469 + void SwAccessibleEvent_Impl::SwAccessibleEvent_Impl(enum SwAccessibleEvent_Impl::EventType,const class SwFrame *,const class sw::access::SwAccessibleChild &,const class SwRect &) + enum SwAccessibleEvent_Impl::EventType eT + 3 +sw/source/core/crsr/bookmark.cxx:160 + void lcl_SetFieldMarks(class sw::mark::Fieldmark &,class SwDoc &,const char16_t,const char16_t,const struct SwPosition *const) + const char16_t aStartMark + 7 +sw/source/core/crsr/bookmark.cxx:216 + void lcl_RemoveFieldMarks(const class sw::mark::Fieldmark &,class SwDoc &,const char16_t,const char16_t) + const char16_t aStartMark + 7 +sw/source/core/doc/doclay.cxx:96 + _Bool lcl_IsItemSet(const class SwContentNode &,unsigned short) + unsigned short which + 64 +sw/source/core/doc/docredln.cxx:300 + void lcl_LOKInvalidateFrames(const class sw::BroadcastingModify &,const class SwRootFrame *,const enum SwFrameType,const class Point *) + const enum SwFrameType nFrameType + 49152 +sw/source/core/doc/DocumentStylePoolManager.cxx:121 + void lcl_SetDfltFont(enum DefaultFontType,class SfxItemSet &) + enum DefaultFontType nFntType + 4 +sw/source/core/doc/DocumentStylePoolManager.cxx:144 + void lcl_SetDfltFont(enum DefaultFontType,enum DefaultFontType,enum DefaultFontType,class SfxItemSet &) + enum DefaultFontType nLatinFntType + 2000 +sw/source/core/doc/DocumentStylePoolManager.cxx:144 + void lcl_SetDfltFont(enum DefaultFontType,enum DefaultFontType,enum DefaultFontType,class SfxItemSet &) + enum DefaultFontType nCJKFntType + 3000 +sw/source/core/doc/DocumentStylePoolManager.cxx:144 + void lcl_SetDfltFont(enum DefaultFontType,enum DefaultFontType,enum DefaultFontType,class SfxItemSet &) + enum DefaultFontType nCTLFntType + 4000 +sw/source/core/doc/SwStyleNameMapper.cxx:90 + class std::__debug::unordered_map, struct std::equal_to, class std::allocator > > HashFromRange(unsigned short,unsigned short,unsigned short,const class std::__debug::vector > &(*)(void),type-parameter-?-?...) + ###16 + 12288 +sw/source/core/doc/SwStyleNameMapper.cxx:90 + class std::__debug::unordered_map, struct std::equal_to, class std::allocator > > HashFromRange(unsigned short,unsigned short,unsigned short,const class std::__debug::vector > &(*)(void),type-parameter-?-?...) + ###17 + 12293 +sw/source/core/doc/tblafmt.cxx:179 + void SwAfVersions::Write(class SvStream &,unsigned short) + unsigned short fileVersion + 5050 +sw/source/core/inc/swcache.hxx:113 + void SwCache::DecreaseMax(const unsigned short) + const unsigned short nSub + 100 +sw/source/core/inc/txtfrm.hxx:496 + long SwTextFrame::GrowTst(const long) + const long nGrow + 9223372036854775807 +sw/source/core/inc/UndoAttribute.hxx:72 + void SwUndoResetAttr::SwUndoResetAttr(const struct SwPosition &,unsigned short) + unsigned short nFormatId + 47 +sw/source/core/inc/UndoCore.hxx:250 + class rtl::OUString ShortenString(const class rtl::OUString &,int,const class rtl::OUString &) + int nLength + 20 +sw/source/core/inc/UndoNumbering.hxx:39 + void SwUndoInsNum::SwUndoInsNum(const class SwNumRule &,const class SwNumRule &,const class SwDoc &,enum SwUndoId) + enum SwUndoId nUndoId + 10 +sw/source/core/layout/dbg_lay.cxx:493 + void lcl_Padded(class rtl::OStringBuffer &,const long,unsigned long) + unsigned long length + 5 +sw/source/core/layout/objectformattertxtfrm.hxx:96 + class SwAnchoredObject * SwObjectFormatterTextFrame::GetFirstObjWithMovedFwdAnchor(const short,unsigned int &,_Bool &) + const short _nWrapInfluenceOnPosition + 2 +sw/source/core/txtnode/txtedt.cxx:180 + _Bool lcl_MaskRedlinesAndHiddenText(const class SwTextNode &,class rtl::OUStringBuffer &,int,int,const char16_t) + const char16_t cChar + 65529 +sw/source/core/undo/untbl.cxx:2174 + void (anonymous namespace)::RedlineFlagsInternGuard::RedlineFlagsInternGuard(class SwDoc &,enum RedlineFlags,enum RedlineFlags) + enum RedlineFlags eRedlineFlagsMask + 2 +sw/source/filter/html/htmlatr.cxx:1149 + _Bool (anonymous namespace)::HTMLEndPosLst::IsHTMLMode(unsigned long) const + unsigned long nMode + 32 +sw/source/filter/html/svxcss1.hxx:159 + void SvxCSS1PropertyInfo::SetBoxItem(class SfxItemSet &,unsigned short,const class SvxBoxItem *) + unsigned short nMinBorderDist + 28 +sw/source/filter/html/swhtml.hxx:639 + void SwHTMLParser::NewStdAttr(enum HtmlTokenId) + enum HtmlTokenId nToken + 414 +sw/source/filter/inc/fltshell.hxx:174 + class SfxPoolItem * SwFltControlStack::GetFormatStackAttr(unsigned short,unsigned short *) + unsigned short nWhich + 6 +sw/source/filter/inc/fltshell.hxx:175 + const class SfxPoolItem * SwFltControlStack::GetOpenStackAttr(const struct SwPosition &,unsigned short) + unsigned short nWhich + 14 +sw/source/filter/ww8/docxattributeoutput.cxx:3766 + class rtl::OString lcl_padStartToLength(const class rtl::OString &,int,char) + int nLen + 4 +sw/source/filter/ww8/docxattributeoutput.cxx:3766 + class rtl::OString lcl_padStartToLength(const class rtl::OString &,int,char) + char cFill + 48 +sw/source/filter/ww8/docxexport.hxx:192 + void DocxExport::WriteOutliner(const class OutlinerParaObject &,unsigned char) + unsigned char nTyp + 5 +sw/source/filter/ww8/escher.hxx:124 + void SwBasicEscherEx::WriteEmptyFlyFrame(const class SwFrameFormat &,unsigned int) + unsigned int nShapeId + 1025 +sw/source/filter/ww8/writerhelper.hxx:473 + const type-parameter-?-? * HasItem(const class std::__debug::map > > &,unsigned short) + unsigned short eType + 52 +sw/source/filter/ww8/wrtww8.hxx:1359 + void WW8_WrPlcField::WW8_WrPlcField(unsigned short,unsigned char) + unsigned short nStructSz + 2 +sw/source/filter/ww8/wrtww8.hxx:1416 + void SwWW8WrGrf::WritePICBulletFHeader(class SvStream &,const class Graphic &,unsigned short,unsigned short,unsigned short) + unsigned short mm + 100 +sw/source/filter/ww8/wrtww8.hxx:1529 + void SwWW8AttrIter::handleToggleProperty(class SfxItemSet &,const class SwFormatCharFormat *,unsigned short,const class SfxPoolItem *) + unsigned short nWhich + 15 +sw/source/filter/ww8/ww8glsy.hxx:63 + void WW8Glossary::WW8Glossary(class tools::SvRef &,unsigned char,class SotStorage *) + unsigned char nVersion + 8 +sw/source/filter/ww8/ww8par.hxx:1600 + class std::unique_ptr > SwWW8ImplReader::ImportAsOutliner(class rtl::OUString &,int,int,enum ManTypes) + enum ManTypes eType + 4 +sw/source/filter/ww8/ww8scan.cxx:7193 + _Bool readS16(const unsigned char *,unsigned long,const unsigned char *,short *) + unsigned long offset + 2 +sw/source/filter/ww8/ww8scan.hxx:996 + struct SprmResult WW8PLCFMan::HasCharSprm(unsigned short) const + unsigned short nId + 2138 +sw/source/filter/ww8/ww8scan.hxx:1535 + void WW8Fib::WW8Fib(unsigned char,_Bool) + unsigned char nVersion + 8 +sw/source/filter/xml/xmlbrshi.hxx:58 + void SwXMLBrushItemImportContext::SwXMLBrushItemImportContext(class SvXMLImport &,int,const class com::sun::star::uno::Reference &,const class SvXMLUnitConverter &,unsigned short) + unsigned short nWhich + 105 +sw/source/uibase/inc/frmmgr.hxx:121 + void SwFlyFrameAttrMgr::DelAttr(unsigned short) + unsigned short nId + 89 +sw/source/uibase/inc/mailmergehelper.hxx:99 + void SwAddressPreview::SetLayout(unsigned short,unsigned short) + unsigned short nColumns + 2 +sw/source/uibase/inc/numpara.hxx:61 + _Bool SwParagraphNumTabPage::ExecuteEditNumStyle_Impl(unsigned short,const class rtl::OUString &,enum SfxStyleFamily) + unsigned short nId + 5550 +sw/source/uibase/inc/numpara.hxx:61 + _Bool SwParagraphNumTabPage::ExecuteEditNumStyle_Impl(unsigned short,const class rtl::OUString &,enum SfxStyleFamily) + enum SfxStyleFamily nFamily + 16 +sw/source/uibase/inc/prcntfld.hxx:66 + void SwPercentField::set_min(int,enum FieldUnit) + enum FieldUnit eInUnit + 5 +sw/source/uibase/inc/prcntfld.hxx:67 + void SwPercentField::set_max(int,enum FieldUnit) + enum FieldUnit eInUnit + 5 +sw/source/uibase/inc/swuipardlg.hxx:34 + void SwParaDlg::SwParaDlg(class weld::Window *,class SwView &,const class SfxItemSet &,unsigned char,const class rtl::OUString *,_Bool,const class rtl::OString &) + unsigned char nDialogMode + 2 +toolkit/inc/helper/btndlg.hxx:61 + void ButtonDialog::RemoveButton(unsigned short) + unsigned short nId + 10 +toolkit/inc/helper/btndlg.hxx:64 + void ButtonDialog::ButtonDialog(enum WindowType) + enum WindowType nType + 304 +toolkit/source/awt/vclxspinbutton.cxx:40 + void lcl_modifyStyle(class vcl::Window *,long,_Bool) + long _nStyleBits + 4096 +toolkit/source/awt/vclxwindows.cxx:6548 + void lcl_setWinBits(class vcl::Window *,long,_Bool) + long _nBits + 68719476736 +tools/source/stream/strmunx.cxx:104 + class ErrCode GetSvError(int) + int nErrno + 21 +ucbhelper/source/provider/resultset.cxx:100 + void ucbhelper_impl::(anonymous namespace)::PropertySetInfo::PropertySetInfo(const struct ucbhelper_impl::(anonymous namespace)::PropertyInfo *,int) + int nProps + 2 +unotools/source/config/useroptions.cxx:98 + _Bool SvtUserOptions::Impl::GetBoolValue(enum UserOptToken) const + enum UserOptToken nToken + 19 +unotools/source/misc/datetime.cxx:72 + _Bool convertNumber64(long &,const class rtl::OUString &,long,long) + long + -1 +vcl/backendtest/outputdevice/rectangle.cxx:23 + void drawInvertOffset(class OutputDevice &,const class tools::Rectangle &,int,enum InvertFlags) + int nOffset + 2 +vcl/inc/driverblocklist.hxx:156 + unsigned long OpenGLVersion(unsigned int,unsigned int,unsigned int,unsigned int) + unsigned int a + 10 +vcl/inc/driverblocklist.hxx:156 + unsigned long OpenGLVersion(unsigned int,unsigned int,unsigned int,unsigned int) + unsigned int b + 20 +vcl/inc/driverblocklist.hxx:156 + unsigned long OpenGLVersion(unsigned int,unsigned int,unsigned int,unsigned int) + unsigned int c + 30 +vcl/inc/driverblocklist.hxx:156 + unsigned long OpenGLVersion(unsigned int,unsigned int,unsigned int,unsigned int) + unsigned int d + 40 +vcl/inc/FileDefinitionWidgetDraw.hxx:61 + void vcl::FileDefinitionWidgetDraw::drawPolyLine(class SalGraphics &,const class basegfx::B2DHomMatrix &,const class basegfx::B2DPolygon &,double,double,const class std::__debug::vector > *,enum basegfx::B2DLineJoin,enum com::sun::star::drawing::LineCap,double,_Bool) + enum basegfx::B2DLineJoin i_eLineJoin + 4 +vcl/inc/fontsubset.hxx:54 + void FontSubsetInfo::LoadFont(enum FontType,const unsigned char *,int) + enum FontType eInFontType + 32 +vcl/inc/headless/svpgdi.hxx:253 + void SvpSalGraphics::drawBitmap(const struct SalTwoRect &,const struct BitmapBuffer *,enum _cairo_operator) + enum _cairo_operator eOp + 2 +vcl/inc/listbox.hxx:486 + void ImplListBox::SetMRUEntries(const class rtl::OUString &,char16_t) + char16_t cSep + 59 +vcl/inc/listbox.hxx:487 + class rtl::OUString ImplListBox::GetMRUEntries(char16_t) const + char16_t cSep + 59 +vcl/inc/skia/utils.hxx:46 + class sk_sp createSkSurface(const class Size &,enum SkColorType,enum SkAlphaType) + enum SkAlphaType alpha + 2 +vcl/inc/test/outputdevice.hxx:77 + void vcl::test::OutputDeviceTestCommon::createDiamondPoints(class tools::Rectangle,int,class Point &,class Point &,class Point &,class Point &) + int nOffset + 4 +vcl/inc/unx/gendisp.hxx:44 + void SalGenericDisplay::CancelInternalEvent(class SalFrame *,void *,enum SalEvent) + enum SalEvent nEvent + 21 +vcl/inc/unx/saldata.hxx:47 + void X11SalData::X11SalData(enum GenericUnixSalDataType,class SalInstance *) + enum GenericUnixSalDataType t + 3 +vcl/inc/unx/x11/xrender_peer.hxx:51 + void XRenderPeer::ChangePicture(unsigned long,unsigned long,const struct _XRenderPictureAttributes *) const + unsigned long nValueMask + 64 +vcl/inc/unx/x11/xrender_peer.hxx:54 + void XRenderPeer::CompositePicture(int,unsigned long,unsigned long,unsigned long,int,int,int,int,unsigned int,unsigned int) const + int nOp + 3 +vcl/inc/unx/x11/xrender_peer.hxx:61 + void XRenderPeer::CompositeTrapezoids(int,unsigned long,unsigned long,const XRenderPictFormat *,int,int,const struct _XTrapezoid *,int) const + int nOp + 3 +vcl/inc/unx/x11/xrender_peer.hxx:64 + void XRenderPeer::CompositeTriangles(int,unsigned long,unsigned long,const XRenderPictFormat *,int,int,const struct _XTriangle *,int) const + int nOp + 3 +vcl/inc/WidgetDrawInterface.hxx:47 + _Bool vcl::WidgetDrawInterface::hitTestNativeControl(enum ControlType,enum ControlPart,const class tools::Rectangle &,const class Point &,_Bool &) + enum ControlType eType + 60 +vcl/inc/wizdlg.hxx:88 + long vcl::RoadmapWizard::LogicalCoordinateToPixel(int) + int iCoordinate + 6 +vcl/inc/wizdlg.hxx:288 + void vcl::RoadmapWizard::implConstruct(const enum WizardButtonFlags) + const enum WizardButtonFlags _nButtonFlags + 31 +vcl/qa/cppunit/BitmapScaleTest.cxx:74 + void assertColorsAreSimilar(int,int,const class BitmapColor &,const class BitmapColor &) + int maxDifference + 2 +vcl/qa/cppunit/jpeg/JpegReaderTest.cxx:54 + _Bool checkRect(class Bitmap &,int,long,long,class Color,int) + long nAreaHeight + 8 +vcl/qa/cppunit/jpeg/JpegReaderTest.cxx:54 + _Bool checkRect(class Bitmap &,int,long,long,class Color,int) + long nAreaWidth + 8 +vcl/qa/cppunit/timer.cxx:37 + void (anonymous namespace)::WatchDog::WatchDog(int) + int nSeconds + 120 +vcl/qa/cppunit/timer.cxx:343 + void (anonymous namespace)::YieldTimer::YieldTimer(unsigned long) + unsigned long nMS + 5 +vcl/qa/cppunit/timer.cxx:373 + void (anonymous namespace)::SlowCallbackTimer::SlowCallbackTimer(unsigned long,_Bool &) + unsigned long nMS + 250 +vcl/source/filter/eps/eps.cxx:92 + enum (anonymous namespace)::NMode operator|(enum (anonymous namespace)::NMode,enum (anonymous namespace)::NMode) + enum (anonymous namespace)::NMode b + 4 +vcl/source/filter/eps/eps.cxx:187 + void (anonymous namespace)::PSWriter::ImplCurveTo(const class Point &,const class Point &,const class Point &,enum (anonymous namespace)::NMode) + enum (anonymous namespace)::NMode nMode + 4 +vcl/source/filter/idxf/dxf2mtf.hxx:111 + _Bool DXF2GDIMetaFile::Convert(const class DXFRepresentation &,class GDIMetaFile &,unsigned short,unsigned short) + unsigned short nMinPercent + 60 +vcl/source/filter/idxf/dxf2mtf.hxx:111 + _Bool DXF2GDIMetaFile::Convert(const class DXFRepresentation &,class GDIMetaFile &,unsigned short,unsigned short) + unsigned short nMaxPercent + 100 +vcl/source/filter/jpeg/JpegReader.cxx:55 + long StreamRead(class SvStream *,void *,long) + long nBufferSize + 4096 +vcl/source/filter/wmf/emfwr.hxx:57 + void EMFWriter::ImplBeginCommentRecord(int) + int nCommentType + 726027589 +vcl/source/filter/wmf/wmfwr.hxx:144 + void WMFWriter::WMFRecord_Escape(unsigned int,unsigned int,const signed char *) + unsigned int nEsc + 2 +vcl/source/fontsubset/ttcr.hxx:61 + void TrueTypeCreatorNewEmpty(unsigned int,struct vcl::TrueTypeCreator **) + unsigned int tag + 1953658213 +vcl/source/fontsubset/ttcr.hxx:174 + struct vcl::TrueTypeTable * TrueTypeTableNew_post(int,int,short,short,unsigned int) + int format + 196608 +vcl/source/fontsubset/ttcr.hxx:185 + void cmapAdd(struct vcl::TrueTypeTable *,unsigned int,unsigned int,unsigned int) + unsigned int id + 65536 +vcl/source/gdi/pdfwriter_impl.hxx:1021 + _Bool vcl::PDFWriterImpl::computeODictionaryValue(const unsigned char *,const unsigned char *,class std::__debug::vector > &,int) + int i_nKeyLength + 16 +vcl/source/gdi/pdfwriter_impl.hxx:1069 + void vcl::PDFWriterImpl::insertError(enum vcl::PDFWriter::ErrorCode) + enum vcl::PDFWriter::ErrorCode eErr + 3 +vcl/source/graphic/GraphicObject.cxx:134 + void lclImplAdjust(class BitmapEx &,const class GraphicAttr &,enum GraphicAdjustmentFlags) + enum GraphicAdjustmentFlags nAdjustmentFlags + 31 +vcl/source/graphic/GraphicObject.cxx:185 + void lclImplAdjust(class GDIMetaFile &,const class GraphicAttr &,enum GraphicAdjustmentFlags) + enum GraphicAdjustmentFlags nAdjustmentFlags + 31 +vcl/source/graphic/GraphicObject.cxx:236 + void lclImplAdjust(class Animation &,const class GraphicAttr &,enum GraphicAdjustmentFlags) + enum GraphicAdjustmentFlags nAdjustmentFlags + 31 +vcl/source/opengl/OpenGLHelper.cxx:171 + class rtl::OString getHexString(const unsigned char *,unsigned int) + unsigned int nLength + 16 +vcl/source/window/impldockingwrapper.hxx:108 + void ImplDockingWindowWrapper::ShowTitleButton(enum TitleButton,_Bool) + enum TitleButton nButton + 4 +vcl/source/window/menu.cxx:545 + void ImplCopyItem(class Menu *,const class Menu &,unsigned short,unsigned short) + unsigned short nNewPos + 65535 +vcl/unx/generic/app/saldisp.cxx:660 + unsigned int GetKeySymMask(struct _XDisplay *,unsigned long) + unsigned long nKeySym + 65509 +vcl/unx/generic/dtrans/X11_selection.hxx:382 + unsigned long x11::SelectionManager::createCursor(const unsigned char *,const unsigned char *,int,int,int,int) + int width + 32 +vcl/unx/generic/dtrans/X11_selection.hxx:382 + unsigned long x11::SelectionManager::createCursor(const unsigned char *,const unsigned char *,int,int,int,int) + int height + 32 +workdir/../vcl/inc/qt5/Qt5Frame.hxx:210 + _Bool Qt5Frame::CallCallback(enum SalEvent,const void *) const + enum SalEvent nEvent + 37 +writerfilter/source/ooxml/OOXMLFastContextHandler.hxx:173 + void writerfilter::ooxml::OOXMLFastContextHandler::sendPropertiesWithId(unsigned int) + unsigned int nId + 92465 +writerfilter/source/ooxml/OOXMLFastContextHandler.hxx:512 + void writerfilter::ooxml::OOXMLFastContextHandlerWrapper::addToken(int) + int Element + 2167928 +writerfilter/source/rtftok/rtfdocumentimpl.hxx:664 + class tools::SvRef getNestedSprm(class writerfilter::rtftok::RTFSprms &,unsigned int,unsigned int) + unsigned int nParent + 92165 +writerfilter/source/rtftok/rtfsprm.hxx:58 + void writerfilter::rtftok::RTFSprms::eraseLast(unsigned int) + unsigned int nKeyword + 92680 +xmloff/inc/txtflde.hxx:253 + void XMLTextFieldExport::ProcessIntegerDef(enum xmloff::token::XMLTokenEnum,int,int) + enum xmloff::token::XMLTokenEnum eXmlName + 1350 +xmloff/inc/txtflde.hxx:279 + void XMLTextFieldExport::ProcessString(enum xmloff::token::XMLTokenEnum,unsigned short,const class rtl::OUString &,class std::basic_string_view >) + enum xmloff::token::XMLTokenEnum eXmlName + 833 +xmloff/inc/txtflde.hxx:279 + void XMLTextFieldExport::ProcessString(enum xmloff::token::XMLTokenEnum,unsigned short,const class rtl::OUString &,class std::basic_string_view >) + unsigned short nValuePrefix + 30 +xmloff/inc/txtflde.hxx:292 + void XMLTextFieldExport::ProcessString(enum xmloff::token::XMLTokenEnum,enum xmloff::token::XMLTokenEnum,enum xmloff::token::XMLTokenEnum) + enum xmloff::token::XMLTokenEnum eXmlName + 1477 +xmloff/inc/txtflde.hxx:292 + void XMLTextFieldExport::ProcessString(enum xmloff::token::XMLTokenEnum,enum xmloff::token::XMLTokenEnum,enum xmloff::token::XMLTokenEnum) + enum xmloff::token::XMLTokenEnum eDefault + 1813 +xmloff/inc/txtflde.hxx:324 + void XMLTextFieldExport::ProcessDateTime(enum xmloff::token::XMLTokenEnum,double,_Bool,_Bool,_Bool,unsigned short) + unsigned short nPrefix + 2 +xmloff/inc/txtflde.hxx:340 + void XMLTextFieldExport::ProcessDateTime(enum xmloff::token::XMLTokenEnum,const struct com::sun::star::util::DateTime &) + enum xmloff::token::XMLTokenEnum eXMLName + 532 +xmloff/inc/txtflde.hxx:345 + void XMLTextFieldExport::ProcessTimeOrDateTime(enum xmloff::token::XMLTokenEnum,const struct com::sun::star::util::DateTime &) + enum xmloff::token::XMLTokenEnum eXMLName + 1866 +xmloff/inc/XMLBase64Export.hxx:38 + _Bool XMLBase64Export::exportElement(const class com::sun::star::uno::Reference &,enum xmloff::token::XMLTokenEnum) + enum xmloff::token::XMLTokenEnum eName + 2076 +xmloff/source/chart/transporttypes.hxx:199 + void DataRowPointStyle::DataRowPointStyle(enum DataRowPointStyle::StyleType,const class rtl::OUString &,int) + enum DataRowPointStyle::StyleType eType + 5 +xmloff/source/draw/ximpcustomshape.cxx:87 + void GetInt32(class std::__debug::vector > &,class std::basic_string_view >,const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum) + const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum eDestProp + 80 +xmloff/source/draw/ximpcustomshape.cxx:100 + void GetDouble(class std::__debug::vector > &,class std::basic_string_view >,const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum) + const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum eDestProp + 65 +xmloff/source/draw/ximpcustomshape.cxx:113 + void GetString(class std::__debug::vector > &,const class rtl::OUString &,const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum) + const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum eDestProp + 61 +xmloff/source/draw/ximpcustomshape.cxx:123 + void GetEnum(class std::__debug::vector > &,class std::basic_string_view >,const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum,const SvXMLEnumMapEntry &) + const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum eDestProp + 114 +xmloff/source/draw/ximpcustomshape.cxx:427 + void GetPosition3D(class std::__debug::vector > &,class std::basic_string_view >,const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum,class SvXMLUnitConverter &) + const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum eDestProp + 96 +xmloff/source/draw/ximpcustomshape.cxx:441 + void GetDoubleSequence(class std::__debug::vector > &,const class rtl::OUString &,const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum) + const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum eDestProp + 113 +xmloff/source/draw/ximpcustomshape.cxx:466 + void GetSizeSequence(class std::__debug::vector > &,const class rtl::OUString &,const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum) + const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum eDestProp + 120 +xmloff/source/draw/ximpcustomshape.cxx:532 + int GetEnhancedParameterPairSequence(class std::__debug::vector > &,const class rtl::OUString &,const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum) + const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum eDestProp + 112 +xmloff/source/draw/ximpcustomshape.cxx:554 + void GetEnhancedRectangleSequence(class std::__debug::vector > &,const class rtl::OUString &,const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum) + const enum xmloff::EnhancedCustomShapeToken::EnhancedCustomShapeTokenEnum eDestProp + 111 +xmloff/source/forms/elementimport.cxx:1361 + void xmloff::(anonymous namespace)::EqualHandle::EqualHandle(int) + int _nHandle + 2 +xmloff/source/forms/property_description.hxx:80 + void xmloff::PropertyDescription::PropertyDescription(const class rtl::OUString &,const unsigned short,const enum xmloff::token::XMLTokenEnum,class rtl::Reference (*const)(enum xmloff::PropertyId),const enum xmloff::PropertyId) + const unsigned short i_namespacePrefix + 15 +xmloff/source/script/xmlbasicscript.hxx:36 + _Bool xmloff::BasicElementBase::getBoolAttr(_Bool *,int,const class com::sun::star::uno::Reference &) + int nToken + 1968665 +xmloff/source/style/xmlbahdl.hxx:50 + void XMLNumberNonePropHdl::XMLNumberNonePropHdl(enum xmloff::token::XMLTokenEnum,signed char) + enum xmloff::token::XMLTokenEnum eZeroString + 418 +xmloff/source/style/xmlbahdl.hxx:50 + void XMLNumberNonePropHdl::XMLNumberNonePropHdl(enum xmloff::token::XMLTokenEnum,signed char) + signed char nB + 2 +xmloff/source/style/xmlbahdl.hxx:116 + void XMLMeasurePxPropHdl::XMLMeasurePxPropHdl(signed char) + signed char nB + 4 +xmloff/source/text/XMLIndexMarkExport.cxx:182 + void lcl_ExportPropertyBool(class SvXMLExport &,const class com::sun::star::uno::Reference &,const class rtl::OUString &,enum xmloff::token::XMLTokenEnum,class com::sun::star::uno::Any &) + enum xmloff::token::XMLTokenEnum eToken + 2186 +xmloff/source/transform/TransformerContext.hxx:57 + _Bool XMLTransformerContext::HasNamespace(unsigned short) const + unsigned short nPrefix + 15 +xmlsecurity/inc/xsecctl.hxx:85 + void InternalSignatureInformation::addReference(enum SignatureReferenceType,int,const class rtl::OUString &,int,const class rtl::OUString &) + int keeperId + -1 +xmlsecurity/source/framework/elementmark.hxx:56 + void ElementMark::ElementMark(int,int) + int nSecurityId + -1 diff --git a/compilerplugins/clang/constantparam.py b/compilerplugins/clang/constantparam.py new file mode 100755 index 0000000000..1371a6d9d7 --- /dev/null +++ b/compilerplugins/clang/constantparam.py @@ -0,0 +1,197 @@ +#!/usr/bin/python3 + +import re +import io + +callDict = dict() # callInfo tuple -> callValue + +# clang does not always use exactly the same numbers in the type-parameter vars it generates +# so I need to substitute them to ensure we can match correctly. +normalizeTypeParamsRegex = re.compile(r"type-parameter-\d+-\d+") +def normalizeTypeParams( line ): + return normalizeTypeParamsRegex.sub("type-parameter-?-?", line) + +# reading as binary (since we known it is pure ascii) is much faster than reading as unicode +with io.open("workdir/loplugin.constantparam.log", "r") as txt: + line_no = 1; + try: + for line in txt: + tokens = line.strip().split("\t") + returnType = normalizeTypeParams(tokens[0]) + nameAndParams = normalizeTypeParams(tokens[1]) + sourceLocation = tokens[2] + paramName = tokens[3] + paramType = normalizeTypeParams(tokens[4]) + callValue = tokens[5] + callInfo = (returnType, nameAndParams, paramName, paramType, sourceLocation) + if not callInfo in callDict: + callDict[callInfo] = set() + callDict[callInfo].add(callValue) + line_no += 1 + except (IndexError,UnicodeDecodeError): + print("problem with line " + str(line_no)) + raise + +def RepresentsInt(s): + try: + int(s) + return True + except ValueError: + return False + +constructor_regex = re.compile(r"^\w+\(\)$") + +tmp1list = list() +tmp2list = list() +tmp3list = list() +tmp4list = list() +for callInfo, callValues in iter(callDict.items()): + nameAndParams = callInfo[1] + if len(callValues) != 1: + continue + callValue = next(iter(callValues)) + if "unknown" in callValue: + continue + sourceLoc = callInfo[4] + functionSig = callInfo[0] + " " + callInfo[1] + + # try to ignore setter methods + if ("," not in nameAndParams) and (("::set" in nameAndParams) or ("::Set" in nameAndParams)): + continue + # ignore code that follows a common pattern + if sourceLoc.startswith("sw/inc/swatrset.hxx"): continue + if sourceLoc.startswith("sw/inc/format.hxx"): continue + # template generated code + if sourceLoc.startswith("include/sax/fshelper.hxx"): continue + # debug code + if sourceLoc.startswith("include/oox/dump"): continue + # 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)) + else: + tmp2list.append((sourceLoc, functionSig, callInfo[3] + " " + callInfo[2], callValue)) + # look for places where the callsite is always a constructor invocation + elif constructor_regex.match(callValue) or callValue == "\"\"": + if callValue.startswith("Get"): continue + if callValue.startswith("get"): continue + if "operator=" in functionSig: continue + if "&&" in functionSig: continue + if callInfo[2] == "###0" and callValue == "InitData()": continue + if callInfo[2] == "###0" and callValue == "InitAggregate()": continue + if callValue == "shared_from_this()": continue + tmp3list.append((sourceLoc, functionSig, callInfo[3] + " " + callInfo[2], callValue)) + else: + tmp4list.append((sourceLoc, functionSig, callInfo[3] + " " + callInfo[2], callValue)) + + +# sort results by filename:lineno +def natural_sort_key(s, _nsre=re.compile('([0-9]+)')): + return [int(text) if text.isdigit() else text.lower() + for text in re.split(_nsre, s)] +# sort by both the source-line and the datatype, so the output file ordering is stable +# when we have multiple items on the same source line +def v_sort_key(v): + return natural_sort_key(v[0]) + [v[1]] +tmp1list.sort(key=lambda v: v_sort_key(v)) +tmp2list.sort(key=lambda v: v_sort_key(v)) +tmp3list.sort(key=lambda v: v_sort_key(v)) +tmp4list.sort(key=lambda v: v_sort_key(v)) + +# print out the results +with open("compilerplugins/clang/constantparam.booleans.results", "wt") as f: + for v in tmp1list: + f.write(v[0] + "\n") + f.write(" " + v[1] + "\n") + f.write(" " + v[2] + "\n") + f.write(" " + v[3] + "\n") +with open("compilerplugins/clang/constantparam.numbers.results", "wt") as f: + for v in tmp2list: + f.write(v[0] + "\n") + f.write(" " + v[1] + "\n") + f.write(" " + v[2] + "\n") + f.write(" " + v[3] + "\n") +with open("compilerplugins/clang/constantparam.constructors.results", "wt") as f: + for v in tmp3list: + f.write(v[0] + "\n") + f.write(" " + v[1] + "\n") + f.write(" " + v[2] + "\n") + f.write(" " + v[3] + "\n") +with open("compilerplugins/clang/constantparam.others.results", "wt") as f: + for v in tmp4list: + f.write(v[0] + "\n") + f.write(" " + v[1] + "\n") + f.write(" " + v[2] + "\n") + f.write(" " + v[3] + "\n") + +# ------------------------------------------------------------- +# Now a fun set of heuristics to look for methods that +# take bitmask parameters where one or more of the bits in the +# bitmask is always one or always zero + +# integer to hex str +def hex(i): + return "0x%x" % i +# I can't use python's ~ operator, because that produces negative numbers +def negate(i): + return (1 << 32) - 1 - i + +tmp2list = list() +for callInfo, callValues in iter(callDict.items()): + nameAndParams = callInfo[1] + if len(callValues) < 2: + continue + # we are only interested in enum parameters + if not "enum" in callInfo[3]: continue + if not "Flag" in callInfo[3] and not "flag" in callInfo[3] and not "Bit" in callInfo[3] and not "State" in callInfo[3]: continue + # try to ignore setter methods + if ("," not in nameAndParams) and (("::set" in nameAndParams) or ("::Set" in nameAndParams)): + continue + + setBits = 0 + clearBits = 0 + continue_flag = False + first = True + for callValue in callValues: + if "unknown" == callValue or not callValue.isdigit(): + continue_flag = True + break + if first: + setBits = int(callValue) + clearBits = negate(int(callValue)) + first = False + else: + setBits = setBits & int(callValue) + clearBits = clearBits & negate(int(callValue)) + + # estimate allBits by using the highest bit we have seen + # TODO dump more precise information about the allBits values of enums + allBits = (1 << setBits.bit_length()) - 1 + clearBits = clearBits & allBits + if continue_flag or (setBits == 0 and clearBits == 0): continue + + sourceLoc = callInfo[4] + functionSig = callInfo[0] + " " + callInfo[1] + + v2 = callInfo[3] + " " + callInfo[2] + if setBits != 0: v2 += " setBits=" + hex(setBits) + if clearBits != 0: v2 += " clearBits=" + hex(clearBits) + tmp2list.append((sourceLoc, functionSig, v2)) + + +# sort results by filename:lineno +tmp2list.sort(key=lambda v: v_sort_key(v)) + +# print out the results +with open("compilerplugins/clang/constantparam.bitmask.results", "wt") as f: + for v in tmp2list: + f.write(v[0] + "\n") + f.write(" " + v[1] + "\n") + f.write(" " + v[2] + "\n") diff --git a/compilerplugins/clang/constexprliteral.cxx b/compilerplugins/clang/constexprliteral.cxx new file mode 100644 index 0000000000..86bba13e09 --- /dev/null +++ b/compilerplugins/clang/constexprliteral.cxx @@ -0,0 +1,68 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef LO_CLANG_SHARED_PLUGINS + +#include +#include + +#include "check.hxx" +#include "plugin.hxx" +#include "config_clang.h" + +namespace +{ +class ConstexprLiteral final : public loplugin::FilteringPlugin +{ +public: + explicit ConstexprLiteral(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + bool VisitVarDecl(const VarDecl* varDecl) + { + if (ignoreLocation(varDecl)) + return true; + if (varDecl->isConstexpr()) + return true; + if (!loplugin::TypeCheck(varDecl->getType()) + .Class("OUStringLiteral") + .Namespace("rtl") + .GlobalNamespace()) + return true; + report(DiagnosticsEngine::Warning, "OUStringLiteral should be declared constexpr", + varDecl->getBeginLoc()) + << varDecl->getSourceRange(); + return true; + } + + bool preRun() override + { + if (!compiler.getLangOpts().CPlusPlus) + return false; + return true; + } + +private: + void run() override + { + if (preRun()) + { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + } +}; + +loplugin::Plugin::Registration constexprliteral("constexprliteral"); +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/constmethod.cxx b/compilerplugins/clang/constmethod.cxx new file mode 100644 index 0000000000..bd9c4db18d --- /dev/null +++ b/compilerplugins/clang/constmethod.cxx @@ -0,0 +1,563 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include +#include +#include + +#include "config_clang.h" + +#include "plugin.hxx" +#include "check.hxx" +#include "functionaddress.hxx" + +#include "clang/AST/ParentMapContext.h" + +/** + Find methods that can be declared const. + + This analysis attempts to implement "logical const" as opposed to "technical const", which means + we ignore always-const nature of std::unique_ptr::operator-> + + This is not a sophisticated analysis. It deliberately skips all of the hard cases for now. + It is an exercise in getting the most benefit for the least effort. +*/ +namespace +{ + +class ConstMethod: + public loplugin::FunctionAddress> +{ +public: + explicit ConstMethod(loplugin::InstantiationData const & data): FunctionAddress(data) {} + + virtual void run() override { + std::string fn(handler.getMainFileName()); + loplugin::normalizeDotDotInFilePath(fn); + // things I'm not sure about + if (loplugin::hasPathnamePrefix(fn, SRCDIR "/svl/unx/source/svdde/ddedummy.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/svl/source/numbers/zformat.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/svl/source/numbers/zforscan.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/svl/source/numbers/zforlist.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/source/gdi/impgraph.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/source/image/ImplImage.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/source/filter/wmf/wmfwr.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/unx/generic/app/i18n_im.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/unx/generic/app/randrwrapper.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/unx/gtk3/gtkinst.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/unx/gtk3/gtkframe.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/skia/gdiimpl.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/qt5/") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/package/source/xstor/owriteablestream.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/package/source/zippackage/ZipPackage.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/toolkit/") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/canvas/") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/accessibility/") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/framework/") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/basic/") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/sfx2/") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/xmloff/") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/connectivity/") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/editeng/") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/scripting/") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/ucb/") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/svx/") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/basctl/") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/chart2/") + ) + return; + + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + + for (const CXXMethodDecl *pMethodDecl : interestingMethodSet) { + if (methodCannotBeConstSet.find(pMethodDecl) != methodCannotBeConstSet.end()) + continue; + auto canonicalDecl = pMethodDecl->getCanonicalDecl(); + if (getFunctionsWithAddressTaken().find((FunctionDecl const *)canonicalDecl) + != getFunctionsWithAddressTaken().end()) + continue; + // things that I don't think should be logically const + std::string fqn = pMethodDecl->getQualifiedNameAsString(); + if (fqn == "comphelper::EmbeddedObjectContainer::CommitImageSubStorage" + || fqn == "SvtLinguConfig::SetProperty" + || fqn == "SvtLinguConfig::ReplaceSetProperties" + || fqn == "SystemWindow::UpdatePositionData" + || fqn == "OutputDevice::SelectClipRegion" + || fqn == "OutputDevice::BlendBitmap") + continue; + StringRef aFileName = getFilenameOfLocation(compiler.getSourceManager().getSpellingLoc(canonicalDecl->getBeginLoc())); + // leave the kit API alone + if (loplugin::isSamePathname(aFileName, SRCDIR "/include/LibreOfficeKit/LibreOfficeKit.hxx")) + continue; + // don't feel like touching this right now + if (loplugin::isSamePathname(aFileName, SRCDIR "/include/vcl/weld.hxx")) + continue; + report( + DiagnosticsEngine::Warning, + "this method can be const", + pMethodDecl->getBeginLoc()) + << pMethodDecl->getSourceRange(); + if (canonicalDecl->getLocation() != pMethodDecl->getLocation()) { + report( + DiagnosticsEngine::Note, + "canonical method declaration here", + canonicalDecl->getBeginLoc()) + << canonicalDecl->getSourceRange(); + } + } + } + + bool TraverseCXXMethodDecl(CXXMethodDecl *); + bool TraverseCXXConversionDecl(CXXConversionDecl *); + bool VisitCXXMethodDecl(const CXXMethodDecl *); + bool VisitCXXThisExpr(const CXXThisExpr *); + +private: + bool isPointerOrReferenceToConst(const QualType& qt); + bool isPointerOrReferenceToNonConst(const QualType& qt); + bool checkIfCanBeConst(const Stmt*, const CXXMethodDecl*); + + std::unordered_set interestingMethodSet; + std::unordered_set methodCannotBeConstSet; + CXXMethodDecl const * currCXXMethodDecl; +}; + +bool ConstMethod::TraverseCXXMethodDecl(CXXMethodDecl * cxxMethodDecl) +{ + currCXXMethodDecl = cxxMethodDecl; + bool rv = RecursiveASTVisitor::TraverseCXXMethodDecl(cxxMethodDecl); + currCXXMethodDecl = nullptr; + return rv; +} + +bool ConstMethod::TraverseCXXConversionDecl(CXXConversionDecl * cxxConversionDecl) +{ + currCXXMethodDecl = cxxConversionDecl; + bool rv = RecursiveASTVisitor::TraverseCXXConversionDecl(cxxConversionDecl); + currCXXMethodDecl = nullptr; + return rv; +} + +bool ConstMethod::VisitCXXMethodDecl(const CXXMethodDecl * cxxMethodDecl) +{ + if (ignoreLocation(cxxMethodDecl) || !cxxMethodDecl->isThisDeclarationADefinition()) { + return true; + } + if (cxxMethodDecl->isConst()) + return true; + // ignore stuff that forms part of the stable URE interface + if (isInUnoIncludeFile(cxxMethodDecl)) { + return true; + } + // TODO ignore template stuff for now + if (cxxMethodDecl->getTemplatedKind() != FunctionDecl::TK_NonTemplate) { + return true; + } + if (cxxMethodDecl->isDeleted()) + return true; + if (cxxMethodDecl->isStatic()) + return true; + if (cxxMethodDecl->isOverloadedOperator()) + return true; + if (isa(cxxMethodDecl)) + return true; + if (isa(cxxMethodDecl)) + return true; + if (cxxMethodDecl->getParent()->getDescribedClassTemplate() != nullptr ) { + return true; + } + // ignore virtual methods + if (cxxMethodDecl->isVirtual() ) { + return true; + } + // ignore macro expansions so we can ignore the IMPL_LINK macros from include/tools/link.hxx + // TODO make this more precise + if (cxxMethodDecl->getLocation().isMacroID()) + return true; + + if (!cxxMethodDecl->getIdentifier()) + return true; +// if (cxxMethodDecl->getNumParams() > 0) +// return true; + // returning pointers or refs to non-const stuff, and then having the whole method + // be const doesn't seem like a good idea + auto tc = loplugin::TypeCheck(cxxMethodDecl->getReturnType()); + if (tc.Pointer().NonConst()) + return true; + if (tc.LvalueReference().NonConst()) + return true; + // a Get method that returns void is probably doing something that has side-effects + if (tc.Void()) + return true; + +// StringRef name = cxxMethodDecl->getName(); +// if (!name.startswith("get") && !name.startswith("Get") +// && !name.startswith("is") && !name.startswith("Is") +// && !name.startswith("has") && !name.startswith("Has")) +// return true; + + // something lacking in my analysis here + if (loplugin::DeclCheck(cxxMethodDecl).Function("GetDescr").Class("SwRangeRedline").GlobalNamespace()) + return true; + + interestingMethodSet.insert(cxxMethodDecl); + + return true; +} + +bool ConstMethod::VisitCXXThisExpr( const CXXThisExpr* cxxThisExpr ) +{ + if (!currCXXMethodDecl) + return true; + if (ignoreLocation(cxxThisExpr)) + return true; + // ignore stuff that forms part of the stable URE interface + if (isInUnoIncludeFile(cxxThisExpr->getBeginLoc())) + return true; + if (interestingMethodSet.find(currCXXMethodDecl) == interestingMethodSet.end()) + return true; + // no need to check again if we have already eliminated this one + if (methodCannotBeConstSet.find(currCXXMethodDecl) != methodCannotBeConstSet.end()) + return true; + if (!checkIfCanBeConst(cxxThisExpr, currCXXMethodDecl)) + methodCannotBeConstSet.insert(currCXXMethodDecl); + + return true; +} + +// Walk up from a statement that contains a CXXThisExpr, checking if the usage means that the +// related CXXMethodDecl can be const. +bool ConstMethod::checkIfCanBeConst(const Stmt* stmt, const CXXMethodDecl* cxxMethodDecl) +{ + const Stmt* parent = getParentStmt( stmt ); + if (!parent) { + auto parentsRange = compiler.getASTContext().getParents(*stmt); + if ( parentsRange.begin() == parentsRange.end()) + return true; + auto varDecl = dyn_cast_or_null(parentsRange.begin()->get()); + if (!varDecl) + { + report( + DiagnosticsEngine::Warning, + "no parent?", + stmt->getBeginLoc()) + << stmt->getSourceRange(); + return false; + } + return varDecl->getType()->isIntegralOrEnumerationType() + || loplugin::TypeCheck(varDecl->getType()).Pointer().Const() + || loplugin::TypeCheck(varDecl->getType()).LvalueReference().Const(); + } + + if (auto unaryOperator = dyn_cast(parent)) { + UnaryOperator::Opcode op = unaryOperator->getOpcode(); + if (op == UO_PreInc || op == UO_PostInc + || op == UO_PreDec || op == UO_PostDec) { + return false; + } + if (op == UO_Deref || op == UO_AddrOf) { + return checkIfCanBeConst(parent, cxxMethodDecl); + } + return true; + } else if (auto binaryOp = dyn_cast(parent)) { + BinaryOperator::Opcode op = binaryOp->getOpcode(); + if (binaryOp->getRHS() == stmt) { + return true; + } + if (op == BO_Assign || op == BO_PtrMemD || op == BO_PtrMemI || op == BO_MulAssign + || op == BO_DivAssign || op == BO_RemAssign || op == BO_AddAssign + || op == BO_SubAssign || op == BO_ShlAssign || op == BO_ShrAssign + || op == BO_AndAssign || op == BO_XorAssign || op == BO_OrAssign) { + return false; + } +// // for pointer arithmetic need to check parent +// if (binaryOp->getType()->isPointerType()) { +// return checkIfCanBeConst(parent, cxxMethodDecl); +// } + return true; + } else if (auto constructExpr = dyn_cast(parent)) { + const CXXConstructorDecl * constructorDecl = constructExpr->getConstructor(); + for (unsigned i = 0; i < constructExpr->getNumArgs(); ++i) { + if (constructExpr->getArg(i) == stmt) { + return isPointerOrReferenceToConst(constructorDecl->getParamDecl(i)->getType()); + } + } + return false; // TODO ?? + } else if (auto operatorCallExpr = dyn_cast(parent)) { + const CXXMethodDecl* calleeMethodDecl = dyn_cast_or_null(operatorCallExpr->getDirectCallee()); + if (calleeMethodDecl) { + // unary operator + if (calleeMethodDecl->getNumParams() == 0) { + // some classes like std::unique_ptr do not do a very good job with their operator-> which is always const + if (operatorCallExpr->getOperator() == OO_Arrow || operatorCallExpr->getOperator() == OO_Star) { + return checkIfCanBeConst(parent, cxxMethodDecl); + } + return calleeMethodDecl->isConst(); + } + // some classes like std::unique_ptr do not do a very good job with their operator[] which is always const + if (calleeMethodDecl->getNumParams() == 1 && operatorCallExpr->getArg(0) == stmt) { + if (operatorCallExpr->getOperator() == OO_Subscript) { + return false; + } + } + // binary operator + if (operatorCallExpr->getArg(0) == stmt) { + return calleeMethodDecl->isConst(); + } + unsigned const n = std::min( + operatorCallExpr->getNumArgs(), + calleeMethodDecl->getNumParams()); + for (unsigned i = 1; i < n; ++i) + if (operatorCallExpr->getArg(i) == stmt) { + return isPointerOrReferenceToConst(calleeMethodDecl->getParamDecl(i - 1)->getType()); + } + } else { + const Expr* callee = operatorCallExpr->getCallee()->IgnoreParenImpCasts(); + const DeclRefExpr* dr = dyn_cast(callee); + const FunctionDecl* calleeFunctionDecl = nullptr; + if (dr) { + calleeFunctionDecl = dyn_cast(dr->getDecl()); + } + if (calleeFunctionDecl) { + for (unsigned i = 0; i < operatorCallExpr->getNumArgs(); ++i) { + if (operatorCallExpr->getArg(i) == stmt) { + return isPointerOrReferenceToConst(calleeFunctionDecl->getParamDecl(i)->getType()); + } + } + } + } + return false; // TODO ??? + } else if (auto callExpr = dyn_cast(parent)) { + QualType functionType = callExpr->getCallee()->getType(); + if (functionType->isFunctionPointerType()) { + functionType = functionType->getPointeeType(); + } + if (const FunctionProtoType* prototype = functionType->getAs()) { + // TODO could do better + if (prototype->isVariadic()) { + return false; + } + if (callExpr->getCallee() == stmt) { + return true; + } + for (unsigned i = 0; i < callExpr->getNumArgs(); ++i) { + if (callExpr->getArg(i) == stmt) { + return isPointerOrReferenceToConst(prototype->getParamType(i)); + } + } + } + const FunctionDecl* calleeFunctionDecl = callExpr->getDirectCallee(); + if (calleeFunctionDecl) + { + if (auto memberCallExpr = dyn_cast(parent)) { + const MemberExpr* memberExpr = dyn_cast(stmt); + if (memberExpr && memberCallExpr->getImplicitObjectArgument() == memberExpr->getBase()) + { + const CXXMethodDecl* calleeMethodDecl = dyn_cast(calleeFunctionDecl); + // some classes like std::unique_ptr do not do a very good job with their get() which is always const + if (calleeMethodDecl->getIdentifier() && calleeMethodDecl->getName() == "get") { + return checkIfCanBeConst(parent, cxxMethodDecl); + } + // VclPtr's implicit conversion to T* + if (isa(calleeMethodDecl)) { + if (loplugin::DeclCheck(calleeMethodDecl->getParent()).Class("OWeakObject").Namespace("cppu").GlobalNamespace()) + return false; + return checkIfCanBeConst(parent, cxxMethodDecl); + } + return calleeMethodDecl->isConst(); + } + } + // TODO could do better + if (calleeFunctionDecl->isVariadic()) { + return false; + } + if (callExpr->getCallee() == stmt) { + return true; + } + for (unsigned i = 0; i < callExpr->getNumArgs(); ++i) { + if (i >= calleeFunctionDecl->getNumParams()) // can happen in template code + return false; + if (callExpr->getArg(i) == stmt) { + return isPointerOrReferenceToConst(calleeFunctionDecl->getParamDecl(i)->getType()); + } + } + } + return false; // TODO ???? +// } else if (auto callExpr = dyn_cast(parent)) { +// if (callExpr->getInstanceReceiver() == stmt) { +// return true; +// } +// if (auto const method = callExpr->getMethodDecl()) { +// // TODO could do better +// if (method->isVariadic()) { +// return false; +// } +// assert(method->param_size() == callExpr->getNumArgs()); +// for (unsigned i = 0; i < callExpr->getNumArgs(); ++i) { +// if (callExpr->getArg(i) == stmt) { +// return isPointerOrReferenceToConst( +// method->param_begin()[i]->getType()); +// } +// } +// } +// return false; // TODO ???? + } else if (isa(parent)) { + return false; + } else if (isa(parent)) { + return checkIfCanBeConst(parent, cxxMethodDecl); + } else if (isa(parent)) { + return checkIfCanBeConst(parent, cxxMethodDecl); + } else if (isa(parent)) { + return checkIfCanBeConst(parent, cxxMethodDecl); + } else if (isa(parent)) { + return checkIfCanBeConst(parent, cxxMethodDecl); + } else if (isa(parent)) { + return false; + } else if (isa(parent)) { + return checkIfCanBeConst(parent, cxxMethodDecl); +// } else if (isa(parent)) { // all other cast expression subtypes +// if (auto e = dyn_cast(parent)) { +// if (loplugin::TypeCheck(e->getTypeAsWritten()).Void()) { +// if (auto const sub = dyn_cast( +// e->getSubExpr()->IgnoreParenImpCasts())) +// { +// if (sub->getDecl() == cxxMethodDecl) { +// return false; +// } +// } +// } +// } +// return checkIfCanBeConst(parent, cxxMethodDecl); + } else if (isa(parent)) { + return checkIfCanBeConst(parent, cxxMethodDecl); + } else if (auto arraySubscriptExpr = dyn_cast(parent)) { + if (arraySubscriptExpr->getIdx() == stmt) + return true; + return checkIfCanBeConst(parent, cxxMethodDecl); + } else if (isa(parent)) { + return checkIfCanBeConst(parent, cxxMethodDecl); + } else if (auto declStmt = dyn_cast(parent)) { + for (Decl const * decl : declStmt->decls()) + if (auto varDecl = dyn_cast(decl)) { + if (varDecl->getInit() == stmt) { + auto tc = loplugin::TypeCheck(varDecl->getType()); + if (tc.LvalueReference() && !tc.LvalueReference().Const()) + return false; + if (tc.Pointer() && !tc.Pointer().Const()) + return false; + return true; + } + } + // fall through + } else if (isa(parent)) { + return !isPointerOrReferenceToNonConst(cxxMethodDecl->getReturnType()); + } else if (isa(parent)) { + return false; // TODO could be improved + } else if (isa(parent)) { + return true; + } else if (isa(parent)) { + return true; + } else if (isa(parent)) { + return true; + } else if (isa(parent)) { + return true; + } else if (isa(parent)) { + return true; + } else if (isa(parent)) { + return true; + } else if (isa(parent)) { + return false; +// } else if (isa(parent)) { +// return false; + } else if (isa(parent)) { + return false; + } else if (isa(parent)) { + return checkIfCanBeConst(parent, cxxMethodDecl); + } else if (auto conditionalExpr = dyn_cast(parent)) { + if (conditionalExpr->getCond() == stmt) + return true; + return checkIfCanBeConst(parent, cxxMethodDecl); +// } else if (isa(parent)) { +// return false; // ??? + } else if (isa(parent)) { +// for (auto pa : cxxNewExpr->placement_arguments()) +// if (pa == stmt) +// return false; + return true; // because the Stmt must be a parameter to the expression, probably an array length +// } else if (auto lambdaExpr = dyn_cast(parent)) { +//// for (auto it = lambdaExpr->capture_begin(); it != lambdaExpr->capture_end(); ++it) +//// { +//// if (it->capturesVariable() && it->getCapturedVar() == cxxMethodDecl) +//// return it->getCaptureKind() != LCK_ByRef; +//// } +// return true; +// } else if (isa(parent)) { +// return true; + } else if (isa(parent)) { + return true; + } else if (isa(parent)) { + return false; +// } else if (isa(parent)) { +// return false; +// } else if (isa(parent)) { +// return false; + } else if (isa(parent)) { + return checkIfCanBeConst(parent, cxxMethodDecl); +// } else if (isa(parent)) { +// return true; +// } else if (isa(parent)) { +// return false; +// } else if (isa(parent)) { +// return false; +// } else if (isa(parent)) { +// return checkIfCanBeConst(parent, cxxMethodDecl); + } else if (isa(parent)) { + return true; + } else if (isa(parent)) { + return true; + } + if (parent) + parent->dump(); +// if (cxxMethodDecl) +// cxxMethodDecl->dump(); + report( + DiagnosticsEngine::Warning, + "oh dear, what can the matter be?", + parent->getBeginLoc()) + << parent->getSourceRange(); + return false; +} + +bool ConstMethod::isPointerOrReferenceToConst(const QualType& qt) { + auto const type = loplugin::TypeCheck(qt); + if (type.Pointer()) { + return bool(type.Pointer().Const()); + } else if (type.LvalueReference()) { + return bool(type.LvalueReference().Const()); + } + return false; +} + +bool ConstMethod::isPointerOrReferenceToNonConst(const QualType& qt) { + auto const type = loplugin::TypeCheck(qt); + if (type.Pointer()) { + return !bool(type.Pointer().Const()); + } else if (type.LvalueReference()) { + return !bool(type.LvalueReference().Const()); + } + return false; +} + +loplugin::Plugin::Registration< ConstMethod > X("constmethod", false); + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/constmove.cxx b/compilerplugins/clang/constmove.cxx new file mode 100644 index 0000000000..63bafa1889 --- /dev/null +++ b/compilerplugins/clang/constmove.cxx @@ -0,0 +1,85 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +// Find occurrences of std::move on const-qualified types. While there might theoretically be +// legitimate uses for such (for which this plugin would generate false positives and would need to +// be updated), in practice they tend to point at suspicious code that should be cleaned up in some +// way. + +#ifndef LO_CLANG_SHARED_PLUGINS + +#include "check.hxx" +#include "plugin.hxx" + +namespace +{ +class ConstMove final : public loplugin::FilteringPlugin +{ +public: + explicit ConstMove(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + bool preRun() override { return compiler.getLangOpts().CPlusPlus; } + + void run() override + { + if (preRun()) + { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + } + + bool VisitCallExpr(CallExpr const* expr) + { + if (ignoreLocation(expr)) + { + return true; + } + auto const t = expr->getType(); + if (!t.isConstQualified()) + { + return true; + } + auto const d = expr->getDirectCallee(); + if (d == nullptr) + { + return true; + } + if (!loplugin::DeclCheck(d).Function("move").StdNamespace()) + { + return true; + } + switch (expr->getNumArgs()) + { + case 0: + return true; + case 1: + break; + default: + if (!isa(expr->getArg(1))) + { + return true; + } + break; + } + report(DiagnosticsEngine::Warning, "suspicious 'std::move' from %0 to const-qualified %1", + expr->getExprLoc()) + << expr->getArg(0)->IgnoreImplicit()->getType() << t << expr->getSourceRange(); + return true; + } +}; + +static loplugin::Plugin::Registration constmove("constmove"); +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/conststringvar.cxx b/compilerplugins/clang/conststringvar.cxx new file mode 100644 index 0000000000..99cfb01c06 --- /dev/null +++ b/compilerplugins/clang/conststringvar.cxx @@ -0,0 +1,156 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef LO_CLANG_SHARED_PLUGINS + +#include +#include + +#include "check.hxx" +#include "plugin.hxx" + +// Find non-const vars of 'char const *' type initialized with a const expr, +// that could likely be const (and will then probably trigger further +// loplugin:stringconstant findings). + +namespace { + +class ConstStringVar: + public loplugin::FilteringPlugin +{ +public: + explicit ConstStringVar(loplugin::InstantiationData const & data): + FilteringPlugin(data) {} + + bool preRun() override { + return compiler.getLangOpts().CPlusPlus; + // clang::Expr::isCXX11ConstantExpr only works for C++ + } + + void postRun() override { + for (auto v: vars_) { + report( + DiagnosticsEngine::Warning, + "variable is only used as rvalue, should be const", + v->getLocation()) + << v->getSourceRange(); + } + } + + void run() override { + if (preRun() && TraverseDecl(compiler.getASTContext().getTranslationUnitDecl())) { + postRun(); + } + } + + bool PreTraverseImplicitCastExpr(ImplicitCastExpr * expr) { + bool match; + switch (expr->getCastKind()) { + case CK_NoOp: + // OString CharPtrDetector ctor: + match = bool( + loplugin::TypeCheck(expr->getType()).Const().Pointer().Const() + .Char()); + break; + case CK_LValueToRValue: + match = true; + break; + default: + match = false; + break; + } + bool pushed = false; + if (match) { + if (auto dr = dyn_cast( + expr->getSubExpr()->IgnoreParenImpCasts())) + { + if (auto vd = dyn_cast(dr->getDecl())) { + if (vars_.find(vd->getCanonicalDecl()) != vars_.end()) { + casted_.push(dr); + pushed = true; + } + } + } + } + pushed_.push(pushed); + return true; + } + bool PostTraverseImplicitCastExpr(ImplicitCastExpr *, bool) { + bool pushed = pushed_.top(); + pushed_.pop(); + if (pushed) { + casted_.pop(); + } + return true; + } + bool TraverseImplicitCastExpr(ImplicitCastExpr * expr) { + bool ret = true; + if (PreTraverseImplicitCastExpr(expr)) + { + ret = FilteringPlugin::TraverseImplicitCastExpr(expr); + PostTraverseImplicitCastExpr(expr, ret); + } + return ret; + } + + bool VisitVarDecl(VarDecl const * decl) { + if (ignoreLocation(decl)) { + return true; + } + if (decl != decl->getCanonicalDecl()) { + return true; + } + if (isa(decl) || loplugin::hasExternalLinkage(decl)) { + return true; + } + if (!loplugin::TypeCheck(decl->getType()).NonConstVolatile().Pointer() + .Const().Char()) + { + return true; + } + auto init = decl->getAnyInitializer(); + if (init == nullptr) { + return true; + } + if (init->isInstantiationDependent()) { + // avoid problems with isCXX11ConstantExpr in template code + return true; + } + APValue v; + if (!init->isCXX11ConstantExpr(compiler.getASTContext(), &v)) { + return true; + } + vars_.insert(decl); + return true; + } + + bool VisitDeclRefExpr(DeclRefExpr const * expr) { + if (!casted_.empty() && expr == casted_.top()) { + return true; + } + auto vd = dyn_cast(expr->getDecl()); + if (vd == nullptr) { + return true; + } + vars_.erase(vd->getCanonicalDecl()); + return true; + } + +private: + std::set vars_; + std::stack casted_; + std::stack pushed_; +}; + +loplugin::Plugin::Registration conststringvar("conststringvar"); + +} + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/consttobool.cxx b/compilerplugins/clang/consttobool.cxx new file mode 100644 index 0000000000..c13bf7729e --- /dev/null +++ b/compilerplugins/clang/consttobool.cxx @@ -0,0 +1,292 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +//TODO: Make this a shared plugin for Clang 12 (and possibly even for older Clang) again. + +#include +#include +#include + +#include "clang/Basic/Builtins.h" + +#include "check.hxx" +#include "compat.hxx" +#include "plugin.hxx" + +// Find implicit conversions from non-'bool' constants (e.g., 'sal_False') to 'bool'. + +namespace +{ +class ConstToBool final : public loplugin::FilteringPlugin +{ +public: + explicit ConstToBool(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + bool PreTraverseLinkageSpecDecl(LinkageSpecDecl*) + { + assert(externCContexts_ != std::numeric_limits::max()); //TODO + ++externCContexts_; + return true; + } + + bool PostTraverseLinkageSpecDecl(LinkageSpecDecl*, bool) + { + assert(externCContexts_ != 0); + --externCContexts_; + return true; + } + + bool TraverseLinkageSpecDecl(LinkageSpecDecl* decl) + { + bool ret = true; + if (PreTraverseLinkageSpecDecl(decl)) + { + ret = FilteringPlugin::TraverseLinkageSpecDecl(decl); + PostTraverseLinkageSpecDecl(decl, ret); + } + return ret; + } + + bool PreTraverseUnaryOperator(UnaryOperator* expr) + { + if (expr->getOpcode() == UO_LNot) + { + ignoredInAssert_.push(expr->getSubExpr()); + } + return true; + } + + bool PostTraverseUnaryOperator(UnaryOperator* expr, bool) + { + if (expr->getOpcode() == UO_LNot) + { + assert(!ignoredInAssert_.empty()); + ignoredInAssert_.pop(); + } + return true; + } + + bool TraverseUnaryOperator(UnaryOperator* expr) + { + bool ret = true; + if (PreTraverseUnaryOperator(expr)) + { + ret = FilteringPlugin::TraverseUnaryOperator(expr); + PostTraverseUnaryOperator(expr, ret); + } + return ret; + } + + bool PreTraverseBinaryOperator(BinaryOperator* expr) + { + if (expr->getOpcode() == BO_LAnd) + { + ignoredInAssert_.push(expr->getRHS()); + } + return true; + } + + bool PostTraverseBinaryOperator(BinaryOperator* expr, bool) + { + if (expr->getOpcode() == BO_LAnd) + { + assert(!ignoredInAssert_.empty()); + ignoredInAssert_.pop(); + } + return true; + } + + bool TraverseBinaryOperator(BinaryOperator* expr) + { + bool ret = true; + if (PreTraverseBinaryOperator(expr)) + { + ret = FilteringPlugin::TraverseBinaryOperator(expr); + PostTraverseBinaryOperator(expr, ret); + } + return ret; + } + + bool VisitImplicitCastExpr(ImplicitCastExpr const* expr) + { + if (ignoreLocation(expr)) + { + return true; + } + if (!expr->getType()->isBooleanType()) + { + return true; + } + auto const sub = expr->getSubExpr(); + auto const t = sub->getType(); + if (t->isBooleanType()) + { + return true; + } + if (sub->isValueDependent()) + { + return true; + } + APValue res; + if (!sub->isCXX11ConstantExpr(compiler.getASTContext(), &res)) + { + return true; + } + auto const l = expr->getExprLoc(); + if (!ignoredInAssert_.empty() && expr == ignoredInAssert_.top()) + { + if (auto const e = dyn_cast(sub->IgnoreParenImpCasts())) + { + if (compat::isOrdinary(e)) // somewhat randomly restrict to plain literals + { + if (compiler.getSourceManager().isMacroArgExpansion(l) + && Lexer::getImmediateMacroName(l, compiler.getSourceManager(), + compiler.getLangOpts()) + == "assert") + { + //TODO: only ignore outermost '!"..."' or '... && "..."' + return true; + } + } + } + } + auto l1 = l; + if (compiler.getSourceManager().isMacroBodyExpansion(l1)) + { + auto const n = Lexer::getImmediateMacroName(l1, compiler.getSourceManager(), + compiler.getLangOpts()); + if (n == "FALSE" || n == "TRUE" || n == "sal_False" || n == "sal_True") + { + l1 = compiler.getSourceManager().getImmediateMacroCallerLoc(l1); + } + // For example, /usr/include/glib-2.0/glib/gmacros.h from + // glib2-devel-2.62.1-1.fc31.x86_64 has + // + // #define TRUE (!FALSE) + // + // so handle that wrapped macro body expansion, too: + if (compiler.getSourceManager().isMacroBodyExpansion(l1) + && Lexer::getImmediateMacroName(l1, compiler.getSourceManager(), + compiler.getLangOpts()) + == "TRUE") + { + l1 = compiler.getSourceManager().getImmediateMacroCallerLoc(l1); + } + } + if (isSharedCAndCppCode(l1)) + { + // Cover just enough cases to handle things like `while (0)` or the use of `sal_True` in + // + // #define OSL_FAIL(m) SAL_DETAIL_WARN_IF_FORMAT(sal_True, "legacy.osl", "%s", m) + // + // in include/osl/diagnose.h: + if (auto const t1 = t->getAs()) + { + if (t1->getKind() == BuiltinType::Int) + { + auto const& v = res.getInt(); + if (v == 0 || v == 1) + { + return true; + } + } + } + if (loplugin::TypeCheck(t).Typedef("sal_Bool").GlobalNamespace()) + { + return true; + } + } + if (auto const e = dyn_cast(sub->IgnoreParenImpCasts())) + { + // Ignore use of `long __builtin_expect(long, long)`, as found in the definition of + // `assert` on macOS: + if (e->getBuiltinCallee() == Builtin::BI__builtin_expect) + { + return true; + } + } + bool suggestion; + bool replacement = {}; + if (res.isInt()) + { + suggestion = true; + replacement = res.getInt() != 0; + } + else if (res.isFloat()) + { + suggestion = true; + replacement = !res.getFloat().isZero(); + } + else if (res.isNullPointer()) + { + suggestion = true; + replacement = false; + } + else if (res.isLValue()) + { + suggestion = true; + replacement = true; + } + else + { + suggestion = false; + } + report(DiagnosticsEngine::Warning, + "implicit conversion of constant %0 of type %1 to 'bool'%select{|; use " + "'%select{false|true}3' instead}2", + l) + << res.getAsString(compiler.getASTContext(), t) << t << suggestion << replacement + << expr->getSourceRange(); + return true; + } + + bool preRun() override { return compiler.getLangOpts().CPlusPlus; } + +private: + std::stack ignoredInAssert_; + unsigned int externCContexts_ = 0; + + void run() override + { + if (preRun()) + { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + } + + bool isFromCIncludeFile(SourceLocation spellingLocation) const + { + return !compiler.getSourceManager().isInMainFile(spellingLocation) + && (StringRef( + compiler.getSourceManager().getPresumedLoc(spellingLocation).getFilename()) + .endswith(".h")); + } + + bool isSharedCAndCppCode(SourceLocation location) const + { + while (compiler.getSourceManager().isMacroArgExpansion(location)) + { + location = compiler.getSourceManager().getImmediateMacroCallerLoc(location); + } + // Assume that code is intended to be shared between C and C++ if it comes from an include + // file ending in .h, and is either in an extern "C" context or the body of a macro + // definition: + return isFromCIncludeFile(compiler.getSourceManager().getSpellingLoc(location)) + && (externCContexts_ != 0 + || compiler.getSourceManager().isMacroBodyExpansion(location)); + } +}; + +loplugin::Plugin::Registration consttobool("consttobool"); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/cow_wrapper.cxx b/compilerplugins/clang/cow_wrapper.cxx new file mode 100644 index 0000000000..c98f70cbeb --- /dev/null +++ b/compilerplugins/clang/cow_wrapper.cxx @@ -0,0 +1,121 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * Based on LLVM/Clang. + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + */ +#ifndef LO_CLANG_SHARED_PLUGINS + +#include +#include +#include +#include +#include +#include +#include "plugin.hxx" +#include "check.hxx" + +/* +Look for places where we are using cow_wrapper, but we are calling a const method on the impl object +with a non-const pointer, which means we will unnecessarily trigger a copy. +*/ + +namespace +{ +class Cow_Wrapper : public loplugin::FilteringPlugin +{ +public: + explicit Cow_Wrapper(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + virtual bool preRun() override { return true; } + + virtual void run() override + { + if (preRun()) + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + + bool VisitCXXMemberCallExpr(const CXXMemberCallExpr*); +}; + +bool Cow_Wrapper::VisitCXXMemberCallExpr(const CXXMemberCallExpr* memberCallExpr) +{ + if (ignoreLocation(memberCallExpr)) + return true; + auto methodDecl = memberCallExpr->getMethodDecl(); + if (!methodDecl || !methodDecl->isConst()) + return true; + + auto expr = memberCallExpr->getImplicitObjectArgument()->IgnoreImplicit()->IgnoreParens(); + auto operatorCallExpr = dyn_cast(expr); + + if (operatorCallExpr && operatorCallExpr->getOperator() == OO_Arrow) + { + auto arrowMethodDecl = dyn_cast_or_null(operatorCallExpr->getDirectCallee()); + if (!arrowMethodDecl) + return true; + if (arrowMethodDecl->isConst()) + return true; + auto dc = loplugin::DeclCheck(arrowMethodDecl->getParent()) + .Class("cow_wrapper") + .Namespace("o3tl") + .GlobalNamespace(); + if (!dc) + return true; + } + else if (operatorCallExpr) + { + auto methodDecl2 = dyn_cast_or_null(operatorCallExpr->getDirectCallee()); + if (!methodDecl2) + return true; + auto dc = loplugin::DeclCheck(methodDecl2->getParent()) + .Class("cow_wrapper") + .Namespace("o3tl") + .GlobalNamespace(); + if (!dc) + return true; + } + else if (auto callExpr = dyn_cast(expr)) + { + if (!isa(callExpr->getCallee())) // std::as_const shows up as this + return true; + if (callExpr->getNumArgs() < 1) + return true; + auto arg0 = dyn_cast(callExpr->getArg(0)); + if (!arg0) + return true; + auto starMethodDecl = dyn_cast_or_null(arg0->getDirectCallee()); + if (!starMethodDecl) + return true; + auto dc = loplugin::DeclCheck(starMethodDecl->getParent()) + .Class("cow_wrapper") + .Namespace("o3tl") + .GlobalNamespace(); + if (!dc) + return true; + } + else + return true; + + report(DiagnosticsEngine::Warning, + "calling const method on o3tl::cow_wrapper impl class via non-const pointer, rather use " + "std::as_const to prevent triggering an unnecessary copy", + memberCallExpr->getBeginLoc()) + << memberCallExpr->getSourceRange(); + return true; +} + +loplugin::Plugin::Registration cow_wrapper("cow_wrapper", true); + +} // namespace + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/cppunitassertequals.cxx b/compilerplugins/clang/cppunitassertequals.cxx new file mode 100644 index 0000000000..df50f57537 --- /dev/null +++ b/compilerplugins/clang/cppunitassertequals.cxx @@ -0,0 +1,305 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef LO_CLANG_SHARED_PLUGINS + +#include "plugin.hxx" +#include "check.hxx" +#include "compat.hxx" +#include + +/** + Check for + (*) calls to CPPUNIT_ASSERT when it should be using CPPUNIT_ASSERT_EQUALS + (*) calls to CPPUNIT_ASSERT_EQUALS where the constant is the second param +*/ + +namespace { + +class CppunitAssertEquals: + public loplugin::FilteringPlugin +{ +public: + explicit CppunitAssertEquals(loplugin::InstantiationData const & data): + FilteringPlugin(data) {} + + virtual bool preRun() override + { + return compiler.getLangOpts().CPlusPlus; + } + + virtual void run() override + { + if (preRun()) { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + } + + bool VisitCallExpr(const CallExpr*); + +private: + void checkExpr( + SourceRange range, StringRef name, Expr const * expr, bool negated); + + void reportEquals( + SourceRange range, StringRef name, bool negative, Expr const * lhs, Expr const * rhs); + + bool isCompileTimeConstant(Expr const * expr); +}; + +bool CppunitAssertEquals::VisitCallExpr(const CallExpr* callExpr) +{ + auto const decl = callExpr->getDirectCallee(); + if (!decl) + return true; + /* + calls to CPPUNIT_ASSERT when it should be using CPPUNIT_ASSERT_EQUALS + */ + if (loplugin::DeclCheck(decl).Function("failIf").Struct("Asserter") + .Namespace("CppUnit").GlobalNamespace()) + { + // Don't use callExpr->getLocStart() or callExpr->getExprLoc(), as those + // fall into a nested use of the CPPUNIT_NS macro; CallExpr::getRParenLoc + // happens to be readily available and cause good results: + auto loc = callExpr->getRParenLoc(); + while (compiler.getSourceManager().isMacroArgExpansion(loc)) { + loc = compiler.getSourceManager().getImmediateMacroCallerLoc(loc); + } + if (!compiler.getSourceManager().isMacroBodyExpansion(loc) + || ignoreLocation( + compiler.getSourceManager().getImmediateMacroCallerLoc(loc))) + { + return true; + } + auto name = Lexer::getImmediateMacroName( + loc, compiler.getSourceManager(), compiler.getLangOpts()); + if (name != "CPPUNIT_ASSERT" && name != "CPPUNIT_ASSERT_MESSAGE") { + return true; + } + if (decl->getNumParams() != 3) { + report( + DiagnosticsEngine::Warning, + ("TODO: suspicious CppUnit::Asserter::failIf call with %0" + " parameters"), + callExpr->getExprLoc()) + << decl->getNumParams() << callExpr->getSourceRange(); + return true; + } + auto const e1 = callExpr->getArg(0)->IgnoreParenImpCasts(); + Expr const * e2 = nullptr; + if (auto const e3 = dyn_cast(e1)) { + if (e3->getOpcode() == UO_LNot) { + e2 = e3->getSubExpr(); + } + } else if (auto const e4 = dyn_cast(e1)) { + if (e4->getOperator() == OO_Exclaim) { + e2 = e4->getArg(0); + } + } + if (e2 == nullptr) { + report( + DiagnosticsEngine::Warning, + ("TODO: suspicious CppUnit::Asserter::failIf call not wrapping" + " !(...)"), + callExpr->getExprLoc()) + << callExpr->getSourceRange(); + return true; + } + auto range = compat::getImmediateExpansionRange(compiler.getSourceManager(), loc); + checkExpr( + SourceRange(range.first, range.second), name, + e2->IgnoreParenImpCasts(), false); + } + + /** + Check for calls to CPPUNIT_ASSERT_EQUALS where the constant is the second param + */ + if (loplugin::DeclCheck(decl).Function("assertEquals"). + Namespace("CppUnit").GlobalNamespace()) + { + // can happen in template test code that both params are compile time constants + if (isCompileTimeConstant(callExpr->getArg(0))) + return true; + if (isCompileTimeConstant(callExpr->getArg(1))) + report( + DiagnosticsEngine::Warning, + "CPPUNIT_ASSERT_EQUALS parameters look switched, expected value should be first param", + callExpr->getExprLoc()) + << callExpr->getSourceRange(); + } + if (loplugin::DeclCheck(decl).Function("assertDoubleEquals"). + Namespace("CppUnit").GlobalNamespace()) + { + // can happen in template test code that both params are compile time constants + if (isCompileTimeConstant(callExpr->getArg(0))) + return true; + if (isCompileTimeConstant(callExpr->getArg(1))) + report( + DiagnosticsEngine::Warning, + "CPPUNIT_ASSERT_DOUBLES_EQUALS parameters look switched, expected value should be first param", + callExpr->getExprLoc()) + << callExpr->getSourceRange(); + } + if (loplugin::DeclCheck(decl).Function("assertLess"). + Namespace("CppUnit").GlobalNamespace()) + { + // can happen in template test code that both params are compile time constants + if (isCompileTimeConstant(callExpr->getArg(0))) + return true; + if (isCompileTimeConstant(callExpr->getArg(1))) + report( + DiagnosticsEngine::Warning, + "CPPUNIT_ASSERT_LESS parameters look switched, expected value should be first param", + callExpr->getExprLoc()) + << callExpr->getSourceRange(); + } + if (loplugin::DeclCheck(decl).Function("assertLessEqual"). + Namespace("CppUnit").GlobalNamespace()) + { + // can happen in template test code that both params are compile time constants + if (isCompileTimeConstant(callExpr->getArg(0))) + return true; + if (isCompileTimeConstant(callExpr->getArg(1))) + report( + DiagnosticsEngine::Warning, + "CPPUNIT_ASSERT_LESSEQUAL parameters look switched, expected value should be first param", + callExpr->getExprLoc()) + << callExpr->getSourceRange(); + } + if (loplugin::DeclCheck(decl).Function("assertGreater"). + Namespace("CppUnit").GlobalNamespace()) + { + // can happen in template test code that both params are compile time constants + if (isCompileTimeConstant(callExpr->getArg(0))) + return true; + if (isCompileTimeConstant(callExpr->getArg(1))) + report( + DiagnosticsEngine::Warning, + "CPPUNIT_ASSERT_GREATER parameters look switched, expected value should be first param", + callExpr->getExprLoc()) + << callExpr->getSourceRange(); + } + if (loplugin::DeclCheck(decl).Function("assertGreaterEqual"). + Namespace("CppUnit").GlobalNamespace()) + { + // can happen in template test code that both params are compile time constants + if (isCompileTimeConstant(callExpr->getArg(0))) + return true; + if (isCompileTimeConstant(callExpr->getArg(1))) + report( + DiagnosticsEngine::Warning, + "CPPUNIT_ASSERT_GREATEREQUAL parameters look switched, expected value should be first param", + callExpr->getExprLoc()) + << callExpr->getSourceRange(); + } + return true; +} + +// copied from stringconcat.cxx +Expr const * stripConstructor(Expr const * expr) { + auto e0 = expr; + auto const e1 = dyn_cast(e0); + if (e1 != nullptr) { + e0 = e1->getSubExpr()->IgnoreParenImpCasts(); + } + auto const e2 = dyn_cast(e0); + if (e2 == nullptr) { + return expr; + } + auto const e3 = dyn_cast( + e2->getSubExpr()->IgnoreParenImpCasts()); + if (e3 == nullptr) { + return expr; + } + auto qt = loplugin::DeclCheck(e3->getConstructor()); + if (!((qt.MemberFunction().Class("OString").Namespace("rtl") + .GlobalNamespace()) + || (qt.MemberFunction().Class("OUString").Namespace("rtl") + .GlobalNamespace()))) + { + return expr; + } + if (e3->getNumArgs() != 2) { + return expr; + } + return e3->getArg(0)->IgnoreParenImpCasts(); +} + +bool CppunitAssertEquals::isCompileTimeConstant(Expr const * expr) +{ + if (expr->isCXX11ConstantExpr(compiler.getASTContext())) + return true; + // is string literal ? + expr = expr->IgnoreParenImpCasts(); + expr = stripConstructor(expr); + return isa(expr); +} + +void CppunitAssertEquals::checkExpr( + SourceRange range, StringRef name, Expr const * expr, bool negated) +{ + if (auto const e = dyn_cast(expr)) { + if (e->getOpcode() == UO_LNot) { + checkExpr( + range, name, e->getSubExpr()->IgnoreParenImpCasts(), !negated); + } + return; + } + if (auto const e = dyn_cast(expr)) { + auto const op = e->getOpcode(); + if ((!negated && op == BO_EQ) || (negated && op == BO_NE)) { + reportEquals(range, name, op == BO_NE, e->getLHS(), e->getRHS()); + return; + } + if ((!negated && op == BO_LAnd) || (negated && op == BO_LOr)) { + report( + DiagnosticsEngine::Warning, + "rather split into two %0", e->getExprLoc()) + << name << range; + return; + } + return; + } + if (auto const e = dyn_cast(expr)) { + auto const op = e->getOperator(); + if ((!negated && op == OO_EqualEqual) + || (negated && op == OO_ExclaimEqual)) + { + reportEquals(range, name, op == OO_ExclaimEqual, e->getArg(0), e->getArg(1)); + return; + } + return; + } +} + +void CppunitAssertEquals::reportEquals( + SourceRange range, StringRef name, bool negative, Expr const * lhs, Expr const * rhs) +{ + if (lhs->IgnoreImpCasts()->getType()->isNullPtrType() + != rhs->IgnoreImpCasts()->getType()->isNullPtrType()) + { + return; + } + report( + DiagnosticsEngine::Warning, + ("rather call" + " %select{CPPUNIT_ASSERT_EQUAL|CPPUNIT_ASSERT_EQUAL_MESSAGE}0 when comparing %1 and %2 (or" + " rewrite as an explicit operator %select{==|!=}3 call when the" + " operator itself is the topic)"), + range.getBegin()) + << (name == "CPPUNIT_ASSERT_MESSAGE") << lhs->IgnoreImpCasts()->getType() + << rhs->IgnoreImpCasts()->getType() << negative << range; +} + +loplugin::Plugin::Registration< CppunitAssertEquals > cppunitassertequals("cppunitassertequals"); + +} // namespace + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/crosscast.cxx b/compilerplugins/clang/crosscast.cxx new file mode 100644 index 0000000000..293b8646d1 --- /dev/null +++ b/compilerplugins/clang/crosscast.cxx @@ -0,0 +1,166 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +// Find uses of dynamic_cast that cast between unrelated classes, which is suspicious and might +// indicate a bug. The heuristic used to consider two classes unrelated is that neither derives +// from the other (directly or indirectly) and they do not both virtually derive (directly or +// indirectly) from a common third class. Additionally, class definitions can be attributed with +// SAL_LOPLUGIN_ANNOTATE("crosscast") (from sal/types.h) to suppress false warnings about known-good +// cases casting from or to such a class. + +#ifndef LO_CLANG_SHARED_PLUGINS + +#include +#include + +#include "compat.hxx" +#include "plugin.hxx" + +namespace +{ +void computeVirtualBases(CXXRecordDecl const* decl, std::set* vbases) +{ + assert(vbases != nullptr); + for (auto const& i : decl->bases()) + { + auto const d = i.getType()->getAsCXXRecordDecl(); + if (d == nullptr) + { + continue; + } + if (i.isVirtual()) + { + if (!vbases->insert(d->getCanonicalDecl()).second) + { + // As we track the already computed virtual bases in vbases anyway, we can cheaply + // optimize the case where we see a virtual base again, even though we don't bother + // to optimize the case where we see a non-virtual base multiple times: + continue; + } + } + computeVirtualBases(d, vbases); + } +} + +bool compareVirtualBases(CXXRecordDecl const* decl, std::set& vbases) +{ + for (auto const& i : decl->bases()) + { + auto const d = i.getType()->getAsCXXRecordDecl(); + if (d == nullptr) + { + continue; + } + if (i.isVirtual() && vbases.count(d->getCanonicalDecl()) == 1) + { + return true; + } + if (compareVirtualBases(d, vbases)) + { + return true; + } + } + return false; +} + +bool haveCommonVirtualBase(CXXRecordDecl const* decl1, CXXRecordDecl const* decl2) +{ + std::set vbases; + computeVirtualBases(decl1, &vbases); + return compareVirtualBases(decl2, vbases); +} + +bool isAllowedInCrossCasts(CXXRecordDecl const* decl) +{ + auto const def = decl->getDefinition(); + if (def == nullptr) + { + return false; + } + for (auto const attr : def->specific_attrs()) + { + if (attr->getAnnotation() == "loplugin:crosscast") + { + return true; + } + } + return false; +} + +class CrossCast final : public loplugin::FilteringPlugin +{ +public: + explicit CrossCast(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + bool preRun() override { return compiler.getLangOpts().CPlusPlus; } + + void run() override + { + if (preRun()) + { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + } + + bool VisitCXXDynamicCastExpr(CXXDynamicCastExpr const* expr) + { + if (ignoreLocation(expr)) + { + return true; + } + auto const t2 = expr->getTypeAsWritten(); + if (t2->isVoidPointerType()) + { + return true; + } + auto const d2 = t2->getPointeeCXXRecordDecl(); + if (d2 == nullptr) + { + return true; + } + auto const t1 = compat::getSubExprAsWritten(expr)->getType(); + auto t1a = t1; + if (auto const t = t1a->getAs()) + { + t1a = t->getPointeeType(); + } + auto const d1 = t1a->getAsCXXRecordDecl(); + if (d1 == nullptr) + { + return true; + } + if (d1->getCanonicalDecl() == d2->getCanonicalDecl() || d1->isDerivedFrom(d2) + || d2->isDerivedFrom(d1) || haveCommonVirtualBase(d1, d2)) + { + return true; + } + if (isAllowedInCrossCasts(d1) || isAllowedInCrossCasts(d2)) + { + return true; + } + if (suppressWarningAt(expr->getBeginLoc())) + { + return true; + } + report(DiagnosticsEngine::Warning, "suspicious dynamic cross cast from %0 to %1", + expr->getExprLoc()) + << t1 << t2 << expr->getSourceRange(); + return true; + } +}; + +loplugin::Plugin::Registration crosscast("crosscast"); +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/cstylecast.cxx b/compilerplugins/clang/cstylecast.cxx new file mode 100644 index 0000000000..d51eb75b3d --- /dev/null +++ b/compilerplugins/clang/cstylecast.cxx @@ -0,0 +1,707 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include +#include +#include + +#include "compat.hxx" +#include "plugin.hxx" + +// +// We don't like using C-style casts in C++ code. Similarly, warn about function-style casts (which +// are semantically equivalent to C-style casts) that are not semantically equivalent to static_cast +// and should rather be written as const_cast or reinterpret_cast. +// + +namespace { + +bool areSimilar(QualType type1, QualType type2) { + auto t1 = type1.getCanonicalType().getTypePtr(); + auto t2 = type2.getCanonicalType().getTypePtr(); + for (;;) { + if (t1->isPointerType()) { + if (!t2->isPointerType()) { + return false; + } + auto t1a = t1->getAs(); + auto t2a = t2->getAs(); + t1 = t1a->getPointeeType().getTypePtr(); + t2 = t2a->getPointeeType().getTypePtr(); + } else if (t1->isMemberPointerType()) { + if (!t2->isMemberPointerType()) { + return false; + } + auto t1a = t1->getAs(); + auto t2a = t2->getAs(); + if (t1a->getClass()->getCanonicalTypeInternal() + != t2a->getClass()->getCanonicalTypeInternal()) + { + return false; + } + t1 = t1a->getPointeeType().getTypePtr(); + t2 = t2a->getPointeeType().getTypePtr(); + } else if (t1->isConstantArrayType()) { + if (!t2->isConstantArrayType()) { + return false; + } + auto t1a = static_cast( + t1->getAsArrayTypeUnsafe()); + auto t2a = static_cast( + t2->getAsArrayTypeUnsafe()); + if (t1a->getSize() != t2a->getSize()) { + return false; + } + t1 = t1a->getElementType().getTypePtr(); + t2 = t2a->getElementType().getTypePtr(); + } else if (t1->isIncompleteArrayType()) { + if (!t2->isIncompleteArrayType()) { + return false; + } + auto t1a = static_cast( + t1->getAsArrayTypeUnsafe()); + auto t2a = static_cast( + t2->getAsArrayTypeUnsafe()); + t1 = t1a->getElementType().getTypePtr(); + t2 = t2a->getElementType().getTypePtr(); + } else { + return false; + } + if (t1 == t2) { + return true; + } + } +} + +QualType resolvePointers(QualType type) { + while (type->isPointerType()) { + type = type->getAs()->getPointeeType(); + } + return type; +} + +bool isLiteralLike(Expr const * expr) { + expr = expr->IgnoreParenImpCasts(); + if (isa(expr) || isa(expr) || isa(expr) + || isa(expr) || isa(expr) + || isa(expr) || isa(expr)) + { + return true; + } + if (auto const e = dyn_cast(expr)) { + auto const d = e->getDecl(); + if (isa(d)) { + return true; + } + if (auto const v = dyn_cast(d)) { + if (d->getType().isConstQualified()) { + if (auto const init = v->getAnyInitializer()) { + return isLiteralLike(init); + } + } + } + return false; + } + if (auto const e = dyn_cast(expr)) { + auto const k = e->getKind(); + return k == UETT_SizeOf || k == UETT_AlignOf; + } + if (auto const e = dyn_cast(expr)) { + auto const k = e->getOpcode(); + if (k == UO_Plus || k == UO_Minus || k == UO_Not || k == UO_LNot) { + return isLiteralLike(e->getSubExpr()); + } + return false; + } + if (auto const e = dyn_cast(expr)) { + auto const k = e->getOpcode(); + if (k == BO_Mul || k == BO_Div || k == BO_Rem || k == BO_Add || k == BO_Sub || k == BO_Shl + || k == BO_Shr || k == BO_And || k == BO_Xor || k == BO_Or) + { + return isLiteralLike(e->getLHS()) && isLiteralLike(e->getRHS()); + } + return false; + } + if (auto const e = dyn_cast(expr)) { + auto const t = e->getTypeAsWritten(); + return (t->isArithmeticType() || t->isEnumeralType()) + && isLiteralLike(e->getSubExprAsWritten()); + } + return false; +} + +bool canBeUsedForFunctionalCast(TypeSourceInfo const * info) { + // Must be or , lets approximate that here: + assert(info != nullptr); + auto const type = info->getType(); + if (type.hasLocalQualifiers()) { + return false; + } + if (auto const t = dyn_cast(type)) { + if (!(t->isInteger() || t->isFloatingPoint())) { + return false; + } + auto const loc = info->getTypeLoc().castAs(); + return + (int(loc.hasWrittenSignSpec()) + int(loc.hasWrittenWidthSpec()) + + int(loc.hasWrittenTypeSpec())) + == 1; + } + if (isa(type) || isa(type) || isa(type) + || isa(type) || isa(type)) + { + return true; + } + if (auto const t = dyn_cast(type)) { + return t->getKeyword() == compat::ElaboratedTypeKeyword::None; + } + return false; +} + +class CStyleCast: + public loplugin::FilteringRewritePlugin +{ +public: + explicit CStyleCast(loplugin::InstantiationData const & data): FilteringRewritePlugin(data) + {} + + virtual void run() override { + if (compiler.getLangOpts().CPlusPlus) { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + } + + bool TraverseInitListExpr(InitListExpr * expr, DataRecursionQueue * queue = nullptr) { + return WalkUpFromInitListExpr(expr) + && TraverseSynOrSemInitListExpr( + expr->isSemanticForm() ? expr : expr->getSemanticForm(), queue); + } + + bool TraverseLinkageSpecDecl(LinkageSpecDecl * decl); + + bool VisitCStyleCastExpr(const CStyleCastExpr * expr); + + bool VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr const * expr); + +private: + bool isConstCast(QualType from, QualType to); + + bool isFromCIncludeFile(SourceLocation spellingLocation) const; + + bool isSharedCAndCppCode(SourceLocation location) const; + + bool isLastTokenOfImmediateMacroBodyExpansion( + SourceLocation loc, SourceLocation * macroEnd = nullptr) const; + + bool rewriteArithmeticCast(CStyleCastExpr const * expr, char const ** replacement); + + void reportCast(ExplicitCastExpr const * expr, char const * performsHint); + + unsigned int externCContexts_ = 0; + std::set rewritten_; + // needed when rewriting in macros, in general to avoid "double code replacement, possible + // plugin error" warnings, and in particular to avoid adding multiple sets of parens around + // sub-exprs + std::set rewrittenSubExprs_; +}; + +const char * recommendedFix(clang::CastKind ck) { + switch(ck) { + case CK_IntegralToPointer: return "reinterpret_cast"; + case CK_PointerToIntegral: return "reinterpret_cast"; + case CK_BaseToDerived: return "static_cast"; + default: return nullptr; + } +} + +bool CStyleCast::TraverseLinkageSpecDecl(LinkageSpecDecl * decl) { + assert(externCContexts_ != std::numeric_limits::max()); //TODO + ++externCContexts_; + bool ret = RecursiveASTVisitor::TraverseLinkageSpecDecl(decl); + assert(externCContexts_ != 0); + --externCContexts_; + return ret; +} + +bool CStyleCast::VisitCStyleCastExpr(const CStyleCastExpr * expr) { + if (ignoreLocation(expr)) { + return true; + } + // casting to void is typically used when a parameter or field is only used in + // debug mode, and we want to eliminate an "unused" warning + if( expr->getCastKind() == CK_ToVoid ) { + return true; + } + if (isSharedCAndCppCode(expr->getBeginLoc())) { + return true; + } + char const * perf = nullptr; + if( expr->getCastKind() == CK_IntegralCast ) { + if (rewriteArithmeticCast(expr, &perf)) { + return true; + } + } else if( expr->getCastKind() == CK_NoOp ) { + if (!((expr->getSubExpr()->getType()->isPointerType() + && expr->getType()->isPointerType()) + || expr->getTypeAsWritten()->isReferenceType())) + { + if (rewriteArithmeticCast(expr, &perf)) { + return true; + } + } + if (isConstCast( + expr->getSubExprAsWritten()->getType(), + expr->getTypeAsWritten())) + { + perf = "const_cast"; + } + } + reportCast(expr, perf); + return true; +} + +bool CStyleCast::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr const * expr) { + if (ignoreLocation(expr)) { + return true; + } + char const * perf = nullptr; + switch (expr->getCastKind()) { + case CK_ConstructorConversion: + case CK_Dependent: //TODO: really filter out all of these? + case CK_IntegralCast: + case CK_IntegralToBoolean: + case CK_ToVoid: + return true; + case CK_NoOp: + if (isConstCast( + expr->getSubExprAsWritten()->getType(), + expr->getTypeAsWritten())) + { + perf = "const_cast"; + break; + } + return true; //TODO: really filter out all of these? + default: + break; + } + reportCast(expr, perf); + return true; +} + +bool CStyleCast::isConstCast(QualType from, QualType to) { + if (to->isReferenceType() + && to->getAs()->getPointeeType()->isObjectType()) + { + if (!from->isObjectType()) { + return false; + } + from = compiler.getASTContext().getPointerType(from); + to = compiler.getASTContext().getPointerType( + to->getAs()->getPointeeType()); + } else { + if (from->isArrayType()) { + from = compiler.getASTContext().getPointerType( + from->getAsArrayTypeUnsafe()->getElementType()); + } else if (from->isFunctionType()) { + compiler.getASTContext().getPointerType(from); + } + } + return areSimilar(from, to); +} + +bool CStyleCast::isFromCIncludeFile(SourceLocation spellingLocation) const { + return !compiler.getSourceManager().isInMainFile(spellingLocation) + && (StringRef( + compiler.getSourceManager().getPresumedLoc(spellingLocation) + .getFilename()) + .endswith(".h")); +} + +bool CStyleCast::isSharedCAndCppCode(SourceLocation location) const { + while (compiler.getSourceManager().isMacroArgExpansion(location)) { + location = compiler.getSourceManager().getImmediateMacroCallerLoc( + location); + } + // Assume that code is intended to be shared between C and C++ if it comes + // from an include file ending in .h, and is either in an extern "C" context + // or the body of a macro definition: + return + isFromCIncludeFile(compiler.getSourceManager().getSpellingLoc(location)) + && (externCContexts_ != 0 + || compiler.getSourceManager().isMacroBodyExpansion(location)); +} + +bool CStyleCast::isLastTokenOfImmediateMacroBodyExpansion( + SourceLocation loc, SourceLocation * macroEnd) const +{ + assert(compiler.getSourceManager().isMacroBodyExpansion(loc)); + auto const spell = compiler.getSourceManager().getSpellingLoc(loc); + auto name = Lexer::getImmediateMacroName( + loc, compiler.getSourceManager(), compiler.getLangOpts()); + while (name.startswith("\\\n")) { + name = name.drop_front(2); + while (!name.empty() + && (name.front() == ' ' || name.front() == '\t' || name.front() == '\n' + || name.front() == '\v' || name.front() == '\f')) + { + name = name.drop_front(1); + } + } + auto const MI + = (compiler.getPreprocessor().getMacroDefinitionAtLoc( + &compiler.getASTContext().Idents.get(name), spell) + .getMacroInfo()); + assert(MI != nullptr); + if (spell == MI->getDefinitionEndLoc()) { + if (macroEnd != nullptr) { + *macroEnd = compat::getImmediateExpansionRange(compiler.getSourceManager(), loc).second; + } + return true; + } + return false; +} + +bool CStyleCast::rewriteArithmeticCast(CStyleCastExpr const * expr, char const ** replacement) { + assert(replacement != nullptr); + auto const sub = expr->getSubExprAsWritten(); + auto const functional = isLiteralLike(sub) + && canBeUsedForFunctionalCast(expr->getTypeInfoAsWritten()); + *replacement = functional ? "functional cast" : "static_cast"; + if (rewriter == nullptr) { + return false; + } + // Doing modifications for a chain of C-style casts as in + // + // (foo)(bar)(baz)x + // + // leads to unpredictable results, so only rewrite them one at a time, starting with the + // outermost: + if (auto const e = dyn_cast(sub)) { + rewrittenSubExprs_.insert(e); + } + if (rewrittenSubExprs_.find(expr) != rewrittenSubExprs_.end()) { + return false; + } + // Two or four ranges to replace: + // First is the CStyleCast's LParen, plus following whitespace, replaced with either "" or + // "static_cast<". (TODO: insert space before "static_cast<" when converting "else(int)...".) + // Second is the CStyleCast's RParen, plus preceding and following whitespace, replaced with + // either "" or ">". + // If the sub expr is not a ParenExpr, third is the sub expr's begin, inserting "(", and fourth + // is the sub expr's end, inserting ")". + // (The reason the second and third are not combined is in case there's a comment between them.) + auto firstBegin = expr->getLParenLoc(); + auto secondBegin = expr->getRParenLoc(); + while (compiler.getSourceManager().isMacroArgExpansion(firstBegin) + && compiler.getSourceManager().isMacroArgExpansion(secondBegin) + && (compat::getImmediateExpansionRange(compiler.getSourceManager(), firstBegin) + == compat::getImmediateExpansionRange(compiler.getSourceManager(), secondBegin))) + { + firstBegin = compiler.getSourceManager().getImmediateSpellingLoc(firstBegin); + secondBegin = compiler.getSourceManager().getImmediateSpellingLoc(secondBegin); + } + if (compiler.getSourceManager().isMacroBodyExpansion(firstBegin) + && compiler.getSourceManager().isMacroBodyExpansion(secondBegin) + && (compiler.getSourceManager().getImmediateMacroCallerLoc(firstBegin) + == compiler.getSourceManager().getImmediateMacroCallerLoc(secondBegin))) + { + firstBegin = compiler.getSourceManager().getSpellingLoc(firstBegin); + secondBegin = compiler.getSourceManager().getSpellingLoc(secondBegin); + } + auto third = sub->getBeginLoc(); + auto fourth = sub->getEndLoc(); + bool macro = false; + // Ensure that + // + // #define FOO(x) (int)x + // FOO(y) + // + // is changed to + // + // #define FOO(x) static_cast(x) + // FOO(y) + // + // instead of + // + // #define FOO(x) static_castx + // FOO((y)) + while (compiler.getSourceManager().isMacroArgExpansion(third) + && compiler.getSourceManager().isMacroArgExpansion(fourth) + && (compat::getImmediateExpansionRange(compiler.getSourceManager(), third) + == compat::getImmediateExpansionRange(compiler.getSourceManager(), fourth)) + && compiler.getSourceManager().isAtStartOfImmediateMacroExpansion(third)) + //TODO: check fourth is at end of immediate macro expansion, but + // SourceManager::isAtEndOfImmediateMacroExpansion requires a location pointing at the + // character end of the last token + { + auto const range = compat::getImmediateExpansionRange(compiler.getSourceManager(), third); + third = range.first; + fourth = range.second; + macro = true; + assert(third.isValid()); + } + while (compiler.getSourceManager().isMacroArgExpansion(third) + && compiler.getSourceManager().isMacroArgExpansion(fourth) + && (compat::getImmediateExpansionRange(compiler.getSourceManager(), third) + == compat::getImmediateExpansionRange(compiler.getSourceManager(), fourth))) + { + third = compiler.getSourceManager().getImmediateSpellingLoc(third); + fourth = compiler.getSourceManager().getImmediateSpellingLoc(fourth); + } + if (isa(sub)) { + // Ensure that with + // + // #define FOO (x) + // + // a cast like + // + // (int) FOO + // + // is changed to + // + // static_cast(FOO) + // + // instead of + // + // static_castFOO + for (;; macro = true) { + if (!(compiler.getSourceManager().isMacroBodyExpansion(third) + && compiler.getSourceManager().isMacroBodyExpansion(fourth) + && (compiler.getSourceManager().getImmediateMacroCallerLoc(third) + == compiler.getSourceManager().getImmediateMacroCallerLoc(fourth)) + && compiler.getSourceManager().isAtStartOfImmediateMacroExpansion(third) + && isLastTokenOfImmediateMacroBodyExpansion(fourth))) + { + if (!macro) { + third = fourth = SourceLocation(); + } + break; + } + auto const range = compat::getImmediateExpansionRange( + compiler.getSourceManager(), third); + third = range.first; + fourth = range.second; + assert(third.isValid()); + } + if (third.isValid() && compiler.getSourceManager().isMacroBodyExpansion(third) + && compiler.getSourceManager().isMacroBodyExpansion(fourth) + && (compiler.getSourceManager().getImmediateMacroCallerLoc(third) + == compiler.getSourceManager().getImmediateMacroCallerLoc(fourth))) + { + third = compiler.getSourceManager().getSpellingLoc(third); + fourth = compiler.getSourceManager().getSpellingLoc(fourth); + assert(third.isValid()); + } + } else { + // Ensure that a cast like + // + // (int)LONG_MAX + // + // (where LONG_MAX expands to __LONG_MAX__, which in turn is a built-in expanding to a value + // like 9223372036854775807L) is changed to + // + // int(LONG_MAX) + // + // instead of trying to add the parentheses to the built-in __LONG_MAX__ definition: + for (;;) { + if (!(compiler.getSourceManager().isMacroBodyExpansion(third) + && compiler.getSourceManager().isMacroBodyExpansion(fourth) + && (compiler.getSourceManager().getImmediateMacroCallerLoc(third) + == compiler.getSourceManager().getImmediateMacroCallerLoc(fourth)) + && compiler.getSourceManager().isAtStartOfImmediateMacroExpansion(third))) + // TODO: check that fourth is at end of immediate macro expansion (but + // SourceManager::isAtEndOfImmediateMacroExpansion wants a location pointing at the + // character end) + { + break; + } + auto const range = compat::getImmediateExpansionRange( + compiler.getSourceManager(), third); + third = range.first; + fourth = range.second; + } + // ...and additionally asymmetrically unwind macros only at the start or end, for code like + // + // (long)ubidi_getVisualIndex(...) + // + // (in editeng/source/editeng/impedit2.cxx) where ubidi_getVisualIndex is an object-like + // macro, or + // + // #define YY_SC_TO_UI(c) ((unsigned int) (unsigned char) c) + // + // (in hwpfilter/source/lexer.cxx): + if (!fourth.isMacroID()) { + while (compiler.getSourceManager().isMacroBodyExpansion(third) + && compiler.getSourceManager().isAtStartOfImmediateMacroExpansion(third, &third)) + {} + } else if (compiler.getSourceManager().isMacroBodyExpansion(fourth)) { + while (compiler.getSourceManager().isMacroArgExpansion(third) + && compiler.getSourceManager().isAtStartOfImmediateMacroExpansion(third, &third)) {} + } + if (!third.isMacroID()) { + while (compiler.getSourceManager().isMacroBodyExpansion(fourth) + && isLastTokenOfImmediateMacroBodyExpansion(fourth, &fourth)) + {} + } else if (compiler.getSourceManager().isMacroBodyExpansion(third)) { + while (compiler.getSourceManager().isMacroArgExpansion(fourth, &fourth)) {} + } + if (compiler.getSourceManager().isMacroBodyExpansion(third) + && compiler.getSourceManager().isMacroBodyExpansion(fourth) + && (compiler.getSourceManager().getImmediateMacroCallerLoc(third) + == compiler.getSourceManager().getImmediateMacroCallerLoc(fourth))) + { + third = compiler.getSourceManager().getSpellingLoc(third); + fourth = compiler.getSourceManager().getSpellingLoc(fourth); + } + assert(third.isValid()); + } + if (firstBegin.isMacroID() || secondBegin.isMacroID() || (third.isValid() && third.isMacroID()) + || (fourth.isValid() && fourth.isMacroID())) + { + if (isDebugMode()) { + report( + DiagnosticsEngine::Fatal, + "TODO: cannot rewrite C-style cast in macro, needs investigation", + expr->getExprLoc()) + << expr->getSourceRange(); + } + return false; + } + unsigned firstLen = Lexer::MeasureTokenLength( + firstBegin, compiler.getSourceManager(), compiler.getLangOpts()); + for (auto l = firstBegin.getLocWithOffset(std::max(firstLen, 1));; + l = l.getLocWithOffset(1)) + { + unsigned n = Lexer::MeasureTokenLength( + l, compiler.getSourceManager(), compiler.getLangOpts()); + if (n != 0) { + break; + } + ++firstLen; + } + unsigned secondLen = Lexer::MeasureTokenLength( + secondBegin, compiler.getSourceManager(), compiler.getLangOpts()); + for (auto l = secondBegin.getLocWithOffset(std::max(secondLen, 1));; + l = l.getLocWithOffset(1)) + { + unsigned n = Lexer::MeasureTokenLength( + l, compiler.getSourceManager(), compiler.getLangOpts()); + if (n != 0) { + break; + } + ++secondLen; + } + for (;;) { + auto l = secondBegin.getLocWithOffset(-1); + auto const c = compiler.getSourceManager().getCharacterData(l)[0]; + if (c == '\n') { + if (compiler.getSourceManager().getCharacterData(l.getLocWithOffset(-1))[0] == '\\') { + break; + } + } else if (!(c == ' ' || c == '\t' || c == '\v' || c == '\f')) { + break; + } + secondBegin = l; + ++secondLen; + } + if (rewritten_.insert(firstBegin).second) { + if (!replaceText(firstBegin, firstLen, functional ? "" : "static_cast<")) { + if (isDebugMode()) { + report( + DiagnosticsEngine::Fatal, "TODO: cannot rewrite #1, needs investigation", + firstBegin); + report( + DiagnosticsEngine::Note, "when rewriting this C-style cast", expr->getExprLoc()) + << expr->getSourceRange(); + } + return false; + } + if (!replaceText(secondBegin, secondLen, functional ? "" : ">")) { + //TODO: roll back + if (isDebugMode()) { + report( + DiagnosticsEngine::Fatal, "TODO: cannot rewrite #2, needs investigation", + secondBegin); + report( + DiagnosticsEngine::Note, "when rewriting this C-style cast", expr->getExprLoc()) + << expr->getSourceRange(); + } + return false; + } + } + if (third.isValid()) { + if (rewritten_.insert(third).second) { + if (!insertTextBefore(third, "(")) { + //TODO: roll back + if (isDebugMode()) { + report( + DiagnosticsEngine::Fatal, "TODO: cannot rewrite #3, needs investigation", + third); + report( + DiagnosticsEngine::Note, "when rewriting this C-style cast", + expr->getExprLoc()) + << expr->getSourceRange(); + } + return false; + } + if (!insertTextAfterToken(fourth, ")")) { + //TODO: roll back + if (isDebugMode()) { + report( + DiagnosticsEngine::Fatal, "TODO: cannot rewrite #4, needs investigation", + third); + report( + DiagnosticsEngine::Note, "when rewriting this C-style cast", + expr->getExprLoc()) + << expr->getSourceRange(); + } + return false; + } + } + } + return true; +} + +void CStyleCast::reportCast(ExplicitCastExpr const * expr, char const * performsHint) { + std::string incompFrom; + std::string incompTo; + if( expr->getCastKind() == CK_BitCast ) { + if (resolvePointers(expr->getSubExprAsWritten()->getType()) + ->isIncompleteType()) + { + incompFrom = "incomplete "; + } + if (resolvePointers(expr->getType())->isIncompleteType()) { + incompTo = "incomplete "; + } + } + if (performsHint == nullptr) { + performsHint = recommendedFix(expr->getCastKind()); + } + std::string performs; + if (performsHint != nullptr) { + performs = std::string(" (performs: ") + performsHint + ")"; + } + report( + DiagnosticsEngine::Warning, "%select{C|Function}0-style cast from %1%2 to %3%4%5 (%6)", + expr->getSourceRange().getBegin()) + << isa(expr) + << incompFrom << expr->getSubExprAsWritten()->getType() + << incompTo << expr->getTypeAsWritten() << performs + << expr->getCastKindName() + << expr->getSourceRange(); +} + +loplugin::Plugin::Registration< CStyleCast > X("cstylecast", true); + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/data.cxx b/compilerplugins/clang/data.cxx new file mode 100644 index 0000000000..9cff5426fc --- /dev/null +++ b/compilerplugins/clang/data.cxx @@ -0,0 +1,89 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef LO_CLANG_SHARED_PLUGINS + +#include "check.hxx" +#include "compat.hxx" +#include "plugin.hxx" + +// For std::array or std::vector x, replace &x[0] with x.data(). + +namespace +{ +class Data final : public loplugin::FilteringPlugin +{ +public: + explicit Data(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + bool VisitUnaryOperator(UnaryOperator const* expr) + { + if (ignoreLocation(expr)) + { + return true; + } + if (expr->getOpcode() != UO_AddrOf) + { + return true; + } + auto const e1 = dyn_cast(expr->getSubExpr()->IgnoreParenImpCasts()); + if (e1 == nullptr) + { + return true; + } + if (e1->getOperator() != OO_Subscript) + { + return true; + } + auto const t = e1->getArg(0)->getType(); + auto const chk = loplugin::TypeCheck(t); + if (!(chk.Class("array").StdNamespace() || chk.Class("vector").StdNamespace())) + { + return true; + } + auto const e2 = e1->getArg(1); + if (e2->isValueDependent()) + { + return true; + } + APSInt v; + if (!compat::EvaluateAsInt(e2, v, compiler.getASTContext())) + { + return true; + } + if (v != 0) + { + return true; + } + report(DiagnosticsEngine::Warning, + "use 'data' member function to access first element of %0", expr->getExprLoc()) + << t << expr->getSourceRange(); + return true; + } + + bool preRun() override { return compiler.getLangOpts().CPlusPlus; } + + void run() override + { + if (preRun()) + { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + } +}; + +static loplugin::Plugin::Registration data("data"); + +} // namespace + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/datamembershadow.cxx b/compilerplugins/clang/datamembershadow.cxx new file mode 100644 index 0000000000..93f65de667 --- /dev/null +++ b/compilerplugins/clang/datamembershadow.cxx @@ -0,0 +1,126 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef LO_CLANG_SHARED_PLUGINS + +#include +#include +#include +#include + +#include "plugin.hxx" +#include "config_clang.h" +#include "clang/AST/CXXInheritance.h" + +/** + * Check for data member being shadowed. + * + * @TODO check for any members in superclass hierarchy with duplicate names, + * regardless of their visibility, + * more specific names will make the code easier to read + */ +namespace +{ + +class DataMemberShadow: + public loplugin::FilteringPlugin +{ +public: + explicit DataMemberShadow(loplugin::InstantiationData const & data): + FilteringPlugin(data) {} + + virtual void run() override { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + + bool VisitFieldDecl(FieldDecl const *); +}; + +bool DataMemberShadow::VisitFieldDecl(FieldDecl const * fieldDecl) +{ + if (ignoreLocation(fieldDecl)) { + return true; + } + StringRef aFileName = getFilenameOfLocation( + compiler.getSourceManager().getSpellingLoc(fieldDecl->getBeginLoc())); + + // FIXME complex stuff to fix later + + if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/chart2/source/")) + return true; + if (loplugin::isSamePathname(aFileName, SRCDIR "/include/sfx2/recentdocsview.hxx")) + return true; + if (loplugin::isSamePathname(aFileName, SRCDIR "/include/sfx2/templatelocalview.hxx")) + return true; + if (loplugin::isSamePathname(aFileName, SRCDIR "/store/source/stortree.hxx") + || loplugin::isSamePathname(aFileName, SRCDIR "/store/source/stordata.hxx")) + return true; + if (loplugin::isSamePathname(aFileName, SRCDIR "/sw/source/uibase/inc/dbtree.hxx")) + return true; + + const CXXRecordDecl* parentCXXRecordDecl = dyn_cast(fieldDecl->getDeclContext()); + if (!parentCXXRecordDecl) { + return true; + } + + fieldDecl = fieldDecl->getCanonicalDecl(); + + auto BaseMatchesCallback = [&](const CXXBaseSpecifier *cxxBaseSpecifier, CXXBasePath& Paths) + { + if (!cxxBaseSpecifier->getType().getTypePtr()) + return false; + const CXXRecordDecl* baseCXXRecordDecl = cxxBaseSpecifier->getType()->getAsCXXRecordDecl(); + if (!baseCXXRecordDecl) + return false; + if (baseCXXRecordDecl->isInvalidDecl()) + return false; + for (const FieldDecl* baseFieldDecl : baseCXXRecordDecl->fields()) + { + // TODO look for overlaps even with private fields + + if (baseFieldDecl->getAccess() == AS_private + || !baseFieldDecl->getDeclName().isIdentifier() + || fieldDecl->getName() != baseFieldDecl->getName()) { + continue; + } + std::string sPath; + for (CXXBasePathElement const & pathElement : Paths) { + if (!sPath.empty()) { + sPath += "->"; + } + sPath += pathElement.Class->getNameAsString(); + } + sPath += "->"; + sPath += baseCXXRecordDecl->getNameAsString(); + report(DiagnosticsEngine::Warning, + "data member %0 is shadowing member in superclass, through inheritance path %1", + fieldDecl->getBeginLoc()) + << fieldDecl->getName() + << sPath + << fieldDecl->getSourceRange(); + report(DiagnosticsEngine::Note, + "superclass member here", + baseFieldDecl->getBeginLoc()) + << baseFieldDecl->getSourceRange(); + } + return false; + }; + + CXXBasePaths aPaths; + parentCXXRecordDecl->lookupInBases(BaseMatchesCallback, aPaths); + return true; +} + +loplugin::Plugin::Registration< DataMemberShadow > datamembershadow("datamembershadow", true); + +} + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/dbgunhandledexception.cxx b/compilerplugins/clang/dbgunhandledexception.cxx new file mode 100644 index 0000000000..e6c1f157cc --- /dev/null +++ b/compilerplugins/clang/dbgunhandledexception.cxx @@ -0,0 +1,128 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * Based on LLVM/Clang. + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + */ + +#ifndef LO_CLANG_SHARED_PLUGINS + +#include "check.hxx" +#include "plugin.hxx" +#include +#include +#include + +namespace loplugin +{ +/* +This is a compile check. + +Check that DBG_UNHANDLED_EXCEPTION is always the first statement in a catch block, otherwise +it does not work properly. +*/ + +class DbgUnhandledException : public loplugin::FilteringPlugin +{ +public: + explicit DbgUnhandledException(InstantiationData const& data); + virtual void run() override; + bool VisitCallExpr(CallExpr const* call); + bool TraverseCXXCatchStmt(CXXCatchStmt*); + bool PreTraverseCXXCatchStmt(CXXCatchStmt*); + bool PostTraverseCXXCatchStmt(CXXCatchStmt*, bool traverseOk); + +private: + std::stack currCatchStmt; +}; + +DbgUnhandledException::DbgUnhandledException(const InstantiationData& data) + : FilteringPlugin(data) +{ +} + +void DbgUnhandledException::run() +{ + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); +} + +bool DbgUnhandledException::PreTraverseCXXCatchStmt(CXXCatchStmt* catchStmt) +{ + currCatchStmt.push(catchStmt); + return true; +} + +bool DbgUnhandledException::PostTraverseCXXCatchStmt(CXXCatchStmt* catchStmt, bool) +{ + assert(currCatchStmt.top() == catchStmt); + (void)catchStmt; + currCatchStmt.pop(); + return true; +} + +bool DbgUnhandledException::TraverseCXXCatchStmt(CXXCatchStmt* catchStmt) +{ + if (!PreTraverseCXXCatchStmt(catchStmt)) + return false; + bool ret = RecursiveASTVisitor::TraverseCXXCatchStmt(catchStmt); + if (!PostTraverseCXXCatchStmt(catchStmt, ret)) + return false; + return ret; +} + +bool DbgUnhandledException::VisitCallExpr(const CallExpr* call) +{ + if (ignoreLocation(call)) + return true; + const FunctionDecl* func = call->getDirectCallee(); + if (!func) + return true; + + if (!func->getIdentifier() || func->getName() != "DbgUnhandledException") + return true; + + if (currCatchStmt.empty()) + { + report(DiagnosticsEngine::Warning, "DBG_UNHANDLED_EXCEPTION outside catch block", + call->getBeginLoc()); + return true; + } + auto catchBlock = dyn_cast(currCatchStmt.top()->getHandlerBlock()); + if (!catchBlock) + { + report(DiagnosticsEngine::Warning, + "something wrong with DBG_UNHANDLED_EXCEPTION, no CompoundStmt?", + call->getBeginLoc()); + return true; + } + if (catchBlock->size() < 1) + { + report(DiagnosticsEngine::Warning, + "something wrong with DBG_UNHANDLED_EXCEPTION, CompoundStmt size == 0?", + call->getBeginLoc()); + return true; + } + + Stmt const* firstStmt = *catchBlock->body_begin(); + if (auto exprWithCleanups = dyn_cast(firstStmt)) + firstStmt = exprWithCleanups->getSubExpr(); + if (firstStmt != call) + { + report(DiagnosticsEngine::Warning, + "DBG_UNHANDLED_EXCEPTION must be first statement in catch block", + call->getBeginLoc()); + } + return true; +} + +static Plugin::Registration dbgunhandledexception("dbgunhandledexception"); + +} // namespace + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/derefnullptr.cxx b/compilerplugins/clang/derefnullptr.cxx new file mode 100644 index 0000000000..35c4c7adcf --- /dev/null +++ b/compilerplugins/clang/derefnullptr.cxx @@ -0,0 +1,52 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef LO_CLANG_SHARED_PLUGINS + +#include "plugin.hxx" + +namespace { + +class DerefNullPtr: + public loplugin::FilteringPlugin +{ +public: + explicit DerefNullPtr(loplugin::InstantiationData const & data): + FilteringPlugin(data) {} + + void run() override + { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } + + bool VisitUnaryOperator(UnaryOperator const * op); +}; + +bool DerefNullPtr::VisitUnaryOperator(UnaryOperator const * op) { + if (op->getOpcode() != UO_Deref) { + return true; + } + if (!ignoreLocation(op) + && (op->getSubExpr()->IgnoreParenCasts()->isNullPointerConstant( + compiler.getASTContext(), Expr::NPC_ValueDependentIsNotNull/*TODO*/) + != Expr::NPCK_NotNull)) + { + report( + DiagnosticsEngine::Warning, "null pointer dereference", + op->getBeginLoc()) + << op->getSourceRange(); + } + return true; +} + +loplugin::Plugin::Registration derefnullptr("derefnullptr"); + +} + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/dllprivate.cxx b/compilerplugins/clang/dllprivate.cxx new file mode 100644 index 0000000000..5fbace1010 --- /dev/null +++ b/compilerplugins/clang/dllprivate.cxx @@ -0,0 +1,86 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef LO_CLANG_SHARED_PLUGINS + +#include "plugin.hxx" + +namespace { + +class DllPrivate final: + public loplugin::FilteringPlugin +{ +public: + explicit DllPrivate(loplugin::InstantiationData const & data): FilteringPlugin(data) + {} + + bool VisitNamedDecl(NamedDecl const * decl) { + if (!decl->getLocation().isInvalid()&&ignoreLocation(decl)) { + return true; + } + auto a = decl->getAttr(); + if (a == nullptr || a->getVisibility() != VisibilityAttr::Hidden) { + return true; + } + if (compiler.getSourceManager().isMacroBodyExpansion( + decl->getLocation()) + && (Lexer::getImmediateMacroName( + decl->getLocation(), compiler.getSourceManager(), + compiler.getLangOpts()) + == "Q_OBJECT")) // from /usr/include/QtCore/qobjectdefs.h + { + return true; + } + auto p = dyn_cast(decl->getDeclContext()); + if (p == nullptr) { + report( + DiagnosticsEngine::Warning, + "top-level declaration redundantly marked as DLLPRIVATE", + a->getLocation()) + << decl->getSourceRange(); + } else if (p->getVisibility() == HiddenVisibility) { + report( + DiagnosticsEngine::Warning, + ("declaration nested in DLLPRIVATE declaration redundantly" + " marked as DLLPRIVATE"), + a->getLocation()) + << decl->getSourceRange(); + report( + DiagnosticsEngine::Note, "parent declaration is here", + p->getLocation()) + << p->getSourceRange(); + } + return true; + } + + bool preRun() override { + // DISABLE_DYNLOADING makes SAL_DLLPUBLIC_{EXPORT,IMPORT,TEMPLATE} expand + // to visibility("hidden") attributes, which would cause bogus warnings + // here (e.g., in UBSan builds that explicitly define DISABLE_DYNLOADING + // in jurt/source/pipe/staticsalhack.cxx); alternatively, change + // include/sal/types.h to make those SAL_DLLPUBLIC_* expand to nothing + // for DISABLE_DYNLOADING: + return !compiler.getPreprocessor().getIdentifierInfo("DISABLE_DYNLOADING") + ->hasMacroDefinition(); + } + + void run() override { + if (preRun()) { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + } +}; + +static loplugin::Plugin::Registration dllprivate("dllprivate"); + +} // namespace + +#endif // LO_CLANG_SHARED_PLUGINS + + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/duplicate-defines.cxx b/compilerplugins/clang/duplicate-defines.cxx new file mode 100644 index 0000000000..74a95f2cca --- /dev/null +++ b/compilerplugins/clang/duplicate-defines.cxx @@ -0,0 +1,136 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * Based on LLVM/Clang. + * + * This file is distributed under the University of Illinois Open Source + * License. See LICENSE.TXT for details. + * + */ + +#include +#include +#include + +#include "plugin.hxx" + +#include +#include +#include +#include +#include + +/// Finds duplicated preprocessor defines, which generally indicate that some definition +/// needs to be centralised somewhere. + +namespace +{ +struct Entry +{ + clang::SourceLocation m_aLoc; +}; + +class DuplicateDefines : public clang::PPCallbacks, public loplugin::Plugin +{ +public: + explicit DuplicateDefines(const loplugin::InstantiationData& data); + virtual void run() override; + void MacroDefined(const Token& MacroNameTok, const MacroDirective* MD) override; + void MacroUndefined(const Token& MacroNameTok, const MacroDefinition& MD, + const MacroDirective* Undef) override; + enum + { + isPPCallback = true + }; + +private: + clang::Preprocessor& m_rPP; + std::unordered_map m_aDefMap; +}; + +DuplicateDefines::DuplicateDefines(const loplugin::InstantiationData& data) + : Plugin(data) + , m_rPP(compiler.getPreprocessor()) +{ + compiler.getPreprocessor().addPPCallbacks(std::unique_ptr(this)); +} + +void DuplicateDefines::run() +{ + // nothing, only check preprocessor usage +} + +void DuplicateDefines::MacroDefined(const Token& rMacroNameTok, const MacroDirective*) +{ + auto aLoc = rMacroNameTok.getLocation(); + if (ignoreLocation(aLoc)) + return; + + std::string aMacroName = m_rPP.getSpelling(rMacroNameTok); + + // some testing macro + if (aMacroName == "RTL_STRING_CONST_FUNCTION") + return; + if (aMacroName == "rtl") + return; + // we replicate these macros in all the .hrc files + if (aMacroName == "NC_" || aMacroName == "NNC_") + return; + // We define this prior to including : + if (aMacroName == "WIN32_LEAN_AND_MEAN") + { + return; + } + // TODO no obvious fix for these + if (aMacroName == "FID_SEARCH_NOW" || aMacroName == "FID_SVX_START" || aMacroName == "FN_PARAM") + return; + // ignore for now, requires adding too many includes to sw/ + if (aMacroName == "MM50") + return; + + // ignore for now, we have the same define in svx and sw, but I can't remove one of them because + // they reference strings in different resource bundles + if (aMacroName == "STR_UNDO_COL_DELETE" || aMacroName == "STR_UNDO_ROW_DELETE" + || aMacroName == "STR_TABLE_NUMFORMAT" || aMacroName == "STR_DELETE") + return; + + if (m_aDefMap.emplace(aMacroName, Entry{ aLoc }).second) + { + return; + } + + // Happens e.g. with macros defined in include/premac.h, which is intended to be included + // (without include guards) multiple times: + auto const other = m_aDefMap[aMacroName].m_aLoc; + assert(aLoc == compiler.getSourceManager().getSpellingLoc(aLoc)); + assert(other == compiler.getSourceManager().getSpellingLoc(other)); + if ((compiler.getSourceManager().getFilename(aLoc) + == compiler.getSourceManager().getFilename(other)) + && (compiler.getSourceManager().getSpellingLineNumber(aLoc) + == compiler.getSourceManager().getSpellingLineNumber(other)) + && (compiler.getSourceManager().getSpellingColumnNumber(aLoc) + == compiler.getSourceManager().getSpellingColumnNumber(other))) + { + return; + } + + report(DiagnosticsEngine::Warning, "duplicate defines", aLoc); + report(DiagnosticsEngine::Note, "previous define", other); +} + +void DuplicateDefines::MacroUndefined(const Token& rMacroNameTok, const MacroDefinition& /*MD*/, + const MacroDirective* /*Undef*/) +{ + auto aLoc = rMacroNameTok.getLocation(); + if (ignoreLocation(aLoc)) + return; + + std::string aMacroName = m_rPP.getSpelling(rMacroNameTok); + m_aDefMap.erase(aMacroName); +} + +loplugin::Plugin::Registration X("duplicatedefines", true); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/dyncastvisibility.cxx b/compilerplugins/clang/dyncastvisibility.cxx new file mode 100644 index 0000000000..7259374c98 --- /dev/null +++ b/compilerplugins/clang/dyncastvisibility.cxx @@ -0,0 +1,209 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef LO_CLANG_SHARED_PLUGINS + +#include +#include +#include +#include +#include + +#include "config_clang.h" + +#include "plugin.hxx" + +namespace { + +using Bases = std::set; + +Visibility getTypeVisibility(CXXRecordDecl const * decl) { + assert(decl->isThisDeclarationADefinition()); + if (auto const opt = decl->getExplicitVisibility( + NamedDecl::VisibilityForType)) + { + return *opt; + } + if (auto const opt = decl->getExplicitVisibility( + NamedDecl::VisibilityForValue)) + { + return *opt; + } + auto const visi = decl->getVisibility(); + return visi == DefaultVisibility && decl->isInAnonymousNamespace() + ? HiddenVisibility : visi; +} + +// Check whether 'decl' is derived from 'base', gathering any 'bases' between +// 'decl' and 'base', and whether any of those 'bases' or 'base' are 'hidden' +// (i.e., have non-default visibility): +bool isDerivedFrom( + CXXRecordDecl const * decl, CXXRecordDecl const * base, Bases * bases, + bool * hidden) +{ + bool derived = false; + for (auto const & i: decl->bases()) { + auto const bd + = (cast(i.getType()->getAs()->getDecl()) + ->getDefinition()); + assert(bd != nullptr); + if (bd == base) { + *hidden |= getTypeVisibility(base) != DefaultVisibility; + derived = true; + } + else if (bd->isDerivedFrom(base)) { + if (bases->insert(bd).second) { + auto const d = isDerivedFrom(bd, base, bases, hidden); + assert(d); + (void)d; + *hidden |= getTypeVisibility(bd) != DefaultVisibility; + } + derived = true; + } + } + return derived; +} + +StringRef vis(Visibility v) { + switch (v) { + case HiddenVisibility: + return "hidden"; + case ProtectedVisibility: + return "protected"; + case DefaultVisibility: + return "default"; + } + llvm_unreachable("unknown visibility"); +} + +class DynCastVisibility final: + public loplugin::FilteringPlugin +{ +public: + explicit DynCastVisibility(loplugin::InstantiationData const & data): + FilteringPlugin(data) {} + + bool shouldVisitTemplateInstantiations() const { return true; } + + bool VisitCXXDynamicCastExpr(CXXDynamicCastExpr const * expr) { + if (ignoreLocation(expr)) { + return true; + } + auto td = expr->getTypeAsWritten(); + if (auto const t = td->getAs()) { + td = t->getPointeeType(); + } + while (auto const t = td->getAs()) { + td = t->getPointeeType(); + } + auto const rtd = td->getAs(); + if (rtd == nullptr) { + return true; + } + auto const rdd = cast(rtd->getDecl())->getDefinition(); + assert(rdd != nullptr); + if (getTypeVisibility(rdd) != DefaultVisibility) { + // Heuristic to find problematic dynamic_cast with hidden type T is: T is defined in + // include/M1/ while the compilation unit is in module M2/ with M1 != M2. There are + // legitimate cases where T is a hidden type in dynamic_cast, e.g., when both the + // type and the cast are in the same library. This heuristic appears to be conservative + // enough to produce only a few false positives (which have been addressed with + // preceding commits, marking the relevant types in global include files as + // SAL_DLLPUBLIC_RTTI after all, to be on the safe side) and aggressive enough to find + // at least some interesting cases (though it would still not be aggressive enough to + // have found ff570b4b58dbf274d3094d21d974f18b613e9b4b "DocumentSettingsSerializer must + // be SAL_DLLPUBLIC_RTTI for dynamic_cast"): + auto const file = getFilenameOfLocation( + compiler.getSourceManager().getSpellingLoc(rdd->getLocation())); + if (loplugin::hasPathnamePrefix(file, SRCDIR "/include/")) { + std::size_t const n1 = std::strlen(SRCDIR "/include/"); + std::size_t n2 = file.find('/', n1); +#if defined _WIN32 + n2 = std::min(n2, file.find('\\', n1)); +#endif + auto const seg = n2 >= file.size() ? file.substr(n1) : file.substr(n1, n2 - n1); + auto prefix = std::string(SRCDIR "/"); + prefix += seg; + if (!loplugin::hasPathnamePrefix( + handler.getMainFileName(), prefix)) + { + report( + DiagnosticsEngine::Warning, + "Suspicious dynamic_cast to %0 with %1 type visibility", expr->getExprLoc()) + << td << vis(getTypeVisibility(rdd)) << expr->getSourceRange(); + report(DiagnosticsEngine::Note, "class %0 defined here", rdd->getLocation()) + << td << rdd->getSourceRange(); + } + } + return true; + } + auto ts = expr->getSubExpr()->getType(); + while (auto const t = ts->getAs()) { + ts = t->getPointeeType(); + } + auto const rts = ts->getAs(); + if (rts == nullptr) { // in case it's a dependent type + return true; + } + auto const rds = cast(rts->getDecl())->getDefinition(); + assert(rds != nullptr); + Bases bs; + bool hidden = false; + if (!(isDerivedFrom(rdd, rds, &bs, &hidden) && hidden)) { + return true; + } + report( + DiagnosticsEngine::Warning, + ("dynamic_cast from %0 with %1 type visibility to %2 with %3 type" + " visibility"), + expr->getExprLoc()) + << ts << vis(getTypeVisibility(rds)) << td + << vis(getTypeVisibility(rdd)) << expr->getSourceRange(); + report( + DiagnosticsEngine::Note, + "base class %0 with %1 type visibility defined here", + rds->getLocation()) + << ts << vis(getTypeVisibility(rds)) << rds->getSourceRange(); + for (auto const i: bs) { + if (getTypeVisibility(i) != DefaultVisibility) { + report( + DiagnosticsEngine::Note, + ("intermediary class %0 with %1 type visibility defined" + " here"), + i->getLocation()) + << i << vis(getTypeVisibility(i)) << i->getSourceRange(); + } + } + report( + DiagnosticsEngine::Note, + "derived class %0 with %1 type visibility defined here", + rdd->getLocation()) + << td << vis(getTypeVisibility(rdd)) << rdd->getSourceRange(); + return true; + } + + virtual bool preRun() override { + return compiler.getLangOpts().CPlusPlus; + } +private: + void run() override { + if (preRun()) { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + } +}; + +static loplugin::Plugin::Registration dyncastvisibility( + "dyncastvisibility"); + +} + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/dynexcspec.cxx b/compilerplugins/clang/dynexcspec.cxx new file mode 100644 index 0000000000..af733ec4f1 --- /dev/null +++ b/compilerplugins/clang/dynexcspec.cxx @@ -0,0 +1,186 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef LO_CLANG_SHARED_PLUGINS + +#include +#include + +#include "clang/AST/Comment.h" + +#include "plugin.hxx" + +// Remove dynamic exception specifications. See the mail thread starting at +// +// "Dynamic Exception Specifications" for details. + +namespace { + +bool isOverriding(FunctionDecl const * decl) { + if (decl->hasAttr()) { + return true; + } + auto m = dyn_cast(decl); + return m != nullptr + && m->begin_overridden_methods() != m->end_overridden_methods(); +} + +bool isDtorOrDealloc(FunctionDecl const * decl) { + if (isa(decl)) { + return true; + } + switch (decl->getOverloadedOperator()) { + case OO_Delete: + case OO_Array_Delete: + return true; + default: + return false; + } +} + +class DynExcSpec: + public loplugin::FilteringRewritePlugin +{ +public: + explicit DynExcSpec(loplugin::InstantiationData const & data): + FilteringRewritePlugin(data) {} + + bool preRun() override { + return compiler.getLangOpts().CPlusPlus; + } + + void run() override { + if (preRun()) { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + } + + bool VisitFunctionDecl(FunctionDecl const * decl) { + if (ignoreLocation(decl)) { + return true; + } + auto proto = decl->getType()->getAs(); + if (proto == nullptr || proto->getExceptionSpecType() != EST_Dynamic) { + return true; + } + if (decl->isCanonicalDecl() && !isOverriding(decl) + && !anyRedeclHasThrowsDocumentation(decl)) + { + report( + DiagnosticsEngine::Warning, + ("function declaration has dynamic exception specification but" + " no corresponding documentation comment"), + decl->getLocation()) + << decl->getSourceRange(); + } + if (rewriter != nullptr) { + if (!(decl->isDefined() || decl->isPure())) { + return true; + } + if (auto m = dyn_cast(decl)) { + for (auto i = m->begin_overridden_methods(); + i != m->end_overridden_methods(); ++i) + { + auto proto2 = (*i)->getType()->getAs(); + assert(proto2 != nullptr); + if (proto2->getExceptionSpecType() == EST_Dynamic) { + return true; + } + } + } + } + bool dtorOrDealloc = isDtorOrDealloc(decl); + auto const source = decl->getExceptionSpecSourceRange(); + if (rewriter != nullptr && source.isValid()) { + if (dtorOrDealloc) { + if (replaceText(source, "noexcept(false)")) { + return true; + } + } else { + auto beg = source.getBegin(); + if (beg.isFileID()) { + for (;;) { + auto prev = Lexer::GetBeginningOfToken( + beg.getLocWithOffset(-1), + compiler.getSourceManager(), + compiler.getLangOpts()); + auto n = Lexer::MeasureTokenLength( + prev, compiler.getSourceManager(), + compiler.getLangOpts()); + auto s = StringRef( + compiler.getSourceManager().getCharacterData(prev), + n); + while (s.startswith("\\\n")) { + s = s.drop_front(2); + while (!s.empty() + && (s.front() == ' ' || s.front() == '\t' + || s.front() == '\n' || s.front() == '\v' + || s.front() == '\f')) + { + s = s.drop_front(1); + } + } + if (!s.empty() && s != "\\") { + if (s.startswith("//")) { + beg = source.getBegin(); + } + break; + } + beg = prev; + } + } + if (removeText(SourceRange(beg, source.getEnd()))) { + return true; + } + } + } + report( + DiagnosticsEngine::Warning, + (dtorOrDealloc + ? "replace dynamic exception specification with 'noexcept(false)'" + : "remove dynamic exception specification"), + source.isValid() ? source.getBegin() : decl->getLocation()) + << (source.isValid() ? source : decl->getSourceRange()); + return true; + } + +private: + bool hasThrowsDocumentation(FunctionDecl const * decl) { + if (auto cmt = compiler.getASTContext().getCommentForDecl( + decl, &compiler.getPreprocessor())) + { + for (auto i = cmt->child_begin(); i != cmt->child_end(); ++i) { + if (auto bcc = dyn_cast(*i)) { + if (compiler.getASTContext().getCommentCommandTraits() + .getCommandInfo(bcc->getCommandID())->IsThrowsCommand) + { + return true; + } + } + } + } + return false; + } + + bool anyRedeclHasThrowsDocumentation(FunctionDecl const * decl) { + return std::any_of( + decl->redecls_begin(), decl->redecls_end(), + [this](FunctionDecl * d) { return hasThrowsDocumentation(d); }); + // std::bind( + // &DynExcSpec::hasThrowsDocumentation, this, + // std::placeholders::_1)); + } +}; + +loplugin::Plugin::Registration dynexcspec("dynexcspec"); + +} // namespace + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/elidestringvar.cxx b/compilerplugins/clang/elidestringvar.cxx new file mode 100644 index 0000000000..c14eaf027b --- /dev/null +++ b/compilerplugins/clang/elidestringvar.cxx @@ -0,0 +1,461 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef LO_CLANG_SHARED_PLUGINS + +#include +#include +#include + +#include "check.hxx" +#include "compat.hxx" +#include "plugin.hxx" + +// Find cases where a variable of a OString/OUString type is initialized +// with a literal value (incl. as an empty string) and used only once. Conservatively this only +// covers local non-static variables that are not defined outside of the loop (if any) in which they +// are used, as other cases may deliberately use the variable for performance (or even correctness, +// if addresses are taken and compared) reasons. +// +// For one, the historically heavy syntax for such uses of string literals +// (RTL_CONSTASCII_USTRINGPARAM etc.) probably explains many of these redundant variables, which can +// now be considered cargo-cult baggage. For another, some of those variables are used as arguments +// to functions which also have more efficient overloads directly taking string literals. And for +// yet another, some cases with default-initialized variables turned out to be effectively unused +// code that could be removed completely (d073cca5f7c04de3e1bcedda334d864e98ac7835 "Clean up dead +// code", 91345e7dde6100496a7c9e815b72b2821ae82bc2 "Clean up dead code", +// 868b0763ac47f765cb48c277897274a595b831d0 "Upcoming loplugin:elidestringvar: dbaccess" in +// dbaccess/source/ui/app/AppController.cxx, bde0aac4ccf7b830b5ef21d5b9e75e62aee6aaf9 "Clean up dead +// code", 354aefec42de856b4ab6201ada54a3a3c630b4bd "Upcoming loplugin:elidestringvar: cui" in +// cui/source/dialogs/SpellDialog.cxx). + +namespace +{ +bool isStringType(QualType type) +{ + loplugin::TypeCheck const c(type); + return c.Class("OString").Namespace("rtl").GlobalNamespace() + || c.Class("OUString").Namespace("rtl").GlobalNamespace(); +} + +class ElideStringVar : public loplugin::FilteringPlugin +{ +public: + explicit ElideStringVar(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + bool preRun() override { return compiler.getLangOpts().CPlusPlus; } + + void postRun() override + { + for (auto const& var : vars_) + { + if (!var.second.singleUse || *var.second.singleUse == nullptr) + { + continue; + } + if (containsPreprocessingConditionalInclusion( + SourceRange(var.first->getBeginLoc(), (*var.second.singleUse)->getEndLoc()))) + { + // This is not perfect, as additional uses can be hidden in conditional blocks that + // only start after the (would-be) single use (as was the case in + // 3bc5057f9689e024957cfa898a221ee2c4c4afe7 "Upcoming loplugin:elidestringvar: + // testtools" when built with --enable-debug, but where also fixing the hidden + // additional use was trivial). If this ever becomes a real problem, we can extend + // the above check to cover more of the current function body's remainder. + continue; + } + report(DiagnosticsEngine::Warning, + "replace single use of literal %0 variable with a literal", + (*var.second.singleUse)->getExprLoc()) + << var.first->getType() << (*var.second.singleUse)->getSourceRange(); + report(DiagnosticsEngine::Note, "literal %0 variable defined here", + var.first->getLocation()) + << var.first->getType() << var.first->getSourceRange(); + } + } + + bool VisitVarDecl(VarDecl const* decl) + { + if (ignoreLocation(decl)) + { + return true; + } + if (!decl->isThisDeclarationADefinition()) + { + return true; + } + if (isa(decl)) + { + return true; + } + if (decl->getStorageDuration() != SD_Automatic) + { + return true; + } + if (!isStringType(decl->getType())) + { + return true; + } + if (!decl->hasInit()) + { + return true; + } + auto const e1 = dyn_cast(decl->getInit()->IgnoreParenImpCasts()); + if (e1 == nullptr) + { + return true; + } + if (!isStringType(e1->getType())) + { + return true; + } + switch (e1->getNumArgs()) + { + case 0: + break; + case 1: + { + auto const e2 = e1->getArg(0); + loplugin::TypeCheck const c(e2->getType()); + if (c.Class("OStringLiteral").Namespace("rtl").GlobalNamespace() + || c.Class("OUStringLiteral").Namespace("rtl").GlobalNamespace()) + { + break; + } + if (!e2->isValueDependent() && e2->isIntegerConstantExpr(compiler.getASTContext())) + { + break; + } + return true; + } + case 2: + { + auto const e2 = e1->getArg(0); + auto const t = e2->getType(); + if (!(t.isConstQualified() && t->isConstantArrayType())) + { + return true; + } + if (isa(e2->IgnoreParenImpCasts())) + { + return true; + } + auto const e3 = e1->getArg(1); + if (!(isa(e3) + && loplugin::TypeCheck(e3->getType()) + .Struct("Dummy") + .Namespace("libreoffice_internal") + .Namespace("rtl") + .GlobalNamespace())) + { + return true; + } + break; + } + default: + return true; + } + auto const ok = vars_.emplace(decl, Data(getInnermostLoop())); + assert(ok.second); + (void)ok; + return true; + } + + bool VisitDeclRefExpr(DeclRefExpr const* expr) + { + if (ignoreLocation(expr)) + { + return true; + } + auto const var = dyn_cast(expr->getDecl()); + if (var == nullptr) + { + return true; + } + auto const i = vars_.find(var); + if (i == vars_.end()) + { + return true; + } + i->second.singleUse + = i->second.singleUse || i->second.innermostLoop != getInnermostLoop() ? nullptr : expr; + return true; + } + + bool VisitMemberExpr(MemberExpr const* expr) + { + if (ignoreLocation(expr)) + { + return true; + } + auto const e = dyn_cast(expr->getBase()->IgnoreParenImpCasts()); + if (e == nullptr) + { + return true; + } + auto const var = dyn_cast(e->getDecl()); + if (var == nullptr) + { + return true; + } + auto const i = vars_.find(var); + if (i == vars_.end()) + { + return true; + } + i->second.singleUse = nullptr; + return true; + } + + bool VisitUnaryOperator(UnaryOperator const* expr) + { + if (ignoreLocation(expr)) + { + return true; + } + if (expr->getOpcode() != UO_AddrOf) + { + return true; + } + auto const e = dyn_cast(expr->getSubExpr()->IgnoreParenImpCasts()); + if (e == nullptr) + { + return true; + } + auto const var = dyn_cast(e->getDecl()); + if (var == nullptr) + { + return true; + } + auto const i = vars_.find(var); + if (i == vars_.end()) + { + return true; + } + i->second.singleUse = nullptr; + return true; + } + + bool VisitCallExpr(CallExpr const* expr) + { + if (ignoreLocation(expr)) + { + return true; + } + auto const fun = expr->getDirectCallee(); + if (fun == nullptr) + { + return true; + } + unsigned const n = std::min(fun->getNumParams(), expr->getNumArgs()); + for (unsigned i = 0; i != n; ++i) + { + if (!loplugin::TypeCheck(fun->getParamDecl(i)->getType()) + .LvalueReference() + .NonConstVolatile()) + { + continue; + } + auto const e = dyn_cast(expr->getArg(i)->IgnoreParenImpCasts()); + if (e == nullptr) + { + continue; + } + auto const var = dyn_cast(e->getDecl()); + if (var == nullptr) + { + continue; + } + auto const j = vars_.find(var); + if (j == vars_.end()) + { + continue; + } + j->second.singleUse = nullptr; + } + return true; + } + + bool VisitCXXConstructExpr(CXXConstructExpr const* expr) + { + if (ignoreLocation(expr)) + { + return true; + } + auto const ctor = expr->getConstructor(); + unsigned const n = std::min(ctor->getNumParams(), expr->getNumArgs()); + for (unsigned i = 0; i != n; ++i) + { + if (!loplugin::TypeCheck(ctor->getParamDecl(i)->getType()) + .LvalueReference() + .NonConstVolatile()) + { + continue; + } + auto const e = dyn_cast(expr->getArg(i)->IgnoreParenImpCasts()); + if (e == nullptr) + { + continue; + } + auto const var = dyn_cast(e->getDecl()); + if (var == nullptr) + { + continue; + } + auto const j = vars_.find(var); + if (j == vars_.end()) + { + continue; + } + j->second.singleUse = nullptr; + } + return true; + } + + bool TraverseWhileStmt(WhileStmt* stmt) + { + bool ret = true; + if (PreTraverseWhileStmt(stmt)) + { + ret = FilteringPlugin::TraverseWhileStmt(stmt); + PostTraverseWhileStmt(stmt, ret); + } + return ret; + } + + bool PreTraverseWhileStmt(WhileStmt* stmt) + { + innermostLoop_.push(stmt); + return true; + } + + bool PostTraverseWhileStmt(WhileStmt* stmt, bool) + { + assert(!innermostLoop_.empty()); + assert(innermostLoop_.top() == stmt); + (void)stmt; + innermostLoop_.pop(); + return true; + } + + bool TraverseDoStmt(DoStmt* stmt) + { + bool ret = true; + if (PreTraverseDoStmt(stmt)) + { + ret = FilteringPlugin::TraverseDoStmt(stmt); + PostTraverseDoStmt(stmt, ret); + } + return ret; + } + + bool PreTraverseDoStmt(DoStmt* stmt) + { + innermostLoop_.push(stmt); + return true; + } + + bool PostTraverseDoStmt(DoStmt* stmt, bool) + { + assert(!innermostLoop_.empty()); + assert(innermostLoop_.top() == stmt); + (void)stmt; + innermostLoop_.pop(); + return true; + } + + bool TraverseForStmt(ForStmt* stmt) + { + bool ret = true; + if (PreTraverseForStmt(stmt)) + { + ret = FilteringPlugin::TraverseForStmt(stmt); + PostTraverseForStmt(stmt, ret); + } + return ret; + } + + bool PreTraverseForStmt(ForStmt* stmt) + { + innermostLoop_.push(stmt); + return true; + } + + bool PostTraverseForStmt(ForStmt* stmt, bool) + { + assert(!innermostLoop_.empty()); + assert(innermostLoop_.top() == stmt); + (void)stmt; + innermostLoop_.pop(); + return true; + } + + bool TraverseCXXForRangeStmt(CXXForRangeStmt* stmt) + { + bool ret = true; + if (PreTraverseCXXForRangeStmt(stmt)) + { + ret = FilteringPlugin::TraverseCXXForRangeStmt(stmt); + PostTraverseCXXForRangeStmt(stmt, ret); + } + return ret; + } + + bool PreTraverseCXXForRangeStmt(CXXForRangeStmt* stmt) + { + innermostLoop_.push(stmt); + return true; + } + + bool PostTraverseCXXForRangeStmt(CXXForRangeStmt* stmt, bool) + { + assert(!innermostLoop_.empty()); + assert(innermostLoop_.top() == stmt); + (void)stmt; + innermostLoop_.pop(); + return true; + } + +private: + void run() override + { + if (preRun() && TraverseDecl(compiler.getASTContext().getTranslationUnitDecl())) + { + postRun(); + } + } + + Stmt const* getInnermostLoop() const + { + return innermostLoop_.empty() ? nullptr : innermostLoop_.top(); + } + + struct Data + { + Data(Stmt const* theInnermostLoop) + : innermostLoop(theInnermostLoop) + { + } + Stmt const* innermostLoop; + compat::optional singleUse; + }; + + std::stack innermostLoop_; + std::map vars_; +}; + +loplugin::Plugin::Registration elidestringvar("elidestringvar"); +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/empty.cxx b/compilerplugins/clang/empty.cxx new file mode 100644 index 0000000000..d5129d29dd --- /dev/null +++ b/compilerplugins/clang/empty.cxx @@ -0,0 +1,167 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef LO_CLANG_SHARED_PLUGINS + +#include + +#include "check.hxx" +#include "plugin.hxx" + +// Warn about checks whether a container is empty done via an (expensive) call to obtain the +// container's size. For now only handles cases involving strlen. + +namespace +{ +BinaryOperatorKind reverse(BinaryOperatorKind op) +{ + switch (op) + { + case BO_LT: + return BO_GE; + case BO_GT: + return BO_LE; + case BO_LE: + return BO_GT; + case BO_GE: + return BO_LT; + case BO_EQ: + case BO_NE: + return op; + default: + abort(); + } +} + +class Empty : public loplugin::FilteringPlugin +{ +public: + explicit Empty(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + bool VisitBinaryOperator(BinaryOperator const* expr) + { + if (expr->isRelationalOp() || expr->isEqualityOp()) + { + visitComparison(expr); + } + return true; + } + +private: + void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } + + void visitComparison(BinaryOperator const* expr, CallExpr const* lhs, Expr const* rhs, + BinaryOperatorKind op) + { + auto const fdecl = lhs->getDirectCallee(); + if (fdecl == nullptr) + { + return; + } + loplugin::DeclCheck dc(fdecl); + if (!(dc.Function("strlen").StdNamespace() || dc.Function("strlen").GlobalNamespace())) + { + return; + } + if (rhs->isValueDependent()) + { + return; + } + auto const val = rhs->getIntegerConstantExpr(compiler.getASTContext()); + if (!val) + { + return; + } + switch (op) + { + case BO_LT: + if (val->getExtValue() == 1) + { + report(DiagnosticsEngine::Warning, + "replace a comparison like 'strlen(e) < 1' with 'e[0] == '\\0''", + expr->getExprLoc()) + << expr->getSourceRange(); + } + break; + case BO_GT: + if (val->getExtValue() == 0) + { + report(DiagnosticsEngine::Warning, + "replace a comparison like 'strlen(e) > 0' with 'e[0] != '\\0''", + expr->getExprLoc()) + << expr->getSourceRange(); + } + break; + case BO_LE: + if (val->getExtValue() == 0) + { + report(DiagnosticsEngine::Warning, + "replace a comparison like 'strlen(e) <= 0' with 'e[0] == '\\0''", + expr->getExprLoc()) + << expr->getSourceRange(); + } + break; + case BO_GE: + if (val->getExtValue() == 1) + { + report(DiagnosticsEngine::Warning, + "replace a comparison like 'strlen(e) >= 1' with 'e[0] != '\\0''", + expr->getExprLoc()) + << expr->getSourceRange(); + } + break; + case BO_EQ: + if (val->getExtValue() == 0) + { + report(DiagnosticsEngine::Warning, + "replace a comparison like 'strlen(e) == 0' with 'e[0] == '\\0''", + expr->getExprLoc()) + << expr->getSourceRange(); + } + break; + case BO_NE: + if (val->getExtValue() == 0) + { + report(DiagnosticsEngine::Warning, + "replace a comparison like 'strlen(e) != 0' with 'e[0] != '\\0''", + expr->getExprLoc()) + << expr->getSourceRange(); + } + break; + default: + assert(false); + } + } + + void visitComparison(BinaryOperator const* expr) + { + if (ignoreLocation(expr)) + { + return; + } + if (auto const call = dyn_cast(expr->getLHS()->IgnoreParenImpCasts())) + { + visitComparison(expr, call, expr->getRHS(), expr->getOpcode()); + } + else if (auto const call = dyn_cast(expr->getRHS()->IgnoreParenImpCasts())) + { + visitComparison(expr, call, expr->getLHS(), reverse(expr->getOpcode())); + } + } +}; + +loplugin::Plugin::Registration emptyRegistration("empty"); +} + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/emptyif.cxx b/compilerplugins/clang/emptyif.cxx new file mode 100644 index 0000000000..5412188f8d --- /dev/null +++ b/compilerplugins/clang/emptyif.cxx @@ -0,0 +1,93 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef LO_CLANG_SHARED_PLUGINS + +#include +#include +#include +#include +#include +#include "plugin.hxx" + +/** + Check for places where we do + if (xxx) ; + or + if (xxx) {} + */ +namespace +{ +class EmptyIf : public loplugin::FilteringRewritePlugin +{ +public: + explicit EmptyIf(loplugin::InstantiationData const& data) + : FilteringRewritePlugin(data) + { + } + + virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } + + bool VisitIfStmt(IfStmt const*); + +private: + bool ContainsComment(Stmt const*); +}; + +static bool empty(Stmt const* stmt) +{ + if (isa(stmt)) + return true; + auto compoundStmt = dyn_cast(stmt); + if (!compoundStmt) + return false; + return compoundStmt->size() == 0; +} + +bool EmptyIf::ContainsComment(Stmt const* stmt) +{ + auto range = stmt->getSourceRange(); + SourceManager& SM = compiler.getSourceManager(); + SourceLocation startLoc = range.getBegin(); + SourceLocation endLoc = range.getEnd(); + char const* p1 = SM.getCharacterData(startLoc); + char const* p2 = SM.getCharacterData(endLoc); + p2 += Lexer::MeasureTokenLength(endLoc, SM, compiler.getLangOpts()); + auto s = llvm::StringRef(p1, p2 - p1); + return s.find("//") != llvm::StringRef::npos || s.find("/*") != llvm::StringRef::npos + || s.find("#if") != llvm::StringRef::npos; +} + +bool EmptyIf::VisitIfStmt(IfStmt const* ifStmt) +{ + if (ignoreLocation(ifStmt)) + return true; + + if (ifStmt->getElse() && empty(ifStmt->getElse()) && !ContainsComment(ifStmt->getElse())) + { + report(DiagnosticsEngine::Warning, "empty else body", ifStmt->getElse()->getBeginLoc()) + << ifStmt->getElse()->getSourceRange(); + return true; + } + + if (!ifStmt->getElse() && empty(ifStmt->getThen()) && !ContainsComment(ifStmt->getThen())) + { + report(DiagnosticsEngine::Warning, "empty if body", ifStmt->getBeginLoc()) + << ifStmt->getSourceRange(); + } + + return true; +} + +loplugin::Plugin::Registration emptyif("emptyif", true); +} + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/expandablemethods.cxx b/compilerplugins/clang/expandablemethods.cxx new file mode 100644 index 0000000000..825c09705d --- /dev/null +++ b/compilerplugins/clang/expandablemethods.cxx @@ -0,0 +1,327 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include +#include +#include +#include + + +#include "clang/AST/Attr.h" + +#include "config_clang.h" + +#include "plugin.hxx" + +/** + Find methods that are only called from inside their own class, and are only called from one spot. + They are candidates to be removed and have their code inlined into the call site. + + + TODO if a method has only one call-site, and that call site is inside a constructor + then it's probably worth inlining, since it's probably an old method that was intended to be shared amongst + multiple constructors +*/ + +namespace { + +struct MyFuncInfo +{ + std::string access; + std::string returnType; + std::string nameAndParams; + std::string sourceLocation; + +}; +bool operator < (const MyFuncInfo &lhs, const MyFuncInfo &rhs) +{ + return std::tie(lhs.returnType, lhs.nameAndParams) + < std::tie(rhs.returnType, rhs.nameAndParams); +} + +// try to limit the voluminous output a little + +static std::set> calledFromSet; +static std::set definitionSet; +static std::set calledFromOutsideSet; +static std::set largeFunctionSet; +static std::set addressOfSet; + + +class ExpandableMethods: + public RecursiveASTVisitor, public loplugin::Plugin +{ +public: + explicit ExpandableMethods(loplugin::InstantiationData const & data): + Plugin(data) {} + + virtual void run() override + { + handler.enableTreeWideAnalysisMode(); + + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + + // dump all our output in one write call - this is to try and limit IO "crosstalk" between multiple processes + // writing to the same logfile + + std::string output; + for (const MyFuncInfo & s : definitionSet) + output += "definition:\t" + s.access + "\t" + s.returnType + "\t" + s.nameAndParams + "\t" + s.sourceLocation + "\n"; + for (const MyFuncInfo & s : calledFromOutsideSet) + output += "outside:\t" + s.returnType + "\t" + s.nameAndParams + "\n"; + for (const std::pair & s : calledFromSet) + output += "calledFrom:\t" + s.first + + "\t" + s.second.returnType + "\t" + s.second.nameAndParams + "\n"; + for (const MyFuncInfo & s : largeFunctionSet) + output += "large:\t" + s.returnType + "\t" + s.nameAndParams + "\n"; + for (const MyFuncInfo & s : addressOfSet) + output += "addrof:\t" + s.returnType + "\t" + s.nameAndParams + "\n"; + std::ofstream myfile; + myfile.open( WORKDIR "/loplugin.expandablemethods.log", std::ios::app | std::ios::out); + myfile << output; + myfile.close(); + } + + bool shouldVisitTemplateInstantiations () const { return true; } + bool shouldVisitImplicitCode() const { return true; } + + bool VisitFunctionDecl( const FunctionDecl* ); + bool VisitDeclRefExpr( const DeclRefExpr* ); + bool VisitMemberExpr( const MemberExpr* ); + // interception methods for FunctionDecl and all its subclasses + bool TraverseFunctionDecl( FunctionDecl* ); + bool TraverseCXXMethodDecl( CXXMethodDecl* ); + bool TraverseCXXConstructorDecl( CXXConstructorDecl* ); + bool TraverseCXXConversionDecl( CXXConversionDecl* ); + bool TraverseCXXDestructorDecl( CXXDestructorDecl* ); + +private: + MyFuncInfo niceName(const FunctionDecl* functionDecl); + std::string toString(SourceLocation loc); + void functionTouchedFromExpr( const FunctionDecl* calleeFunctionDecl, const Expr* expr ); + bool isCalleeFunctionInteresting( const FunctionDecl* ); + + // I use traverse and a member variable because I cannot find a reliable way of walking back up the AST tree using the parentStmt() stuff + std::vector maTraversingFunctions; +}; + +MyFuncInfo ExpandableMethods::niceName(const FunctionDecl* functionDecl) +{ + if (functionDecl->getInstantiatedFromMemberFunction()) + functionDecl = functionDecl->getInstantiatedFromMemberFunction(); + else if (functionDecl->getTemplateInstantiationPattern()) + functionDecl = functionDecl->getTemplateInstantiationPattern(); + + MyFuncInfo aInfo; + switch (functionDecl->getAccess()) + { + case AS_public: aInfo.access = "public"; break; + case AS_private: aInfo.access = "private"; break; + case AS_protected: aInfo.access = "protected"; break; + default: aInfo.access = "unknown"; break; + } + if (!isa(functionDecl)) { + aInfo.returnType = functionDecl->getReturnType().getCanonicalType().getAsString(); + } else { + aInfo.returnType = ""; + } + + if (isa(functionDecl)) { + const CXXRecordDecl* recordDecl = dyn_cast(functionDecl)->getParent(); + aInfo.nameAndParams += recordDecl->getQualifiedNameAsString(); + aInfo.nameAndParams += "::"; + } + aInfo.nameAndParams += functionDecl->getNameAsString() + "("; + bool bFirst = true; + for (const ParmVarDecl *pParmVarDecl : functionDecl->parameters()) { + if (bFirst) + bFirst = false; + else + aInfo.nameAndParams += ","; + aInfo.nameAndParams += pParmVarDecl->getType().getCanonicalType().getAsString(); + } + aInfo.nameAndParams += ")"; + if (isa(functionDecl) && dyn_cast(functionDecl)->isConst()) { + aInfo.nameAndParams += " const"; + } + + aInfo.sourceLocation = toString( functionDecl->getLocation() ); + + return aInfo; +} + +std::string ExpandableMethods::toString(SourceLocation loc) +{ + SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( loc ); + StringRef name = getFilenameOfLocation(expansionLoc); + std::string sourceLocation = std::string(name.substr(strlen(SRCDIR)+1)) + ":" + std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc)); + loplugin::normalizeDotDotInFilePath(sourceLocation); + return sourceLocation; +} + +bool ExpandableMethods::VisitFunctionDecl( const FunctionDecl* functionDecl ) +{ + const FunctionDecl* canonicalFunctionDecl = functionDecl->getCanonicalDecl(); + if (!isCalleeFunctionInteresting(canonicalFunctionDecl)) { + return true; + } + definitionSet.insert(niceName(canonicalFunctionDecl)); + + if (functionDecl->doesThisDeclarationHaveABody()) { + bool bLargeFunction = false; + if (const CompoundStmt* compoundStmt = dyn_cast(functionDecl->getBody())) { + if (compoundStmt->size() > 1) { + bLargeFunction = true; + } + if (!bLargeFunction) { + auto s1 = compiler.getSourceManager().getCharacterData(compoundStmt->getLBracLoc()); + auto s2 = compiler.getSourceManager().getCharacterData(compoundStmt->getRBracLoc()); + bLargeFunction = (s2 - s1) > 40; + // any function that uses a parameter more than once + if (!bLargeFunction) { + StringRef bodyText(s1, s2-s1); + for (const ParmVarDecl* param : functionDecl->parameters()) { + StringRef name = param->getName(); + if (name.empty()) + continue; + size_t idx = bodyText.find(name); + if (idx != StringRef::npos && bodyText.find(name, idx+1) != StringRef::npos) { + bLargeFunction = true; + break; + } + } + } + } + } + if (bLargeFunction) { + largeFunctionSet.insert(niceName(canonicalFunctionDecl)); + } + } + return true; +} + +bool ExpandableMethods::TraverseFunctionDecl( FunctionDecl* p ) +{ + maTraversingFunctions.push_back(p); + bool ret = RecursiveASTVisitor::TraverseFunctionDecl(p); + maTraversingFunctions.pop_back(); + return ret; +} +bool ExpandableMethods::TraverseCXXMethodDecl( CXXMethodDecl* p ) +{ + maTraversingFunctions.push_back(p); + bool ret = RecursiveASTVisitor::TraverseCXXMethodDecl(p); + maTraversingFunctions.pop_back(); + return ret; +} +bool ExpandableMethods::TraverseCXXConstructorDecl( CXXConstructorDecl* p ) +{ + maTraversingFunctions.push_back(p); + bool ret = RecursiveASTVisitor::TraverseCXXConstructorDecl(p); + maTraversingFunctions.pop_back(); + return ret; +} +bool ExpandableMethods::TraverseCXXConversionDecl( CXXConversionDecl* p ) +{ + maTraversingFunctions.push_back(p); + bool ret = RecursiveASTVisitor::TraverseCXXConversionDecl(p); + maTraversingFunctions.pop_back(); + return ret; +} +bool ExpandableMethods::TraverseCXXDestructorDecl( CXXDestructorDecl* p ) +{ + maTraversingFunctions.push_back(p); + bool ret = RecursiveASTVisitor::TraverseCXXDestructorDecl(p); + maTraversingFunctions.pop_back(); + return ret; +} + +bool ExpandableMethods::VisitMemberExpr( const MemberExpr* memberExpr ) +{ + const FunctionDecl* functionDecl = dyn_cast(memberExpr->getMemberDecl()); + if (functionDecl) { + functionTouchedFromExpr(functionDecl, memberExpr); + } + return true; +} + +bool ExpandableMethods::VisitDeclRefExpr( const DeclRefExpr* declRefExpr ) +{ + const FunctionDecl* functionDecl = dyn_cast(declRefExpr->getDecl()); + if (functionDecl) { + functionTouchedFromExpr(functionDecl, declRefExpr); + } + return true; +} + +void ExpandableMethods::functionTouchedFromExpr( const FunctionDecl* calleeFunctionDecl, const Expr* expr ) +{ + const FunctionDecl* canonicalFunctionDecl = calleeFunctionDecl->getCanonicalDecl(); + if (!isCalleeFunctionInteresting(canonicalFunctionDecl)) { + return; + } + + calledFromSet.emplace(toString(expr->getBeginLoc()), niceName(canonicalFunctionDecl)); + + if (const UnaryOperator* unaryOp = dyn_cast_or_null(getParentStmt(expr))) { + if (unaryOp->getOpcode() == UO_AddrOf) { + addressOfSet.insert(niceName(canonicalFunctionDecl)); + } + } + + const CXXMethodDecl* calleeMethodDecl = dyn_cast(calleeFunctionDecl); + if (maTraversingFunctions.empty()) + { + calledFromOutsideSet.insert(niceName(canonicalFunctionDecl)); + } + else + { + const CXXMethodDecl* callsiteParentMethodDecl = dyn_cast(maTraversingFunctions.back()); + if (!callsiteParentMethodDecl + || calleeMethodDecl->getParent() != callsiteParentMethodDecl->getParent()) + { + calledFromOutsideSet.insert(niceName(canonicalFunctionDecl)); + } + } +} + +bool ExpandableMethods::isCalleeFunctionInteresting(const FunctionDecl* functionDecl) +{ + // ignore stuff that forms part of the stable URE interface + if (isInUnoIncludeFile(functionDecl)) { + return false; + } + if (isa(functionDecl)) { + return false; + } + if (functionDecl->isDeleted() || functionDecl->isDefaulted()) { + return false; + } + if (isa(functionDecl) + && dyn_cast(functionDecl)->isCopyOrMoveConstructor()) + { + return false; + } + if (!functionDecl->getLocation().isValid() || ignoreLocation(functionDecl)) { + return false; + } + const CXXMethodDecl* methodDecl = dyn_cast(functionDecl); + if (!methodDecl || methodDecl->isVirtual()) { + return false; + } + return true; +} + +loplugin::Plugin::Registration< ExpandableMethods > X("expandablemethods", false); + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/expandablemethods.py b/compilerplugins/clang/expandablemethods.py new file mode 100755 index 0000000000..707215f968 --- /dev/null +++ b/compilerplugins/clang/expandablemethods.py @@ -0,0 +1,149 @@ +#!/usr/bin/python + +import re +import io + +# -------------------------------------------------------------------------------------------- +# globals +# -------------------------------------------------------------------------------------------- + +definitionSet = set() # set of tuple(return_type, name_and_params) +definitionToSourceLocationMap = dict() +calledFromDict = dict() +calledFromOutsideSet = set() +largeFunctionSet = set() # set of tuple(return_type, name_and_params) +addressOfSet = set() # set of tuple(return_type, name_and_params) + +# clang does not always use exactly the same numbers in the type-parameter vars it generates +# so I need to substitute them to ensure we can match correctly. +normalizeTypeParamsRegex = re.compile(r"type-parameter-\d+-\d+") +def normalizeTypeParams( line ): + return normalizeTypeParamsRegex.sub("type-parameter-?-?", line) + +# -------------------------------------------------------------------------------------------- +# primary input loop +# -------------------------------------------------------------------------------------------- + +with io.open("workdir/loplugin.expandablemethods.log", "rb", buffering=1024*1024) as txt: + for line in txt: + tokens = line.strip().split("\t") + if tokens[0] == "definition:": + access = tokens[1] + returnType = tokens[2] + nameAndParams = tokens[3] + sourceLocation = tokens[4] + funcInfo = (normalizeTypeParams(returnType), normalizeTypeParams(nameAndParams)) + definitionSet.add(funcInfo) + definitionToSourceLocationMap[funcInfo] = sourceLocation + elif tokens[0] == "calledFrom:": + calleeLocation = tokens[1] + returnType = tokens[2] + nameAndParams = tokens[3] + funcInfo = (normalizeTypeParams(returnType), normalizeTypeParams(nameAndParams)) + if not funcInfo in calledFromDict: + calledFromDict[funcInfo] = set() + calledFromDict[funcInfo].add(calleeLocation) + elif tokens[0] == "outside:": + returnType = tokens[1] + nameAndParams = tokens[2] + calledFromOutsideSet.add((normalizeTypeParams(returnType), normalizeTypeParams(nameAndParams))) + elif tokens[0] == "large:": + returnType = tokens[1] + nameAndParams = tokens[2] + largeFunctionSet.add((normalizeTypeParams(returnType), normalizeTypeParams(nameAndParams))) + elif tokens[0] == "addrof:": + returnType = tokens[1] + nameAndParams = tokens[2] + addressOfSet.add((normalizeTypeParams(returnType), normalizeTypeParams(nameAndParams))) + else: + print( "unknown line: " + line) + +# Invert the definitionToSourceLocationMap. +# If we see more than one method at the same sourceLocation, it's being autogenerated as part of a template +# and we should just ignore it. +sourceLocationToDefinitionMap = {} +for k, v in definitionToSourceLocationMap.iteritems(): + sourceLocationToDefinitionMap[v] = sourceLocationToDefinitionMap.get(v, []) + sourceLocationToDefinitionMap[v].append(k) +for k, definitions in sourceLocationToDefinitionMap.iteritems(): + if len(definitions) > 1: + for d in definitions: + definitionSet.remove(d) + +def isOtherConstness( d, callSet ): + method = d[0] + " " + d[1] + # if this method is const, and there is a non-const variant of it, and the non-const variant is in use, then leave it alone + if d[0].startswith("const ") and d[1].endswith(" const"): + if ((d[0][6:],d[1][:-6]) in callSet): + return True + elif method.endswith(" const"): + method2 = method[:len(method)-6] # strip off " const" + if ((d[0],method2) in callSet): + return True + if method.endswith(" const") and ("::iterator" in method): + method2 = method[:len(method)-6] # strip off " const" + method2 = method2.replace("::const_iterator", "::iterator") + if ((d[0],method2) in callSet): + return True + # if this method is non-const, and there is a const variant of it, and the const variant is in use, then leave it alone + if (not method.endswith(" const")) and ((d[0],"const " + method + " const") in callSet): + return True + if (not method.endswith(" const")) and ("::iterator" in method): + method2 = method.replace("::iterator", "::const_iterator") + " const" + if ((d[0],method2) in callSet): + return True + return False + +# sort the results using a "natural order" so sequences like [item1,item2,item10] sort nicely +def natural_sort_key(s, _nsre=re.compile('([0-9]+)')): + return [int(text) if text.isdigit() else text.lower() + for text in re.split(_nsre, s)] +# sort by both the source-line and the datatype, so the output file ordering is stable +# when we have multiple items on the same source line +def v_sort_key(v): + return natural_sort_key(v[1]) + [v[0]] +def sort_set_by_natural_key(s): + return sorted(s, key=lambda v: v_sort_key(v)) + + +# -------------------------------------------------------------------------------------------- +# Methods that are only called from inside their own class, and are only called from one spot +# -------------------------------------------------------------------------------------------- + +tmp4set = set() +for d in definitionSet: + if d in calledFromOutsideSet: + continue + if isOtherConstness(d, calledFromOutsideSet): + continue + if d not in definitionToSourceLocationMap: + print("warning, method has no location: " + d[0] + " " + d[1]) + continue + # ignore external code + if definitionToSourceLocationMap[d].startswith("external/"): + continue + # ignore constructors, calledFromOutsideSet does not provide accurate info for them + tokens = d[1].split("(")[0].split("::") + if len(tokens)>1 and tokens[-2] == tokens[-1]: + continue + # ignore large methods, which make the code clearer by being out of line + if d in largeFunctionSet: + continue + # ignore methods whose address we take + if d in addressOfSet: + continue + # ignore unused methods, leave them to the dedicated analysis + if d not in calledFromDict: + continue + # ignore methods called from more than one site + if len(calledFromDict[d]) > 1: + continue + + method = d[0] + " " + d[1] + tmp4set.add((method, definitionToSourceLocationMap[d])) + +# print output, sorted by name and line number +with open("loplugin.expandablemethods.report", "wt") as f: + for t in sort_set_by_natural_key(tmp4set): + f.write(t[1] + "\n") + f.write(" " + t[0] + "\n") diff --git a/compilerplugins/clang/expressionalwayszero.cxx b/compilerplugins/clang/expressionalwayszero.cxx new file mode 100644 index 0000000000..f741d30c42 --- /dev/null +++ b/compilerplugins/clang/expressionalwayszero.cxx @@ -0,0 +1,151 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include +#include + +#include "plugin.hxx" +#include "compat.hxx" +#include "check.hxx" + +/** + Look for & and operator& expressions where the result is always zero. + Generally a mistake when people meant to use | or operator| +*/ + +namespace +{ +class ExpressionAlwaysZero : public loplugin::FilteringPlugin +{ +public: + explicit ExpressionAlwaysZero(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + virtual void run() override + { + // don't use getMainFileID, it may return "" + std::string fn(handler.getMainFileName()); + + loplugin::normalizeDotDotInFilePath(fn); + // encoding of constant value for binary file format + if (loplugin::hasPathnamePrefix(fn, SRCDIR "/package/source/zipapi/ZipFile.cxx")) + return; + // some auto-generated static data + if (loplugin::hasPathnamePrefix(fn, SRCDIR "/sal/textenc/tables.cxx")) + return; + // nested conditional defines that are not worth cleaning up + if (loplugin::hasPathnamePrefix(fn, SRCDIR "/opencl/source/openclwrapper.cxx")) + return; + // some kind of matrix calculation, the compiler will optimise it out anyway + if (loplugin::hasPathnamePrefix(fn, SRCDIR "/vcl/source/gdi/bitmap4.cxx")) + return; + // code follows a pattern + if (loplugin::hasPathnamePrefix(fn, SRCDIR "/svx/source/svdraw/svdhdl.cxx")) + return; + // looks like some kind of TODO marker + if (loplugin::hasPathnamePrefix(fn, SRCDIR "/chart2/source/view/main/PropertyMapper.cxx") + || loplugin::hasPathnamePrefix(fn, SRCDIR "/sc/source/core/data/formulacell.cxx")) + return; + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } + + bool VisitBinaryOperator(BinaryOperator const*); + bool VisitCXXOperatorCallExpr(CXXOperatorCallExpr const*); + bool TraverseStaticAssertDecl(StaticAssertDecl*); + +private: + // note, abusing std::unique_ptr as a std::optional lookalike + std::unique_ptr getExprValue(const Expr* arg); +}; + +bool ExpressionAlwaysZero::VisitBinaryOperator(BinaryOperator const* binaryOperator) +{ + if (ignoreLocation(binaryOperator)) + return true; + if (binaryOperator->getBeginLoc().isMacroID()) + return true; + + auto op = binaryOperator->getOpcode(); + if (!(op == BO_And || op == BO_AndAssign || op == BO_LAnd)) + return true; + + auto lhsValue = getExprValue(binaryOperator->getLHS()); + auto rhsValue = getExprValue(binaryOperator->getRHS()); + if (lhsValue && lhsValue->getExtValue() == 0) + ; // ok + else if (rhsValue && rhsValue->getExtValue() == 0) + ; // ok + else if (lhsValue && rhsValue && (lhsValue->getExtValue() & rhsValue->getExtValue()) == 0) + ; // ok + else + return true; + report(DiagnosticsEngine::Warning, "expression always evaluates to zero, lhs=%0 rhs=%1", + binaryOperator->getBeginLoc()) + << (lhsValue ? compat::toString(*lhsValue, 10) : "unknown") + << (rhsValue ? compat::toString(*rhsValue, 10) : "unknown") + << binaryOperator->getSourceRange(); + return true; +} + +bool ExpressionAlwaysZero::VisitCXXOperatorCallExpr(CXXOperatorCallExpr const* cxxOperatorCallExpr) +{ + if (ignoreLocation(cxxOperatorCallExpr)) + return true; + if (cxxOperatorCallExpr->getBeginLoc().isMacroID()) + return true; + + auto op = cxxOperatorCallExpr->getOperator(); + if (!(op == OO_Amp || op == OO_AmpEqual || op == OO_AmpAmp)) + return true; + + if (cxxOperatorCallExpr->getNumArgs() != 2) + return true; + auto lhsValue = getExprValue(cxxOperatorCallExpr->getArg(0)); + auto rhsValue = getExprValue(cxxOperatorCallExpr->getArg(1)); + if (lhsValue && lhsValue->getExtValue() == 0) + ; // ok + else if (rhsValue && rhsValue->getExtValue() == 0) + ; // ok + else if (lhsValue && rhsValue && (lhsValue->getExtValue() & rhsValue->getExtValue()) == 0) + ; // ok + else + return true; + report(DiagnosticsEngine::Warning, "expression always evaluates to zero, lhs=%0 rhs=%1", + cxxOperatorCallExpr->getBeginLoc()) + << (lhsValue ? compat::toString(*lhsValue, 10) : "unknown") + << (rhsValue ? compat::toString(*rhsValue, 10) : "unknown") + << cxxOperatorCallExpr->getSourceRange(); + return true; +} + +std::unique_ptr ExpressionAlwaysZero::getExprValue(Expr const* expr) +{ + expr = expr->IgnoreParenCasts(); + // ignore this, it seems to trigger an infinite recursion + if (isa(expr)) + { + return std::unique_ptr(); + } + APSInt x1; + if (!expr->isValueDependent() && compat::EvaluateAsInt(expr, x1, compiler.getASTContext())) + return std::unique_ptr(new APSInt(x1)); + return std::unique_ptr(); +} + +// these will often evaluate to zero harmlessly +bool ExpressionAlwaysZero::TraverseStaticAssertDecl(StaticAssertDecl*) { return true; } + +loplugin::Plugin::Registration X("expressionalwayszero", false); +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/external.cxx b/compilerplugins/clang/external.cxx new file mode 100644 index 0000000000..8c87335539 --- /dev/null +++ b/compilerplugins/clang/external.cxx @@ -0,0 +1,610 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef LO_CLANG_SHARED_PLUGINS + +#include +#include +#include +#include +#include + +#include "clang/Sema/SemaDiagnostic.h" + +#include "check.hxx" +#include "compat.hxx" +#include "plugin.hxx" + +namespace +{ +bool derivesFromTestFixture(CXXRecordDecl const* decl) +{ + static auto const pred = [](CXXBaseSpecifier const& spec) { + if (auto const t = spec.getType()->getAs()) + { // (may be a template parameter) + return derivesFromTestFixture(dyn_cast(t->getDecl())); + } + return false; + }; + return loplugin::DeclCheck(decl).Class("TestFixture").Namespace("CppUnit").GlobalNamespace() + || std::any_of(decl->bases_begin(), decl->bases_end(), pred) + || std::any_of(decl->vbases_begin(), decl->vbases_end(), pred); +} + +bool isInjectedFunction(FunctionDecl const* decl) +{ + for (auto d = decl->redecls_begin(); d != decl->redecls_end(); ++d) + { + auto const c = d->getLexicalDeclContext(); + if (!(c->isFunctionOrMethod() || c->isRecord())) + { + return false; + } + } + return true; +} + +// Whether type1 mentions type2 (in a way relevant for argument-dependent name lookup): +bool mentions(QualType type1, QualType type2) +{ + auto t1 = type1; + for (;;) + { + if (auto const t2 = t1->getAs()) + { + t1 = t2->getPointeeType(); + } + else if (auto const t3 = t1->getAs()) + { + t1 = t3->getPointeeType(); + } + else if (auto const t4 = t1->getAsArrayTypeUnsafe()) + { + t1 = t4->getElementType(); + } + else + { + break; + } + } + if (t1.getCanonicalType().getTypePtr() == type2.getTypePtr()) + { + return true; + } + if (auto const t2 = t1->getAs()) + { + auto const args = t2->template_arguments(); + for (auto a = args.begin(); a != args.end(); ++a) + { + if (a->getKind() != TemplateArgument::Type) + { + continue; + } + if (mentions(a->getAsType(), type2)) + { + return true; + } + } + auto const t3 = t2->desugar(); + if (t3.getTypePtr() == t2) + { + return false; + } + return mentions(t3, type2); + } + if (auto const t2 = t1->getAs()) + { + if (mentions(t2->getReturnType(), type2)) + { + return true; + } + for (auto t3 = t2->param_type_begin(); t3 != t2->param_type_end(); ++t3) + { + if (mentions(*t3, type2)) + { + return true; + } + } + return false; + } + if (auto const t2 = t1->getAs()) + { + if (t2->getClass()->getUnqualifiedDesugaredType() == type2.getTypePtr()) + { + return true; + } + return mentions(t2->getPointeeType(), type2); + } + return false; +} + +bool hasSalDllpublicExportAttr(Decl const* decl) +{ + if (auto const attr = decl->getAttr()) + { + return attr->getVisibility() == VisibilityAttr::Default; + } + return decl->hasAttr(); +} + +class External : public loplugin::FilteringPlugin +{ +public: + explicit External(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } + + bool VisitTagDecl(TagDecl* decl) + { + if (isa(decl)) + { + return true; + } + if (!decl->isThisDeclarationADefinition()) + { + return true; + } + if (isa(decl->getDeclContext())) + { + return true; + } + if (!compiler.getLangOpts().CPlusPlus) + { + return true; + } + if (auto const d = dyn_cast(decl)) + { + if (d->getDescribedClassTemplate() != nullptr) + { + return true; + } + if (hasSalDllpublicExportAttr(d)) + { + // If the class definition has explicit default visibility, then assume that it + // needs to be present (e.g., a backwards-compatibility stub like in + // cppuhelper/source/compat.cxx): + return true; + } + if (derivesFromTestFixture(d)) + { + // The names of CppUnit tests (that can be specified with CPPUNIT_TEST_NAME) are + // tied to the fully-qualified names of classes derived from CppUnit::TestFixture, + // so avoid unnamed namespaces in those classes' names: + return true; + } + } + return handleDeclaration(decl); + } + + bool VisitFunctionDecl(FunctionDecl* decl) + { + if (isa(decl)) + { + return true; + } + if (decl->getTemplatedKind() != FunctionDecl::TK_NonTemplate) + { + return true; + } + if (!decl->isThisDeclarationADefinition()) + { + return true; + } + if (decl->isMain() || decl->isMSVCRTEntryPoint()) + { + return true; + } + if (loplugin::hasCLanguageLinkageType(decl) + && loplugin::DeclCheck(decl).Function("_DllMainCRTStartup").GlobalNamespace()) + { + return true; + } + // If the function definition is explicit marked SAL_DLLPUBLIC_EXPORT or similar, then + // assume that it needs to be present (e.g., only called via dlopen, or a backwards- + // compatibility stub like in sal/osl/all/compat.cxx): + if (hasSalDllpublicExportAttr(decl)) + { + return true; + } + auto const canon = decl->getCanonicalDecl(); + if (loplugin::hasCLanguageLinkageType(canon) + && (canon->hasAttr() || canon->hasAttr())) + { + return true; + } + if (compiler.getDiagnostics().getDiagnosticLevel(diag::warn_unused_function, + decl->getLocation()) + < DiagnosticsEngine::Warning) + { + // Don't warn about e.g. + // + // G_DEFINE_TYPE (GLOAction, g_lo_action, G_TYPE_OBJECT); + // + // in vcl/unx/gtk/gloactiongroup.cxx (which expands to non-static g_lo_action_get_type + // function definition), which is already wrapped in + // + // #pragma GCC diagnostic ignored "-Wunused-function" + return true; + } + if (isInjectedFunction(decl)) + { + return true; + } + return handleDeclaration(decl); + } + + bool VisitVarDecl(VarDecl* decl) + { + if (decl->isStaticDataMember()) + { + return true; + } + if (isa(decl)) + { + return true; + } + if (!decl->isThisDeclarationADefinition()) + { + return true; + } + if (loplugin::DeclCheck(decl).Var("_pRawDllMain").GlobalNamespace()) + { + return true; + } + return handleDeclaration(decl); + } + + bool VisitClassTemplateDecl(ClassTemplateDecl* decl) + { + if (!decl->isThisDeclarationADefinition()) + { + return true; + } + if (isa(decl->getDeclContext())) + { + return true; + } + return handleDeclaration(decl); + } + + bool VisitFunctionTemplateDecl(FunctionTemplateDecl* decl) + { + if (!decl->isThisDeclarationADefinition()) + { + return true; + } + if (isa(decl->getDeclContext())) + { + return true; + } + if (isInjectedFunction(decl->getTemplatedDecl())) + { + return true; + } + return handleDeclaration(decl); + } + + bool VisitVarTemplateDecl(VarTemplateDecl* decl) + { + if (!decl->isThisDeclarationADefinition()) + { + return true; + } + return handleDeclaration(decl); + } + +private: + template void reportSpecializations(T specializations) + { + for (auto const d : specializations) + { + auto const k = d->getTemplateSpecializationKind(); + if (isTemplateExplicitInstantiationOrSpecialization(k)) + { + report(DiagnosticsEngine::Note, + "explicit %select{instantiation|specialization}0 is here", d->getLocation()) + << (k == TSK_ExplicitSpecialization) << d->getSourceRange(); + } + } + } + + void computeAffectedTypes(Decl const* decl, std::vector* affected) + { + assert(affected != nullptr); + if (auto const d = dyn_cast(decl)) + { + affected->push_back(compiler.getASTContext().getEnumType(d)); + } + else + { + //TODO: Derived types are also affected! + CXXRecordDecl const* rec; + if (auto const d = dyn_cast(decl)) + { + rec = d->getTemplatedDecl(); + } + else + { + rec = cast(decl); + } + affected->push_back(compiler.getASTContext().getRecordType(rec)); + for (auto d = rec->decls_begin(); d != rec->decls_end(); ++d) + { + if (*d != (*d)->getCanonicalDecl()) + { + continue; + } + if (isa(*d) || isa(*d)) + { + if (auto const d1 = dyn_cast(*d)) + { + if (d1->isInjectedClassName()) + { + continue; + } + } + computeAffectedTypes(*d, affected); + } + } + } + } + + void reportAssociatingFunctions(std::vector const& affected, Decl* decl) + { + auto c = decl->getDeclContext(); + while (isa(c) || c->isInlineNamespace()) + { + c = c->getParent(); + } + assert(c->isTranslationUnit() || c->isNamespace()); + SmallVector parts; + c->collectAllContexts(parts); + std::list ctxs; + std::copy(parts.begin(), parts.end(), + std::back_insert_iterator>(ctxs)); + if (auto const d = dyn_cast(decl)) + { + // To find friend functions declared in the class: + ctxs.push_back(d); + } + std::set fdecls; // to report every function just once + for (auto ctx = ctxs.begin(); ctx != ctxs.end(); ++ctx) + { + for (auto i = (*ctx)->decls_begin(); i != (*ctx)->decls_end(); ++i) + { + auto d = *i; + if (auto const d1 = dyn_cast(d)) + { + ctxs.push_back(d1); + continue; + } + if (auto const d1 = dyn_cast(d)) + { + if (d1->isInline()) + { + ctxs.push_back(d1); + } + continue; + } + if (auto const d1 = dyn_cast(d)) + { + d = d1->getFriendDecl(); + if (d == nullptr) // happens for 'friend struct S;' + { + continue; + } + } + FunctionDecl const* f; + if (auto const d1 = dyn_cast(d)) + { + f = d1->getTemplatedDecl(); + } + else + { + f = dyn_cast(d); + if (f == nullptr) + { + continue; + } + } + if (!fdecls.insert(f->getCanonicalDecl()).second) + { + continue; + } + if (isa(f)) + { + continue; + } + for (auto const& t : affected) + { + auto const tc = t.getCanonicalType(); + for (auto p = f->param_begin(); p != f->param_end(); ++p) + { + if (mentions((*p)->getType(), tc)) + { + report(DiagnosticsEngine::Note, + "a %select{function|function template|function template " + "specialization}0 associating %1 is declared here", + f->getLocation()) + << (f->isFunctionTemplateSpecialization() + ? 2 + : f->getDescribedFunctionTemplate() != nullptr ? 1 : 0) + << t << f->getSourceRange(); + for (auto f1 = f->redecls_begin(); f1 != f->redecls_end(); ++f1) + { + if (*f1 == f) + { + continue; + } + report(DiagnosticsEngine::Note, "another declaration is here", + f1->getLocation()) + << f1->getSourceRange(); + } + break; + } + } + } + } + } + } + + void reportAssociatingFunctions(Decl* decl) + { + std::vector affected; // enum/class/class template + recursively affected members + computeAffectedTypes(decl, &affected); + reportAssociatingFunctions(affected, decl); + } + + bool handleDeclaration(NamedDecl* decl) + { + if (ignoreLocation(decl)) + { + return true; + } + if (decl->getLinkageInternal() < compat::Linkage::Module) + { + return true; + } + // In some cases getLinkageInternal() arguably wrongly reports ExternalLinkage, see the + // commit message of "DR1113: anonymous namespaces formally give + // their contents internal linkage": + // + // "We still deviate from the standard in one regard here: extern "C" declarations + // in anonymous namespaces are still granted external linkage. Changing those does + // not appear to have been an intentional consequence of the standard change in + // DR1113." + // + // Do not warn about such "wrongly external" declarations here: + if (decl->isInAnonymousNamespace()) + { + return true; + } + for (Decl const* d = decl; d != nullptr; d = d->getPreviousDecl()) + { + if (!compiler.getSourceManager().isInMainFile(d->getLocation())) + { + return true; + } + } + if (compiler.getSourceManager().isMacroBodyExpansion(decl->getLocation())) + { + if (Lexer::getImmediateMacroName(decl->getLocation(), compiler.getSourceManager(), + compiler.getLangOpts()) + == "MDDS_MTV_DEFINE_ELEMENT_CALLBACKS") + { + // Even wrapping in an unnamed namespace or sneaking "static" into the macro + // wouldn't help, as then some of the functions it defines would be flagged as + // unused: + return true; + } + } + else if (compiler.getSourceManager().isMacroArgExpansion(decl->getLocation())) + { + if (Lexer::getImmediateMacroName(decl->getLocation(), compiler.getSourceManager(), + compiler.getLangOpts()) + == "DEFINE_GUID") + { + // Windows, guiddef.h: + return true; + } + } + TypedefNameDecl const* typedefed = nullptr; + if (auto const d = dyn_cast(decl)) + { + typedefed = d->getTypedefNameForAnonDecl(); + } + bool canStatic; + if (auto const d = dyn_cast(decl)) + { + canStatic = d->isUnion() && d->isAnonymousStructOrUnion(); + } + else + { + canStatic = isa(decl) || isa(decl) + || isa(decl) || isa(decl); + } + // In general, moving functions into an unnamed namespace can: break ADL like in + // + // struct S1 { int f() { return 1; } }; + // int f(S1 s) { return s.f(); } + // namespace N { + // struct S2: S1 { int f() { return 0; } }; + // int f(S2 s) { return s.f(); } // [*] + // } + // int main() { return f(N::S2()); } + // + // changing from returning 0 to returning 1 when [*] is moved into an unnamed namespace; can + // conflict with function declarations in the moved function like in + // + // int f(int) { return 0; } + // namespace { int f(int) { return 1; } } + // int g() { // [*] + // int f(int); + // return f(0); + // } + // int main() { return g(); } + // + // changing from returning 0 to returning 1 when [*] is moved into an unnamed namespace; and + // can conflict with overload resolution in general like in + // + // int f(int) { return 0; } + // namespace { int f(...) { return 1; } } + // int g() { return f(0); } // [*] + // int main() { return g(); } + // + // changing from returning 0 to returning 1 when [*] is moved into an unnamed namespace: + auto const canUnnamed = compiler.getLangOpts().CPlusPlus + && !(isa(decl) || isa(decl)); + assert(canStatic || canUnnamed); + report( + DiagnosticsEngine::Warning, + ("externally available%select{| typedef'ed}0 entity %1 is not previously declared in an" + " included file (if it is only used in this translation unit," + " %select{|make it static}2%select{| or }3%select{|put it in an unnamed namespace}4;" + " otherwise, provide a declaration of it in an included file)"), + decl->getLocation()) + << (typedefed != nullptr) << (typedefed == nullptr ? decl : typedefed) << canStatic + << (canStatic && canUnnamed) << canUnnamed << decl->getSourceRange(); + for (auto d = decl->redecls_begin(); d != decl->redecls_end(); ++d) + { + if (*d == decl) + { + continue; + } + report(DiagnosticsEngine::Note, "another declaration is here", d->getLocation()) + << d->getSourceRange(); + } + //TODO: Class template specializations can be in the enclosing namespace, so no need to + // list them here (as they won't need to be put into the unnamed namespace too, unlike for + // specializations of function and variable templates); and explicit function template + // specializations cannot have storage-class specifiers, so as we only suggest to make + // function templates static (but not to move them into an unnamed namespace), no need to + // list function template specializations here, either: + if (auto const d = dyn_cast(decl)) + { + reportSpecializations(d->specializations()); + } + if (isa(decl) || isa(decl)) + { + reportAssociatingFunctions(decl); + } + return true; + } +}; + +loplugin::Plugin::Registration external("external"); + +} // namespace + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */ diff --git a/compilerplugins/clang/externandnotdefined.cxx b/compilerplugins/clang/externandnotdefined.cxx new file mode 100644 index 0000000000..5d8803a6fa --- /dev/null +++ b/compilerplugins/clang/externandnotdefined.cxx @@ -0,0 +1,78 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#ifndef LO_CLANG_SHARED_PLUGINS + +#include + +#include "compat.hxx" +#include "plugin.hxx" + +// Having an extern prototype for a method in a module and not actually declaring that method is dodgy. +// + +namespace { + +class ExternAndNotDefined: + public loplugin::FilteringPlugin +{ +public: + explicit ExternAndNotDefined(loplugin::InstantiationData const & data): FilteringPlugin(data) {} + + virtual void run() override { TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); } + + bool VisitFunctionDecl(const FunctionDecl * decl); +}; + +bool ExternAndNotDefined::VisitFunctionDecl(const FunctionDecl * functionDecl) { + if (ignoreLocation(functionDecl)) { + return true; + } + if (functionDecl->isDefined() || functionDecl->isPure() + || (functionDecl->getLinkageAndVisibility().getLinkage() + != compat::Linkage::External)) { + return true; + } + //TODO, filtering out anything template for now: + if (functionDecl->isDependentContext()) { + return true; + } + CXXRecordDecl const * r = dyn_cast(functionDecl->getDeclContext()); + if (r != nullptr && r->getTemplateSpecializationKind() != TSK_Undeclared) { + return true; + } + // this is the bison/flex C API, it has to be defined this way + std::string functionName = functionDecl->getNameAsString(); + if (functionName == "yyerror" || functionName == "yyparse" || functionName == "yylex") { + return true; + } + // see vcl/unx/gtk/app/gtksys.cxx, typename conflicts prevent using the right include + if (functionName == "gdk_x11_screen_get_screen_number") { + return true; + } + if (!compiler.getSourceManager().isInMainFile(functionDecl->getLocation())) + { + return true; + } + report( + DiagnosticsEngine::Warning, + "extern prototype in main file without definition", + functionDecl->getLocation()) + << functionDecl->getSourceRange(); + return true; +} + + +loplugin::Plugin::Registration< ExternAndNotDefined > externandnotdefined("externandnotdefined"); + +} + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/faileddyncast.cxx b/compilerplugins/clang/faileddyncast.cxx new file mode 100644 index 0000000000..078d5c884b --- /dev/null +++ b/compilerplugins/clang/faileddyncast.cxx @@ -0,0 +1,138 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ +#ifndef LO_CLANG_SHARED_PLUGINS + +#include + +#include "clang/AST/Attr.h" +#include "clang/AST/CXXInheritance.h" + +#include "plugin.hxx" + +namespace { + +// cf. Clang's clang::AST::CXXDynamicCastExpr::isAlwaysNull +// (lib/AST/ExprCXX.cpp): +bool isAlwaysNull(CXXDynamicCastExpr const * expr) { + QualType SrcType = expr->getSubExpr()->getType(); + QualType DestType = expr->getType(); + + if (const clang::PointerType *SrcPTy = SrcType->getAs()) { + SrcType = SrcPTy->getPointeeType(); +#if 0 + DestType = DestType->castAs()->getPointeeType(); +#else + auto DstPTy = DestType->getAs(); + if (!DstPTy) + return false; + DestType = DstPTy->getPointeeType(); +#endif + } + + if (DestType->isVoidType()) + return false; + +#if 0 + const CXXRecordDecl *SrcRD = + cast(SrcType->castAs()->getDecl()); +#else + auto SrcRT = SrcType->getAs(); + if (!SrcRT) + return false; + const CXXRecordDecl *SrcRD = cast(SrcRT->getDecl()); +#endif + +#if 0 + if (!SrcRD->hasAttr()) + return false; +#endif + +#if 0 + const CXXRecordDecl *DestRD = + cast(DestType->castAs()->getDecl()); +#else + auto DestRT = DestType->getAs(); + if (!DestRT) + return false; + const CXXRecordDecl *DestRD = cast(DestRT->getDecl()); +#endif + +#if 1 + if (!(SrcRD && DestRD)) + return false; + + if (DestRD->hasAttr()) { + CXXBasePaths Paths(/*FindAmbiguities=*/false, /*RecordPaths=*/true, + /*DetectVirtual=*/false); + if (DestRD->isDerivedFrom(SrcRD, Paths) && + std::all_of(Paths.begin(), Paths.end(), + [](CXXBasePath const & Path) { + return Path.Access != AS_public; })) + return true; + } + + if (!SrcRD->hasAttr()) + return false; +#endif + +#if 0 + return !DestRD->isDerivedFrom(SrcRD); +#else + return !(DestRD->isDerivedFrom(SrcRD) + || SrcRD->isDerivedFrom(DestRD) + || SrcRD == DestRD); +#endif +} + +class FailedDynCast: + public loplugin::FilteringPlugin +{ +public: + explicit FailedDynCast(loplugin::InstantiationData const & data): + FilteringPlugin(data) {} + + bool shouldVisitTemplateInstantiations() const { return true; } + + bool preRun() override; + void run() override; + + bool VisitCXXDynamicCastExpr(CXXDynamicCastExpr const * expr); +}; + +bool FailedDynCast::preRun() { + return compiler.getLangOpts().CPlusPlus; +} + +void FailedDynCast::run() { + if (preRun()) { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + } +} + +bool FailedDynCast::VisitCXXDynamicCastExpr(CXXDynamicCastExpr const * expr) { + if (ignoreLocation(expr)) { + return true; + } + if (isAlwaysNull(expr)) { + report( + DiagnosticsEngine::Warning, + "dynamic_cast from %0 to %1 always fails", expr->getBeginLoc()) + << expr->getSubExpr()->getType() << expr->getType() + << expr->getSourceRange(); + } + return true; +} + +loplugin::Plugin::Registration faileddyncast("faileddyncast"); + +} // namespace + +#endif // LO_CLANG_SHARED_PLUGINS + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/fakebool.cxx b/compilerplugins/clang/fakebool.cxx new file mode 100644 index 0000000000..cc7a9434a6 --- /dev/null +++ b/compilerplugins/clang/fakebool.cxx @@ -0,0 +1,910 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#include +#include +#include +#include +#include + +#include "clang/AST/Attr.h" +#include "clang/Basic/Builtins.h" + +#include "config_clang.h" + +#include "check.hxx" +#include "functionaddress.hxx" +#include "plugin.hxx" + +namespace { + +enum FakeBoolKind { + FBK_No, + FBK_BOOL, FBK_First = FBK_BOOL, + FBK_Boolean, FBK_FT_Bool, FBK_FcBool, FBK_GLboolean, FBK_NPBool, FBK_TW_BOOL, FBK_UBool, + FBK_boolean, FBK_dbus_bool_t, FBK_gboolean, FBK_hb_boot_t, FBK_jboolean, FBK_my_bool, + FBK_sal_Bool, + FBK_End }; + // matches loplugin::TypeCheck::AnyBoolean (compilerplugins/clang/check.hxx) + +StringRef getName(FakeBoolKind k) { + static constexpr llvm::StringLiteral names[] = { + "BOOL", "Boolean", "FT_Bool", "FcBool", "GLboolean", "NPBool", "TW_BOOL", "UBool", + "boolean", "dbus_bool_t", "gboolean", "hb_boot_t", "jboolean", "my_bool", "sal_Bool"}; + assert(k >= FBK_First && k < FBK_End); + return names[k - FBK_First]; +} + +FakeBoolKind isFakeBool(QualType type) { + TypedefType const * t = type->getAs(); + if (t != nullptr) { + auto const name = t->getDecl()->getName(); + for (int i = FBK_First; i != FBK_End; ++i) { + auto const k = FakeBoolKind(i); + if (name == getName(k)) { + return k; + } + } + } + return FBK_No; +} + +FakeBoolKind isFakeBoolArray(QualType type) { + auto t = type->getAsArrayTypeUnsafe(); + if (t == nullptr) { + return FBK_No; + } + auto const k = isFakeBool(t->getElementType()); + if (k != FBK_No) { + return k; + } + return isFakeBoolArray(t->getElementType()); +} + +// It appears that, given a function declaration, there is no way to determine +// the language linkage of the function's type, only of the function's name +// (via FunctionDecl::isExternC); however, in a case like +// +// extern "C" { static void f(); } +// +// the function's name does not have C language linkage while the function's +// type does (as clarified in C++11 [decl.link]); cf. +// "Language linkage of function type": +bool hasCLanguageLinkageType(FunctionDecl const * decl) { + assert(decl != nullptr); + if (decl->isExternC()) { + return true; + } + if (decl->isInExternCContext()) { + return true; + } + return false; +} + +enum class OverrideKind { NO, YES, MAYBE }; + +OverrideKind getOverrideKind(FunctionDecl const * decl) { + CXXMethodDecl const * m = dyn_cast(decl); + if (m == nullptr) { + return OverrideKind::NO; + } + if (m->size_overridden_methods() != 0 || m->hasAttr()) { + return OverrideKind::YES; + } + if (!dyn_cast(m->getDeclContext())->hasAnyDependentBases()) { + return OverrideKind::NO; + } + return OverrideKind::MAYBE; +} + +enum class BoolOverloadKind { No, Yes, CheckNext }; + +BoolOverloadKind isBoolOverloadOf( + FunctionDecl const * f, FunctionDecl const * decl, bool mustBeDeleted) +{ + if (!mustBeDeleted || f->isDeleted()) { + unsigned n = decl->getNumParams(); + if (f->getNumParams() == n) { + bool hasFB = false; + for (unsigned i = 0; i != n; ++i) { + QualType t1 { decl->getParamDecl(i)->getType() }; + bool isFB = isFakeBool(t1) != FBK_No; + bool isFBRef = !isFB && t1->isReferenceType() + && isFakeBool(t1.getNonReferenceType()) != FBK_No; + QualType t2 { f->getParamDecl(i)->getType() }; + if (!(isFB + ? t2->isBooleanType() + : isFBRef + ? (t2->isReferenceType() + && t2.getNonReferenceType()->isBooleanType()) + : t2.getCanonicalType() == t1.getCanonicalType())) + { + return BoolOverloadKind::CheckNext; + } + hasFB |= isFB || isFBRef; + } + return hasFB ? BoolOverloadKind::Yes : BoolOverloadKind::No; + // cheaply protect against the case where decl would have no + // fake bool parameters at all and would match itself + } + } + return BoolOverloadKind::CheckNext; +} + +//TODO: current implementation is not at all general, just tests what we +// encounter in practice: +bool hasBoolOverload(FunctionDecl const * decl, bool mustBeDeleted) { + auto ctx = decl->getDeclContext(); + if (!ctx->isLookupContext()) { + return false; + } + auto res = ctx->lookup(decl->getDeclName()); + for (auto d = res.begin(); d != res.end(); ++d) { + if (auto f = dyn_cast(*d)) { + switch (isBoolOverloadOf(f, decl, mustBeDeleted)) { + case BoolOverloadKind::No: + return false; + case BoolOverloadKind::Yes: + return true; + case BoolOverloadKind::CheckNext: + break; + } + } else if (auto ftd = dyn_cast(*d)) { + for (auto f: ftd->specializations()) { + if (f->getTemplateSpecializationKind() + == TSK_ExplicitSpecialization) + { + switch (isBoolOverloadOf(f, decl, mustBeDeleted)) { + case BoolOverloadKind::No: + return false; + case BoolOverloadKind::Yes: + return true; + case BoolOverloadKind::CheckNext: + break; + } + } + } + } + } + return false; +} + +class FakeBool: + public loplugin::FunctionAddress> +{ +public: + explicit FakeBool(loplugin::InstantiationData const & data): + FunctionAddress(data) {} + + virtual void run() override; + + bool VisitUnaryOperator(UnaryOperator * op); + + bool VisitCallExpr(CallExpr * expr); + + bool VisitCStyleCastExpr(CStyleCastExpr * expr); + + bool VisitCXXStaticCastExpr(CXXStaticCastExpr * expr); + + bool VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr * expr); + + bool VisitImplicitCastExpr(ImplicitCastExpr * expr); + + bool VisitReturnStmt(ReturnStmt const * stmt); + + bool WalkUpFromParmVarDecl(ParmVarDecl const * decl); + bool VisitParmVarDecl(ParmVarDecl const * decl); + + bool WalkUpFromVarDecl(VarDecl const * decl); + bool VisitVarDecl(VarDecl const * decl); + + bool WalkUpFromFieldDecl(FieldDecl const * decl); + bool VisitFieldDecl(FieldDecl const * decl); + + bool WalkUpFromFunctionDecl(FunctionDecl const * decl); + bool VisitFunctionDecl(FunctionDecl const * decl); + + bool VisitValueDecl(ValueDecl const * decl); + + bool TraverseLinkageSpecDecl(LinkageSpecDecl * decl); + +private: + bool isFromCIncludeFile(SourceLocation spellingLocation) const; + + bool isSharedCAndCppCode(SourceLocation location) const; + + bool rewrite(SourceLocation location, FakeBoolKind kind); + + std::map varDecls_; + std::map fieldDecls_; + std::map parmVarDecls_; + std::map functionDecls_; + unsigned int externCContexts_ = 0; +}; + +void FakeBool::run() { + if (compiler.getLangOpts().CPlusPlus) { + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + for (auto const & dcl: varDecls_) { + auto const decl = dcl.first; auto const fbk = dcl.second; + SourceLocation loc { decl->getBeginLoc() }; + TypeSourceInfo * tsi = decl->getTypeSourceInfo(); + if (tsi != nullptr) { + SourceLocation l { + compiler.getSourceManager().getExpansionLoc( + tsi->getTypeLoc().getBeginLoc()) }; + SourceLocation end { + compiler.getSourceManager().getExpansionLoc( + tsi->getTypeLoc().getEndLoc()) }; + assert(l.isFileID() && end.isFileID()); + if (l == end + || compiler.getSourceManager().isBeforeInTranslationUnit( + l, end)) + { + for (;;) { + unsigned n = Lexer::MeasureTokenLength( + l, compiler.getSourceManager(), + compiler.getLangOpts()); + std::string s { + compiler.getSourceManager().getCharacterData(l), + n }; + if (s == getName(fbk)) { + loc = l; + break; + } + if (l == end) { + break; + } + l = l.getLocWithOffset(std::max(n, 1)); + } + } + } + if (!(suppressWarningAt(loc) || rewrite(loc, fbk))) { + report( + DiagnosticsEngine::Warning, + "VarDecl, use \"bool\" instead of %0", loc) + << decl->getType().getLocalUnqualifiedType() + << decl->getSourceRange(); + } + } + for (auto const & dcl: fieldDecls_) { + auto const decl = dcl.first; auto const fbk = dcl.second; + SourceLocation loc { decl->getBeginLoc() }; + TypeSourceInfo * tsi = decl->getTypeSourceInfo(); + if (tsi != nullptr) { + SourceLocation l { + compiler.getSourceManager().getExpansionLoc( + tsi->getTypeLoc().getBeginLoc()) }; + SourceLocation end { + compiler.getSourceManager().getExpansionLoc( + tsi->getTypeLoc().getEndLoc()) }; + assert(l.isFileID() && end.isFileID()); + if (l == end + || compiler.getSourceManager().isBeforeInTranslationUnit( + l, end)) + { + for (;;) { + unsigned n = Lexer::MeasureTokenLength( + l, compiler.getSourceManager(), + compiler.getLangOpts()); + std::string s { + compiler.getSourceManager().getCharacterData(l), + n }; + if (s == getName(fbk)) { + loc = l; + break; + } + if (l == end) { + break; + } + l = l.getLocWithOffset(std::max(n, 1)); + } + } + } + if (!(suppressWarningAt(loc) || rewrite(loc, fbk))) { + report( + DiagnosticsEngine::Warning, + "FieldDecl, use \"bool\" instead of %0", loc) + << decl->getType().getLocalUnqualifiedType() << decl->getSourceRange(); + } + } + auto const ignoredFns = getFunctionsWithAddressTaken(); + for (auto const & dcl: parmVarDecls_) { + auto const decl = dcl.first; auto const fbk = dcl.second; + FunctionDecl const * f = cast(decl->getDeclContext())->getCanonicalDecl(); + if (ignoredFns.find(f) != ignoredFns.end()) { + continue; + } + SourceLocation loc { decl->getBeginLoc() }; + TypeSourceInfo * tsi = decl->getTypeSourceInfo(); + if (tsi != nullptr) { + SourceLocation l { + compiler.getSourceManager().getExpansionLoc( + tsi->getTypeLoc().getBeginLoc()) }; + SourceLocation end { + compiler.getSourceManager().getExpansionLoc( + tsi->getTypeLoc().getEndLoc()) }; + assert(l.isFileID() && end.isFileID()); + if (l == end + || (compiler.getSourceManager() + .isBeforeInTranslationUnit(l, end))) + { + for (;;) { + unsigned n = Lexer::MeasureTokenLength( + l, compiler.getSourceManager(), + compiler.getLangOpts()); + std::string s { + compiler.getSourceManager().getCharacterData(l), + n }; + if (s == getName(fbk)) { + loc = l; + break; + } + if (l == end) { + break; + } + l = l.getLocWithOffset(std::max(n, 1)); + } + } + } + // Only rewrite declarations in include files if a + // definition is also seen, to avoid compilation of a + // definition (in a main file only processed later) to fail + // with a "mismatch" error before the rewriter had a chance + // to act upon the definition (but use the heuristic of + // assuming pure virtual functions do not have definitions); + // also, do not automatically rewrite functions that could + // implicitly override depend base functions (and thus stop + // doing so after the rewrite; note that this is less + // dangerous for return types than for parameter types, + // where the function would still implicitly override and + // cause a compilation error due to the incompatible return + // type): + OverrideKind k = getOverrideKind(f); + if (!((compiler.getSourceManager().isInMainFile( + compiler.getSourceManager().getSpellingLoc( + dyn_cast( + decl->getDeclContext()) + ->getNameInfo().getLoc())) + || f->isDefined() || f->isPure()) + && k != OverrideKind::MAYBE && rewrite(loc, fbk))) + { + report( + DiagnosticsEngine::Warning, + ("ParmVarDecl, use \"bool\" instead of" + " %0%1"), + loc) + << decl->getType().getNonReferenceType().getLocalUnqualifiedType() + << (k == OverrideKind::MAYBE + ? (" (unless this member function overrides a" + " dependent base member function, even" + " though it is not marked 'override')") + : "") + << decl->getSourceRange(); + } + } + for (auto const & dcl: functionDecls_) { + auto const decl = dcl.first; auto const fbk = dcl.second; + FunctionDecl const * f = decl->getCanonicalDecl(); + if (ignoredFns.find(f) != ignoredFns.end()) { + continue; + } + SourceLocation loc { decl->getBeginLoc() }; + SourceLocation l { compiler.getSourceManager().getExpansionLoc( + loc) }; + SourceLocation end { compiler.getSourceManager().getExpansionLoc( + decl->getNameInfo().getLoc()) }; + assert(l.isFileID() && end.isFileID()); + if (compiler.getSourceManager().isBeforeInTranslationUnit(l, end)) { + while (l != end) { + unsigned n = Lexer::MeasureTokenLength( + l, compiler.getSourceManager(), compiler.getLangOpts()); + std::string s { + compiler.getSourceManager().getCharacterData(l), n }; + if (s == getName(fbk)) { + loc = l; + break; + } + l = l.getLocWithOffset(std::max(n, 1)); + } + } + // Only rewrite declarations in include files if a definition is + // also seen, to avoid compilation of a definition (in a main file + // only processed later) to fail with a "mismatch" error before the + // rewriter had a chance to act upon the definition (but use the + // heuristic of assuming pure virtual functions do not have + // definitions): + if (!((compiler.getSourceManager().isInMainFile( + compiler.getSourceManager().getSpellingLoc( + decl->getNameInfo().getLoc())) + || f->isDefined() || f->isPure()) + && rewrite(loc, fbk))) + { + report( + DiagnosticsEngine::Warning, + "use \"bool\" instead of %0 as return type%1", + loc) + << decl->getReturnType().getNonReferenceType().getLocalUnqualifiedType() + << (getOverrideKind(f) == OverrideKind::MAYBE + ? (" (unless this member function overrides a dependent" + " base member function, even though it is not marked" + " 'override')") + : "") + << decl->getSourceRange(); + } + } + } +} + +bool FakeBool::VisitUnaryOperator(UnaryOperator * op) { + if (op->getOpcode() != UO_AddrOf) { + return FunctionAddress::VisitUnaryOperator(op); + } + FunctionAddress::VisitUnaryOperator(op); + Expr const * e1 = op->getSubExpr()->IgnoreParenCasts(); + if (isFakeBool(e1->getType()) != FBK_No) { + if (DeclRefExpr const * e2 = dyn_cast(e1)) { + if (auto const d = dyn_cast(e2->getDecl())) { + varDecls_.erase(d); + } else if (auto const d = dyn_cast(e2->getDecl())) { + fieldDecls_.erase(d); + } + } else if (auto const e3 = dyn_cast(e1)) { + if (auto const d = dyn_cast(e3->getMemberDecl())) { + fieldDecls_.erase(d); + } + } + } + return true; +} + +bool FakeBool::VisitCallExpr(CallExpr * expr) { + Decl const * d = expr->getCalleeDecl(); + FunctionProtoType const * ft = nullptr; + if (d != nullptr) { + FunctionDecl const * fd = dyn_cast(d); + if (fd != nullptr) { + if (!hasBoolOverload(fd, false)) { + clang::PointerType const * pt = fd->getType() + ->getAs(); + QualType t2( + pt == nullptr ? fd->getType() : pt->getPointeeType()); + ft = t2->getAs(); + assert( + ft != nullptr || !compiler.getLangOpts().CPlusPlus + || (fd->getBuiltinID() != Builtin::NotBuiltin + && isa(t2))); + // __builtin_*s have no proto type? + } + } else { + VarDecl const * vd = dyn_cast(d); + if (vd != nullptr) { + clang::PointerType const * pt = vd->getType() + ->getAs(); + ft = (pt == nullptr ? vd->getType() : pt->getPointeeType()) + ->getAs(); + } + } + } + if (ft != nullptr) { + for (unsigned i = 0; i != ft->getNumParams(); ++i) { + QualType t(ft->getParamType(i)); + bool b = false; + if (t->isLValueReferenceType()) { + t = t.getNonReferenceType(); + b = !t.isConstQualified() && isFakeBool(t) != FBK_No; + } else if (t->isPointerType()) { + for (;;) { + auto t2 = t->getAs(); + if (t2 == nullptr) { + break; + } + t = t2->getPointeeType(); + } + b = isFakeBool(t) != FBK_No; + } + if (b && i < expr->getNumArgs()) { + auto const e1 = expr->getArg(i)->IgnoreParenImpCasts(); + if (DeclRefExpr * ref = dyn_cast(e1)) { + VarDecl const * d = dyn_cast(ref->getDecl()); + if (d != nullptr) { + varDecls_.erase(d); + } + } else if (auto const e2 = dyn_cast(e1)) { + if (auto const d = dyn_cast(e2->getMemberDecl())) { + fieldDecls_.erase(d); + } + } + } + } + } + return true; +} + +bool FakeBool::VisitCStyleCastExpr(CStyleCastExpr * expr) { + if (ignoreLocation(expr)) { + return true; + } + auto const k = isFakeBool(expr->getType()); + if (k != FBK_No) { + SourceLocation loc { expr->getBeginLoc() }; + while (compiler.getSourceManager().isMacroArgExpansion(loc)) { + loc = compiler.getSourceManager().getImmediateMacroCallerLoc(loc); + } + if (compiler.getSourceManager().isMacroBodyExpansion(loc)) { + StringRef name { Lexer::getImmediateMacroName( + loc, compiler.getSourceManager(), compiler.getLangOpts()) }; + if (k == FBK_sal_Bool && (name == "sal_False" || name == "sal_True")) { + auto callLoc = compiler.getSourceManager() + .getImmediateMacroCallerLoc(loc); + if (!isSharedCAndCppCode(callLoc)) { + SourceLocation argLoc; + if (compiler.getSourceManager().isMacroArgExpansion( + expr->getBeginLoc(), &argLoc) + //TODO: check it's the complete (first) arg to the macro + && (Lexer::getImmediateMacroName( + argLoc, compiler.getSourceManager(), + compiler.getLangOpts()) + == "CPPUNIT_ASSERT_EQUAL")) + { + // Ignore sal_False/True that are directly used as + // arguments to CPPUNIT_ASSERT_EQUAL: + return true; + } + if (suppressWarningAt(callLoc)) { + return true; + } + bool b = k == FBK_sal_Bool && name == "sal_True"; + if (rewriter != nullptr) { + auto callSpellLoc = compiler.getSourceManager() + .getSpellingLoc(callLoc); + unsigned n = Lexer::MeasureTokenLength( + callSpellLoc, compiler.getSourceManager(), + compiler.getLangOpts()); + if (StringRef( + compiler.getSourceManager().getCharacterData( + callSpellLoc), + n) + == name) + { + return replaceText( + callSpellLoc, n, b ? "true" : "false"); + } + } + report( + DiagnosticsEngine::Warning, + "use '%select{false|true}0' instead of '%1'", callLoc) + << b << name << expr->getSourceRange(); + } + return true; + } + if (isSharedCAndCppCode(loc)) { + return true; + } + } + report( + DiagnosticsEngine::Warning, + "CStyleCastExpr, suspicious cast from %0 to %1", + expr->getBeginLoc()) + << expr->getSubExpr()->IgnoreParenImpCasts()->getType() + << expr->getType() << expr->getSourceRange(); + } + return true; +} + +bool FakeBool::VisitCXXStaticCastExpr(CXXStaticCastExpr * expr) { + if (ignoreLocation(expr)) { + return true; + } + if (isFakeBool(expr->getType()) == FBK_No) { + return true; + } + if (suppressWarningAt(expr->getBeginLoc())) { + return true; + } + report( + DiagnosticsEngine::Warning, + "CXXStaticCastExpr, suspicious cast from %0 to %1", + expr->getBeginLoc()) + << expr->getSubExpr()->IgnoreParenImpCasts()->getType() + << expr->getType() << expr->getSourceRange(); + return true; +} + +bool FakeBool::VisitCXXFunctionalCastExpr(CXXFunctionalCastExpr * expr) { + if (ignoreLocation(expr)) { + return true; + } + if (isFakeBool(expr->getType()) != FBK_No) { + report( + DiagnosticsEngine::Warning, + "CXXFunctionalCastExpr, suspicious cast from %0 to %1", + expr->getBeginLoc()) + << expr->getSubExpr()->IgnoreParenImpCasts()->getType() + << expr->getType() << expr->getSourceRange(); + } + return true; +} + +bool FakeBool::VisitImplicitCastExpr(ImplicitCastExpr * expr) { + FunctionAddress::VisitImplicitCastExpr(expr); + if (ignoreLocation(expr)) { + return true; + } + if (isFakeBool(expr->getType()) == FBK_No) { + return true; + } + auto l = expr->getBeginLoc(); + while (compiler.getSourceManager().isMacroArgExpansion(l)) { + l = compiler.getSourceManager().getImmediateMacroCallerLoc(l); + } + if (compiler.getSourceManager().isMacroBodyExpansion(l) && isSharedCAndCppCode(l)) { + return true; + } + auto e1 = expr->getSubExprAsWritten(); + auto t = e1->getType(); + if (!t->isFundamentalType() || loplugin::TypeCheck(t).AnyBoolean()) { + return true; + } + auto e2 = dyn_cast(e1); + if (e2 != nullptr) { + auto ic1 = dyn_cast( + e2->getTrueExpr()->IgnoreParens()); + auto ic2 = dyn_cast( + e2->getFalseExpr()->IgnoreParens()); + if (ic1 != nullptr && ic2 != nullptr + && ic1->getType()->isSpecificBuiltinType(BuiltinType::Int) + && (loplugin::TypeCheck(ic1->getSubExprAsWritten()->getType()) + .AnyBoolean()) + && ic2->getType()->isSpecificBuiltinType(BuiltinType::Int) + && (loplugin::TypeCheck(ic2->getSubExprAsWritten()->getType()) + .AnyBoolean())) + { + return true; + } + } + report( + DiagnosticsEngine::Warning, "conversion from %0 to %1", + expr->getBeginLoc()) + << t << expr->getType() << expr->getSourceRange(); + return true; +} + +bool FakeBool::VisitReturnStmt(ReturnStmt const * stmt) { + // Just enough to avoid warnings in rtl_getUriCharClass (sal/rtl/uri.cxx), + // which has + // + // static sal_Bool const aCharClass[][nCharClassSize] = ...; + // + // and + // + // return aCharClass[eCharClass]; + // + if (ignoreLocation(stmt)) { + return true; + } + auto e = stmt->getRetValue(); + if (e == nullptr) { + return true; + } + auto t = e->getType(); + if (!t->isPointerType()) { + return true; + } + for (;;) { + auto t2 = t->getAs(); + if (t2 == nullptr) { + break; + } + t = t2->getPointeeType(); + } + if (isFakeBool(t) != FBK_sal_Bool) { + return true; + } + auto e2 = dyn_cast(e->IgnoreParenImpCasts()); + if (e2 == nullptr) { + return true; + } + auto e3 = dyn_cast(e2->getBase()->IgnoreParenImpCasts()); + if (e3 == nullptr) { + return true; + } + auto d = dyn_cast(e3->getDecl()); + if (d == nullptr) { + return true; + } + varDecls_.erase(d); + return true; +} + +bool FakeBool::WalkUpFromParmVarDecl(ParmVarDecl const * decl) { + return VisitParmVarDecl(decl); +} + +bool FakeBool::VisitParmVarDecl(ParmVarDecl const * decl) { + if (ignoreLocation(decl)) { + return true; + } + auto const fbk = isFakeBool(decl->getType().getNonReferenceType()); + if (fbk != FBK_No) { + FunctionDecl const * f = dyn_cast(decl->getDeclContext()); + if (f != nullptr) { // e.g.: typedef sal_Bool (* FuncPtr )( sal_Bool ); + f = f->getCanonicalDecl(); + if (handler.isAllRelevantCodeDefined(f) + && !(hasCLanguageLinkageType(f) + || (fbk == FBK_sal_Bool && isInUnoIncludeFile(f) + && (!f->isInlined() || f->hasAttr() + || decl->getType()->isReferenceType() + || hasBoolOverload(f, false))) + || f->isDeleted() || hasBoolOverload(f, true))) + { + OverrideKind k = getOverrideKind(f); + if (k != OverrideKind::YES) { + parmVarDecls_.insert({decl, fbk}); + } + } + } + } + return true; +} + +bool FakeBool::WalkUpFromVarDecl(VarDecl const * decl) { + return VisitVarDecl(decl); +} + +bool FakeBool::VisitVarDecl(VarDecl const * decl) { + if (ignoreLocation(decl)) { + return true; + } + if (decl->isExternC()) { + return true; + } + auto k = isFakeBool(decl->getType()); + if (k == FBK_No) { + k = isFakeBoolArray(decl->getType()); + } + if (k == FBK_No) { + return true; + } + auto l = decl->getBeginLoc(); + while (compiler.getSourceManager().isMacroArgExpansion(l)) { + l = compiler.getSourceManager().getImmediateMacroCallerLoc(l); + } + if (compiler.getSourceManager().isMacroBodyExpansion(l) + && isSharedCAndCppCode(l)) + { + return true; + } + varDecls_.insert({decl, k}); + return true; +} + +bool FakeBool::WalkUpFromFieldDecl(FieldDecl const * decl) { + return VisitFieldDecl(decl); +} + +bool FakeBool::VisitFieldDecl(FieldDecl const * decl) { + if (ignoreLocation(decl)) { + return true; + } + auto k = isFakeBool(decl->getType()); + if (k == FBK_No) { + k = isFakeBoolArray(decl->getType()); + } + if (k == FBK_No) { + return true; + } + if (!handler.isAllRelevantCodeDefined(decl)) { + return true; + } + TagDecl const * td = dyn_cast(decl->getDeclContext()); + if (td == nullptr) { + //TODO: ObjCInterface + return true; + } + if (!(((td->isStruct() || td->isUnion()) && td->isExternCContext()) + || isInUnoIncludeFile( + compiler.getSourceManager().getSpellingLoc( + decl->getLocation())))) + { + fieldDecls_.insert({decl, k}); + } + return true; +} + +bool FakeBool::WalkUpFromFunctionDecl(FunctionDecl const * decl) { + return VisitFunctionDecl(decl); +} + +bool FakeBool::VisitFunctionDecl(FunctionDecl const * decl) { + if (ignoreLocation(decl)) { + return true; + } + auto const fbk = isFakeBool(decl->getReturnType().getNonReferenceType()); + if (fbk != FBK_No + && !(decl->isDeletedAsWritten() && isa(decl)) + && handler.isAllRelevantCodeDefined(decl)) + { + FunctionDecl const * f = decl->getCanonicalDecl(); + OverrideKind k = getOverrideKind(f); + if (k != OverrideKind::YES + && !(hasCLanguageLinkageType(f) + || (isInUnoIncludeFile(f) + && (!f->isInlined() || f->hasAttr())))) + { + functionDecls_.insert({decl, fbk}); + } + } + return true; +} + +bool FakeBool::VisitValueDecl(ValueDecl const * decl) { + if (ignoreLocation(decl)) { + return true; + } + auto const k = isFakeBool(decl->getType()); + if (k != FBK_No && !rewrite(decl->getBeginLoc(), k)) { + report( + DiagnosticsEngine::Warning, + "ValueDecl, use \"bool\" instead of %0", + decl->getBeginLoc()) + << decl->getType() << decl->getSourceRange(); + } + return true; +} + +bool FakeBool::TraverseLinkageSpecDecl(LinkageSpecDecl * decl) { + assert(externCContexts_ != std::numeric_limits::max()); //TODO + ++externCContexts_; + bool ret = RecursiveASTVisitor::TraverseLinkageSpecDecl(decl); + assert(externCContexts_ != 0); + --externCContexts_; + return ret; +} + +bool FakeBool::isFromCIncludeFile(SourceLocation spellingLocation) const { + return !compiler.getSourceManager().isInMainFile(spellingLocation) + && (StringRef( + compiler.getSourceManager().getPresumedLoc(spellingLocation) + .getFilename()) + .endswith(".h")); +} + +bool FakeBool::isSharedCAndCppCode(SourceLocation location) const { + // Assume that code is intended to be shared between C and C++ if it comes + // from an include file ending in .h, and is either in an extern "C" context + // or the body of a macro definition: + return + isFromCIncludeFile(compiler.getSourceManager().getSpellingLoc(location)) + && (externCContexts_ != 0 + || compiler.getSourceManager().isMacroBodyExpansion(location)); +} + +bool FakeBool::rewrite(SourceLocation location, FakeBoolKind kind) { + if (rewriter != nullptr) { + //TODO: "::sal_Bool" -> "bool", not "::bool" + SourceLocation loc { compiler.getSourceManager().getExpansionLoc( + location) }; + unsigned n = Lexer::MeasureTokenLength( + loc, compiler.getSourceManager(), compiler.getLangOpts()); + if (std::string(compiler.getSourceManager().getCharacterData(loc), n) + == getName(kind)) + { + return replaceText(loc, n, "bool"); + } + } + return false; +} + +loplugin::Plugin::Registration X("fakebool", true); + +} + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/fieldcanbelocal.cxx b/compilerplugins/clang/fieldcanbelocal.cxx new file mode 100644 index 0000000000..ae1af187be --- /dev/null +++ b/compilerplugins/clang/fieldcanbelocal.cxx @@ -0,0 +1,464 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#if !defined _WIN32 //TODO, #include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "config_clang.h" + +#include "plugin.hxx" +#include "compat.hxx" +#include "check.hxx" + +#include "clang/AST/ParentMapContext.h" + +/** + Look for fields on objects that can be local variables. + Not a particularly smart plugin, generates a lot of false positives, and requires review of the output. + Mostly looks for fields that are only accessed within a single method. +*/ + +namespace +{ +struct MyFuncInfo +{ + std::string returnType; + std::string nameAndParams; + std::string sourceLocation; +}; + +struct MyFieldInfo +{ + std::string parentClass; + std::string fieldName; + std::string fieldType; + std::string sourceLocation; +}; + +// try to limit the voluminous output a little +// if the value is nullptr, that indicates that we touched that field from more than one function +static std::unordered_map touchedMap; + +class FieldCanBeLocal : public loplugin::FilteringPlugin +{ +public: + explicit FieldCanBeLocal(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + virtual void run() override; + + bool shouldVisitTemplateInstantiations() const { return true; } + bool shouldVisitImplicitCode() const { return true; } + + bool TraverseCXXConstructorDecl(CXXConstructorDecl*); + bool TraverseCXXMethodDecl(CXXMethodDecl*); + bool TraverseFunctionDecl(FunctionDecl*); + + bool VisitMemberExpr(const MemberExpr*); + bool VisitDeclRefExpr(const DeclRefExpr*); + bool VisitInitListExpr(const InitListExpr*); + bool VisitCXXConstructorDecl(const CXXConstructorDecl*); + +private: + MyFieldInfo niceName(const FieldDecl*); + MyFuncInfo niceName(const FunctionDecl*); + std::string toString(SourceLocation loc); + void checkTouched(const FieldDecl* fieldDecl, const FunctionDecl*); + bool isSomeKindOfConstant(const Expr* arg); + + RecordDecl* insideMoveOrCopyOrCloneDeclParent = nullptr; + RecordDecl* insideStreamOutputOperator = nullptr; + // For reasons I do not understand, parentFunctionDecl() is not reliable, so + // we store the parent function on the way down the AST. + FunctionDecl* insideFunctionDecl = nullptr; +}; + +void FieldCanBeLocal::run() +{ + handler.enableTreeWideAnalysisMode(); + + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + + if (!isUnitTestMode()) + { + // dump all our output in one write call - this is to try and limit IO "crosstalk" between multiple processes + // writing to the same logfile + std::string output; + output.reserve(64 * 1024); + for (const auto& pair : touchedMap) + { + if (pair.first->getParent()->isLambda()) + continue; + MyFieldInfo s = niceName(pair.first); + output += "definition:\t" + s.parentClass // + + "\t" + s.fieldName // + + "\t" + s.fieldType // + + "\t" + s.sourceLocation // + + "\n"; + // we have to output a negative, in case, in some other file, it is touched only once + if (!pair.second) + output += "touched:\t" + s.parentClass // + + "\t" + s.fieldName // + + "\tNegative" // + + "\tnowhere.cxx" // + + "\n"; + else + { + MyFuncInfo s2 = niceName(pair.second); + output += "touched:\t" + s.parentClass // + + "\t" + s.fieldName // + + "\t" + s2.returnType + " " + s2.nameAndParams // + + "\t" + s2.sourceLocation // + + "\n"; + } + } + std::ofstream myfile; + myfile.open(WORKDIR "/loplugin.fieldcanbelocal.log", std::ios::app | std::ios::out); + myfile << output; + myfile.close(); + } + else + { + // for (const MyFieldInfo & s : readFromSet) + // report( + // DiagnosticsEngine::Warning, + // "read %0", + // s.parentRecord->getBeginLoc()) + // << s.fieldName; + } +} + +MyFieldInfo FieldCanBeLocal::niceName(const FieldDecl* fieldDecl) +{ + MyFieldInfo aInfo; + + const RecordDecl* recordDecl = fieldDecl->getParent(); + + if (const CXXRecordDecl* cxxRecordDecl = dyn_cast(recordDecl)) + { + if (cxxRecordDecl->getTemplateInstantiationPattern()) + cxxRecordDecl = cxxRecordDecl->getTemplateInstantiationPattern(); + aInfo.parentClass = cxxRecordDecl->getQualifiedNameAsString(); + } + else + { + aInfo.parentClass = recordDecl->getQualifiedNameAsString(); + } + + aInfo.fieldName = fieldDecl->getNameAsString(); + // sometimes the name (if it's an anonymous thing) contains the full path of the build folder, which we don't need + size_t idx = aInfo.fieldName.find(SRCDIR); + if (idx != std::string::npos) + { + aInfo.fieldName = aInfo.fieldName.replace(idx, strlen(SRCDIR), ""); + } + aInfo.fieldType = fieldDecl->getType().getAsString(); + + SourceLocation expansionLoc + = compiler.getSourceManager().getExpansionLoc(fieldDecl->getLocation()); + StringRef name = getFilenameOfLocation(expansionLoc); + aInfo.sourceLocation + = std::string(name.substr(strlen(SRCDIR) + 1)) + ":" + + std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc)); + loplugin::normalizeDotDotInFilePath(aInfo.sourceLocation); + + return aInfo; +} + +MyFuncInfo FieldCanBeLocal::niceName(const FunctionDecl* functionDecl) +{ + if (functionDecl->getInstantiatedFromMemberFunction()) + functionDecl = functionDecl->getInstantiatedFromMemberFunction(); + else if (functionDecl->getTemplateInstantiationPattern()) + functionDecl = functionDecl->getTemplateInstantiationPattern(); + + MyFuncInfo aInfo; + if (!isa(functionDecl)) + { + aInfo.returnType = functionDecl->getReturnType().getCanonicalType().getAsString(); + } + else + { + aInfo.returnType = ""; + } + + if (isa(functionDecl)) + { + const CXXRecordDecl* recordDecl = dyn_cast(functionDecl)->getParent(); + aInfo.nameAndParams += recordDecl->getQualifiedNameAsString(); + aInfo.nameAndParams += "::"; + } + aInfo.nameAndParams += functionDecl->getNameAsString() + "("; + bool bFirst = true; + for (const ParmVarDecl* pParmVarDecl : functionDecl->parameters()) + { + if (bFirst) + bFirst = false; + else + aInfo.nameAndParams += ","; + aInfo.nameAndParams += pParmVarDecl->getType().getCanonicalType().getAsString(); + } + aInfo.nameAndParams += ")"; + if (isa(functionDecl) && dyn_cast(functionDecl)->isConst()) + { + aInfo.nameAndParams += " const"; + } + + aInfo.sourceLocation = toString(functionDecl->getLocation()); + + return aInfo; +} + +std::string FieldCanBeLocal::toString(SourceLocation loc) +{ + SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc(loc); + StringRef name = getFilenameOfLocation(expansionLoc); + std::string sourceLocation + = std::string(name.substr(strlen(SRCDIR) + 1)) + ":" + + std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc)); + loplugin::normalizeDotDotInFilePath(sourceLocation); + return sourceLocation; +} + +bool FieldCanBeLocal::TraverseCXXConstructorDecl(CXXConstructorDecl* cxxConstructorDecl) +{ + auto copy = insideMoveOrCopyOrCloneDeclParent; + if (!ignoreLocation(cxxConstructorDecl->getBeginLoc()) + && cxxConstructorDecl->isThisDeclarationADefinition()) + { + if (cxxConstructorDecl->isCopyOrMoveConstructor()) + insideMoveOrCopyOrCloneDeclParent = cxxConstructorDecl->getParent(); + } + bool ret = RecursiveASTVisitor::TraverseCXXConstructorDecl(cxxConstructorDecl); + insideMoveOrCopyOrCloneDeclParent = copy; + return ret; +} + +bool FieldCanBeLocal::TraverseCXXMethodDecl(CXXMethodDecl* cxxMethodDecl) +{ + auto copy1 = insideMoveOrCopyOrCloneDeclParent; + auto copy2 = insideFunctionDecl; + if (!ignoreLocation(cxxMethodDecl->getBeginLoc()) + && cxxMethodDecl->isThisDeclarationADefinition()) + { + if (cxxMethodDecl->isCopyAssignmentOperator() || cxxMethodDecl->isMoveAssignmentOperator() + || (cxxMethodDecl->getIdentifier() + && (cxxMethodDecl->getName().startswith("Clone") + || cxxMethodDecl->getName().startswith("clone") + || cxxMethodDecl->getName().startswith("createClone")))) + insideMoveOrCopyOrCloneDeclParent = cxxMethodDecl->getParent(); + // these are similar in that they tend to simply enumerate all the fields of an object without putting + // them to some useful purpose + auto op = cxxMethodDecl->getOverloadedOperator(); + if (op == OO_EqualEqual || op == OO_ExclaimEqual) + insideMoveOrCopyOrCloneDeclParent = cxxMethodDecl->getParent(); + } + insideFunctionDecl = cxxMethodDecl; + bool ret = RecursiveASTVisitor::TraverseCXXMethodDecl(cxxMethodDecl); + insideMoveOrCopyOrCloneDeclParent = copy1; + insideFunctionDecl = copy2; + return ret; +} + +bool FieldCanBeLocal::TraverseFunctionDecl(FunctionDecl* functionDecl) +{ + auto copy1 = insideStreamOutputOperator; + auto copy2 = insideFunctionDecl; + auto copy3 = insideMoveOrCopyOrCloneDeclParent; + if (functionDecl->getLocation().isValid() && !ignoreLocation(functionDecl->getBeginLoc()) + && functionDecl->isThisDeclarationADefinition()) + { + auto op = functionDecl->getOverloadedOperator(); + if (op == OO_LessLess && functionDecl->getNumParams() == 2) + { + QualType qt = functionDecl->getParamDecl(1)->getType(); + insideStreamOutputOperator + = qt.getNonReferenceType().getUnqualifiedType()->getAsCXXRecordDecl(); + } + // these are similar in that they tend to simply enumerate all the fields of an object without putting + // them to some useful purpose + if (op == OO_EqualEqual || op == OO_ExclaimEqual) + { + QualType qt = functionDecl->getParamDecl(1)->getType(); + insideMoveOrCopyOrCloneDeclParent + = qt.getNonReferenceType().getUnqualifiedType()->getAsCXXRecordDecl(); + } + } + insideFunctionDecl = functionDecl; + bool ret = RecursiveASTVisitor::TraverseFunctionDecl(functionDecl); + insideStreamOutputOperator = copy1; + insideFunctionDecl = copy2; + insideMoveOrCopyOrCloneDeclParent = copy3; + return ret; +} + +bool FieldCanBeLocal::VisitMemberExpr(const MemberExpr* memberExpr) +{ + const ValueDecl* decl = memberExpr->getMemberDecl(); + const FieldDecl* fieldDecl = dyn_cast(decl); + if (!fieldDecl) + { + return true; + } + fieldDecl = fieldDecl->getCanonicalDecl(); + if (ignoreLocation(fieldDecl->getBeginLoc())) + { + return true; + } + // ignore stuff that forms part of the stable URE interface + if (isInUnoIncludeFile(compiler.getSourceManager().getSpellingLoc(fieldDecl->getLocation()))) + { + return true; + } + + if (insideMoveOrCopyOrCloneDeclParent || insideStreamOutputOperator) + { + RecordDecl const* cxxRecordDecl1 = fieldDecl->getParent(); + // we don't care about reads from a field when inside the copy/move constructor/operator= for that field + if (cxxRecordDecl1 && (cxxRecordDecl1 == insideMoveOrCopyOrCloneDeclParent)) + return true; + // we don't care about reads when the field is being used in an output operator, this is normally + // debug stuff + if (cxxRecordDecl1 && (cxxRecordDecl1 == insideStreamOutputOperator)) + return true; + } + + checkTouched(fieldDecl, insideFunctionDecl); + + return true; +} + +bool FieldCanBeLocal::VisitDeclRefExpr(const DeclRefExpr* declRefExpr) +{ + const Decl* decl = declRefExpr->getDecl(); + const FieldDecl* fieldDecl = dyn_cast(decl); + if (!fieldDecl) + { + return true; + } + fieldDecl = fieldDecl->getCanonicalDecl(); + if (ignoreLocation(fieldDecl->getBeginLoc())) + { + return true; + } + // ignore stuff that forms part of the stable URE interface + if (isInUnoIncludeFile(compiler.getSourceManager().getSpellingLoc(fieldDecl->getLocation()))) + { + return true; + } + + checkTouched(fieldDecl, insideFunctionDecl); + + return true; +} + +// fields that are assigned via member initialisers do not get visited in VisitDeclRef, so +// have to do it here +bool FieldCanBeLocal::VisitCXXConstructorDecl(const CXXConstructorDecl* cxxConstructorDecl) +{ + if (ignoreLocation(cxxConstructorDecl->getBeginLoc())) + { + return true; + } + // ignore stuff that forms part of the stable URE interface + if (isInUnoIncludeFile( + compiler.getSourceManager().getSpellingLoc(cxxConstructorDecl->getLocation()))) + { + return true; + } + + // templates make EvaluateAsInt crash inside clang + if (cxxConstructorDecl->isDependentContext()) + return true; + + // we don't care about writes to a field when inside the copy/move constructor/operator= for that field + if (insideMoveOrCopyOrCloneDeclParent + && cxxConstructorDecl->getParent() == insideMoveOrCopyOrCloneDeclParent) + return true; + + for (auto it = cxxConstructorDecl->init_begin(); it != cxxConstructorDecl->init_end(); ++it) + { + const CXXCtorInitializer* init = *it; + const FieldDecl* fieldDecl = init->getMember(); + if (!fieldDecl) + continue; + if (init->getInit() && isSomeKindOfConstant(init->getInit())) + checkTouched(fieldDecl, cxxConstructorDecl); + else + touchedMap[fieldDecl] = nullptr; + } + return true; +} + +// Fields that are assigned via init-list-expr do not get visited in VisitDeclRef, so +// have to do it here. +bool FieldCanBeLocal::VisitInitListExpr(const InitListExpr* initListExpr) +{ + if (ignoreLocation(initListExpr->getBeginLoc())) + return true; + + QualType varType = initListExpr->getType().getDesugaredType(compiler.getASTContext()); + auto recordType = varType->getAs(); + if (!recordType) + return true; + + auto recordDecl = recordType->getDecl(); + for (auto it = recordDecl->field_begin(); it != recordDecl->field_end(); ++it) + { + checkTouched(*it, insideFunctionDecl); + } + + return true; +} + +void FieldCanBeLocal::checkTouched(const FieldDecl* fieldDecl, const FunctionDecl* functionDecl) +{ + auto methodDecl = dyn_cast_or_null(functionDecl); + if (!methodDecl) + { + touchedMap[fieldDecl] = nullptr; + return; + } + if (methodDecl->getParent() != fieldDecl->getParent()) + { + touchedMap[fieldDecl] = nullptr; + return; + } + auto it = touchedMap.find(fieldDecl); + if (it == touchedMap.end()) + touchedMap.emplace(fieldDecl, functionDecl); + else if (it->second != functionDecl) + it->second = nullptr; +} + +bool FieldCanBeLocal::isSomeKindOfConstant(const Expr* arg) +{ + assert(arg); + if (arg->isValueDependent()) + return false; + return arg->isCXX11ConstantExpr(compiler.getASTContext()); +} + +loplugin::Plugin::Registration X("fieldcanbelocal", false); +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/fieldcanbelocal.py b/compilerplugins/clang/fieldcanbelocal.py new file mode 100755 index 0000000000..3266574445 --- /dev/null +++ b/compilerplugins/clang/fieldcanbelocal.py @@ -0,0 +1,123 @@ +#!/usr/bin/python3 + +import re +import io + +definitionSet = set() +definitionToSourceLocationMap = dict() +definitionToTypeMap = dict() +touchedMap = dict() +excludeSet = set() +sourceLocationSet = set() + +# clang does not always use exactly the same numbers in the type-parameter vars it generates +# so I need to substitute them to ensure we can match correctly. +normalizeTypeParamsRegex = re.compile(r"type-parameter-\d+-\d+") +def normalizeTypeParams( line ): + return normalizeTypeParamsRegex.sub("type-parameter-?-?", line) + + +with io.open("workdir/loplugin.fieldcanbelocal.log", "r", buffering=1024*1024) as txt: + for line in txt: + tokens = line.strip().split("\t") + if tokens[0] == "definition:": + fieldInfo = (normalizeTypeParams(tokens[1]), tokens[2]) + fieldType = tokens[3] + srcLoc = tokens[4] + # ignore external source code + if srcLoc.startswith("external/"): + continue + # ignore build folder + if srcLoc.startswith("workdir/"): + continue + definitionSet.add(fieldInfo) + definitionToTypeMap[fieldInfo] = fieldType + definitionToSourceLocationMap[fieldInfo] = srcLoc + elif tokens[0] == "touched:": + fieldInfo = (normalizeTypeParams(tokens[1]), tokens[2]) + touchedByFunction = normalizeTypeParams(tokens[3]) + touchedByFunctionSrcLoc = tokens[4] + if fieldInfo in excludeSet: + continue + if touchedByFunction == "Negative": + excludeSet.add(fieldInfo) + if fieldInfo in touchedMap: + touchedMap.pop(fieldInfo) + elif fieldInfo in touchedMap: + if touchedMap[fieldInfo] != touchedByFunction: + excludeSet.add(fieldInfo) + touchedMap.pop(fieldInfo) + else: + touchedMap[fieldInfo] = touchedByFunction + else: + print( "unknown line: " + line) + +outputSet = set() +for d in definitionSet: + if not d in touchedMap: + continue + fieldType = definitionToTypeMap[d] + # ignore some types that are known false+ + if (fieldType.startswith("std::unique_ptr<") + or fieldType == "std::mutex" + or "Mutex" in fieldType + or "union" in fieldType + or "anonymous namespace" in fieldType + or "unnamed struct" in fieldType): + continue + # ignore some field names that are known false+ + if (d[1] == "mbDisposing" + or d[1] == "bInDispose" + or d[1] == "m_bDisposing" + or d[1].startswith("m_bIn")): + continue + srcLoc = definitionToSourceLocationMap[d] + # ignore some types in the system libraries we somehow pick up + if srcLoc.startswith(".") or srcLoc.startswith("/") or srcLoc.startswith("lib/"): + continue + # part of the URE + if srcLoc.startswith("include/cppuhelper/"): + continue + # on-disk structures + if srcLoc.startswith("hwpfilter/"): + continue + if srcLoc.startswith("include/osl/"): + continue + if srcLoc.startswith("include/sal/"): + continue + if srcLoc.startswith("sw/source/filter/ww8/ww8struc.hxx"): + continue + if srcLoc.startswith("sd/source/filter/ppt/ppt97animations.hxx"): + continue + if srcLoc.startswith("lotuswordpro/"): + continue + if srcLoc.startswith("include/filter/msfilter/svdfppt.hxx"): + continue + if srcLoc.startswith("filter/source/graphicfilter/icgm/chart.hxx"): + continue + # most of this code is only compiled on windows, so we don't have decent results + if srcLoc.startswith("include/svl/svdde.hxx"): + continue + touchedByFunction = touchedMap[d] + outputSet.add((d[0] + " " + d[1] + " " + definitionToTypeMap[d], srcLoc, touchedByFunction)) + +# sort the results using a "natural order" so sequences like [item1,item2,item10] sort nicely +def natural_sort_key(s, _nsre=re.compile('([0-9]+)')): + return [int(text) if text.isdigit() else text.lower() + for text in re.split(_nsre, s)] +# sort by both the source-line and the datatype, so the output file ordering is stable +# when we have multiple items on the same source line +def v_sort_key(v): + return natural_sort_key(v[1]) + [v[0]] + +# sort results by name and line number +tmp1list = sorted(outputSet, key=lambda v: v_sort_key(v)) + +# print out the results +with open("compilerplugins/clang/fieldcanbelocal.results", "wt") as f: + for t in tmp1list: + f.write( t[1] + "\n" ) + f.write( " " + t[0] + "\n" ) + f.write( " " + t[2] + "\n" ) + + diff --git a/compilerplugins/clang/fieldcanbelocal.results b/compilerplugins/clang/fieldcanbelocal.results new file mode 100644 index 0000000000..6b5ae55214 --- /dev/null +++ b/compilerplugins/clang/fieldcanbelocal.results @@ -0,0 +1,123 @@ +chart2/source/inc/CachedDataSequence.hxx:128 + chart::CachedDataSequence m_nNumberFormatKey sal_Int32 + void chart::CachedDataSequence::registerProperties() +connectivity/source/drivers/firebird/ResultSet.hxx:85 + connectivity::firebird::OResultSet m_statusVector ISC_STATUS_ARRAY + unsigned char connectivity::firebird::OResultSet::next() +connectivity/source/inc/FDatabaseMetaDataResultSet.hxx:114 + connectivity::ODatabaseMetaDataResultSet m_nFetchSize sal_Int32 + void connectivity::ODatabaseMetaDataResultSet::construct() +connectivity/source/inc/FDatabaseMetaDataResultSet.hxx:115 + connectivity::ODatabaseMetaDataResultSet m_nResultSetType sal_Int32 + void connectivity::ODatabaseMetaDataResultSet::construct() +connectivity/source/inc/FDatabaseMetaDataResultSet.hxx:116 + connectivity::ODatabaseMetaDataResultSet m_nFetchDirection sal_Int32 + void connectivity::ODatabaseMetaDataResultSet::construct() +connectivity/source/inc/FDatabaseMetaDataResultSet.hxx:117 + connectivity::ODatabaseMetaDataResultSet m_nResultSetConcurrency sal_Int32 + void connectivity::ODatabaseMetaDataResultSet::construct() +cppuhelper/inc/interfacecontainer4.hxx:267 + cppuhelper::OInterfaceContainerHelper4::NotifySingleListener m_rEvent const EventT & + void cppuhelper::OInterfaceContainerHelper4::NotifySingleListener::operator()(const Reference &) const +cui/source/inc/chardlg.hxx:170 + SvxCharEffectsPage m_nHtmlMode sal_uInt16 + void SvxCharEffectsPage::Initialize() +embeddedobj/source/msole/olecomponent.hxx:73 + OleComponent m_bWorkaroundActive _Bool + _Bool OleComponent::IsWorkaroundActive() const +include/editeng/adjustitem.hxx:37 + SvxAdjustItem bLeft _Bool + void SvxAdjustItem::SetAdjust(const enum SvxAdjust) +include/o3tl/enumarray.hxx:130 + o3tl::enumarray_const_iterator m_buf const EA * + const typename type-parameter-?-?::value_type & o3tl::enumarray_const_iterator::operator*() const +include/oox/dump/oledumper.hxx:743 + oox::dump::VbaDirStreamObject mnCurrOffset sal_Int32 + void oox::dump::VbaDirStreamObject::implDumpRecordBody() +include/salhelper/dynload.hxx:82 + salhelper::ORealDynamicLoader m_refCount sal_uInt32 + salhelper::ORealDynamicLoader::ORealDynamicLoader(class salhelper::ORealDynamicLoader **,const class rtl::OUString &,const class rtl::OUString &,void *,void *) +include/sfx2/msg.hxx:104 + SfxType createSfxPoolItemFunc std::function + class std::unique_ptr SfxType::CreateItem() const +include/sfx2/msg.hxx:105 + SfxType pType const std::type_info * + const class std::type_info * SfxType::Type() const +include/sfx2/msg.hxx:117 + SfxType0 pType const std::type_info * + const class std::type_info * SfxType0::Type() const +include/test/sheet/xdatapilottable.hxx:31 + apitest::XDataPilotTable xCellForChange css::uno::Reference + void apitest::XDataPilotTable::testRefresh() +include/test/sheet/xdatapilottable.hxx:32 + apitest::XDataPilotTable xCellForCheck css::uno::Reference + void apitest::XDataPilotTable::testRefresh() +include/vcl/tabpage.hxx:43 + TabPage mbHasHoriBar _Bool + void TabPage::ImplInit(class vcl::Window *,long) +include/vcl/tabpage.hxx:44 + TabPage mbHasVertBar _Bool + void TabPage::ImplInit(class vcl::Window *,long) +jvmfwk/plugins/sunmajor/pluginlib/util.cxx:205 + jfw_plugin::(anonymous namespace)::FileHandleReader m_aBuffer char[1024] + enum jfw_plugin::(anonymous namespace)::FileHandleReader::Result jfw_plugin::(anonymous namespace)::FileHandleReader::readLine(class rtl::OString *) +sc/source/ui/inc/datastream.hxx:104 + sc::DataStream mnSettings sal_uInt32 + void sc::DataStream::Decode(const class rtl::OUString &,const class ScRange &,int,enum sc::DataStream::MoveType,const unsigned int) +sc/source/ui/inc/tabvwsh.hxx:99 + ScTabViewShell eFormObjKind SdrObjKind + void ScTabViewShell::ExecDraw(class SfxRequest &) +sc/source/ui/inc/tabvwsh.hxx:144 + ScTabViewShell bActiveEditSh _Bool + void ScTabViewShell::SetEditShell(class EditView *,_Bool) +sd/source/filter/html/htmlex.hxx:59 + HtmlExport mnPagesWritten sal_uInt16 + void HtmlExport::ExportSingleDocument() +sfx2/source/appl/lnkbase2.cxx:82 + sfx2::(anonymous namespace)::ImplDdeItem aData DdeData + class DdeData * sfx2::(anonymous namespace)::ImplDdeItem::Get(enum SotClipboardFormatId) +sfx2/source/appl/lnkbase2.cxx:83 + sfx2::(anonymous namespace)::ImplDdeItem aSeq Sequence + class DdeData * sfx2::(anonymous namespace)::ImplDdeItem::Get(enum SotClipboardFormatId) +svl/source/misc/inethist.cxx:45 + INetURLHistory_Impl::head_entry m_nMagic sal_uInt32 + void INetURLHistory_Impl::head_entry::initialize() +sw/inc/viewopt.hxx:50 + ViewOptFlags1 bRef _Bool + ViewOptFlags1::ViewOptFlags1() +sw/source/core/text/txtdrop.cxx:702 + SwDropCapCache m_aFactor sal_uInt16[10] + void SwDropCapCache::CalcFontSize(class SwDropPortion *,class SwTextFormatInfo &) +sw/source/core/text/txtdrop.cxx:704 + SwDropCapCache m_aDescent short[10] + void SwDropCapCache::CalcFontSize(class SwDropPortion *,class SwTextFormatInfo &) +sw/source/filter/ww8/ww8par.hxx:663 + WW8FormulaControl mfUnknown sal_uInt8 + WW8FormulaControl::WW8FormulaControl(class rtl::OUString,class SwWW8ImplReader &) +sw/source/filter/ww8/ww8par.hxx:1067 + WW8TabBandDesc bCantSplit90 _Bool + WW8TabBandDesc::WW8TabBandDesc() +sw/source/filter/ww8/ww8scan.hxx:440 + WW8PLCFx_PCDAttrs m_aShortSprm SVBT32 + void WW8PLCFx_PCDAttrs::GetSprms(struct WW8PLCFxDesc *) +sw/source/uibase/inc/fldmgr.hxx:112 + SwFieldMgr m_nCurFormat sal_uInt32 + class SwField * SwFieldMgr::GetCurField() +unoidl/source/unoidlprovider.cxx:89 + unoidl::detail::(anonymous namespace)::Memory16 byte unsigned char[2] + unsigned short unoidl::detail::(anonymous namespace)::Memory16::getUnsigned16() const +vcl/inc/sft.hxx:178 + vcl::TTGlobalFontInfo_ fsSelection sal_uInt16 + vcl::TTGlobalFontInfo_::TTGlobalFontInfo_() +vcl/inc/unx/sessioninhibitor.hxx:46 + SessionManagerInhibitor mbDPMSWasEnabled BOOL + void SessionManagerInhibitor::inhibitDPMS(_Bool,struct _XDisplay *) +vcl/inc/unx/sessioninhibitor.hxx:47 + SessionManagerInhibitor mnDPMSStandbyTimeout CARD16 + void SessionManagerInhibitor::inhibitDPMS(_Bool,struct _XDisplay *) +vcl/inc/unx/sessioninhibitor.hxx:48 + SessionManagerInhibitor mnDPMSSuspendTimeout CARD16 + void SessionManagerInhibitor::inhibitDPMS(_Bool,struct _XDisplay *) +vcl/inc/unx/sessioninhibitor.hxx:49 + SessionManagerInhibitor mnDPMSOffTimeout CARD16 + void SessionManagerInhibitor::inhibitDPMS(_Bool,struct _XDisplay *) diff --git a/compilerplugins/clang/fieldcast.cxx b/compilerplugins/clang/fieldcast.cxx new file mode 100644 index 0000000000..0807aef9b3 --- /dev/null +++ b/compilerplugins/clang/fieldcast.cxx @@ -0,0 +1,206 @@ +/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */ +/* + * This file is part of the LibreOffice project. + * + * This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. + */ + +#if !defined _WIN32 //TODO, #include + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "config_clang.h" + +#include "plugin.hxx" +#include "compat.hxx" +#include "check.hxx" + +#include "clang/AST/ParentMapContext.h" + +/** + Look for class fields that are always cast to some subtype, + which indicates that they should probably just be declared to be that subtype. + + TODO add checking for dynamic_cast/static_cast on + unique_ptr + shared_ptr +*/ + +namespace +{ +struct MyFieldInfo +{ + std::string parentClass; + std::string fieldName; + std::string fieldType; + std::string sourceLocation; +}; + +// try to limit the voluminous output a little +static std::unordered_multimap castMap; + +class FieldCast : public loplugin::FilteringPlugin +{ +public: + explicit FieldCast(loplugin::InstantiationData const& data) + : FilteringPlugin(data) + { + } + + virtual void run() override; + + bool VisitCXXStaticCastExpr(const CXXStaticCastExpr*); + bool VisitCXXDynamicCastExpr(const CXXDynamicCastExpr*); + bool VisitCXXReinterpretCastExpr(const CXXReinterpretCastExpr*); + +private: + MyFieldInfo niceName(const FieldDecl*); + void checkCast(const CXXNamedCastExpr*); +}; + +void FieldCast::run() +{ + handler.enableTreeWideAnalysisMode(); + + TraverseDecl(compiler.getASTContext().getTranslationUnitDecl()); + + if (!isUnitTestMode()) + { + // dump all our output in one write call - this is to try and limit IO "crosstalk" between multiple processes + // writing to the same logfile + std::string output; + output.reserve(64 * 1024); + for (const auto& pair : castMap) + { + MyFieldInfo s = niceName(pair.first); + output += "cast:\t" + s.parentClass // + + "\t" + s.fieldName // + + "\t" + s.fieldType // + + "\t" + s.sourceLocation // + + "\t" + pair.second->getQualifiedNameAsString() // + + "\n"; + } + std::ofstream myfile; + myfile.open(WORKDIR "/loplugin.fieldcast.log", std::ios::app | std::ios::out); + myfile << output; + myfile.close(); + } + else + { + for (const auto& pair : castMap) + report(DiagnosticsEngine::Warning, "cast %0", pair.first->getBeginLoc()) + << pair.second->getQualifiedNameAsString(); + } +} + +MyFieldInfo FieldCast::niceName(const FieldDecl* fieldDecl) +{ + MyFieldInfo aInfo; + + const RecordDecl* recordDecl = fieldDecl->getParent(); + + if (const CXXRecordDecl* cxxRecordDecl = dyn_cast(recordDecl)) + { + if (cxxRecordDecl->getTemplateInstantiationPattern()) + cxxRecordDecl = cxxRecordDecl->getTemplateInstantiationPattern(); + aInfo.parentClass = cxxRecordDecl->getQualifiedNameAsString(); + } + else + { + aInfo.parentClass = recordDecl->getQualifiedNameAsString(); + } + + aInfo.fieldName = fieldDecl->getNameAsString(); + // sometimes the name (if it's an anonymous thing) contains the full path of the build folder, which we don't need + size_t idx = aInfo.fieldName.find(SRCDIR); + if (idx != std::string::npos) + { + aInfo.fieldName = aInfo.fieldName.replace(idx, strlen(SRCDIR), ""); + } + aInfo.fieldType = fieldDecl->getType().getAsString(); + + SourceLocation expansionLoc + = compiler.getSourceManager().getExpansionLoc(fieldDecl->getLocation()); + StringRef name = getFilenameOfLocation(expansionLoc); + aInfo.sourceLocation + = std::string(name.substr(strlen(SRCDIR) + 1)) + ":" + + std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc)); + loplugin::normalizeDotDotInFilePath(aInfo.sourceLocation); + + return aInfo; +} + +bool FieldCast::VisitCXXDynamicCastExpr(const CXXDynamicCastExpr* expr) +{ + checkCast(expr); + return true; +} + +bool FieldCast::VisitCXXStaticCastExpr(const CXXStaticCastExpr* expr) +{ + checkCast(expr); + return true; +} + +bool FieldCast::VisitCXXReinterpretCastExpr(const CXXReinterpretCastExpr* expr) +{ + checkCast(expr); + return true; +} + +void FieldCast::checkCast(const CXXNamedCastExpr* expr) +{ + if (ignoreLocation(expr)) + return; + if (isInUnoIncludeFile(compiler.getSourceManager().getSpellingLoc(expr->getBeginLoc()))) + return; + auto castToType = expr->getTypeAsWritten()->getPointeeCXXRecordDecl(); + if (!castToType) + return; + const Expr* subExpr = compat::getSubExprAsWritten(expr); + const FieldDecl* fieldDecl = nullptr; + if (const MemberExpr* memberExpr = dyn_cast_or_null(subExpr->IgnoreImplicit())) + { + fieldDecl = dyn_cast_or_null(memberExpr->getMemberDecl()); + } + else if (const CXXMemberCallExpr* memberCallExpr + = dyn_cast_or_null(subExpr->IgnoreImplicit())) + { + if (!memberCallExpr->getMethodDecl()->getIdentifier() + || memberCallExpr->getMethodDecl()->getName() != "get") + return; + const MemberExpr* memberExpr = dyn_cast_or_null( + memberCallExpr->getImplicitObjectArgument()->IgnoreImplicit()); + if (!memberExpr) + return; + fieldDecl = dyn_cast_or_null(memberExpr->getMemberDecl()); + } + if (!fieldDecl) + return; + if (isInUnoIncludeFile(compiler.getSourceManager().getSpellingLoc(fieldDecl->getBeginLoc()))) + return; + + // ignore casting to a less specific type + auto castFromType = subExpr->getType()->getPointeeCXXRecordDecl(); + if (castFromType && castFromType->isDerivedFrom(castToType)) + return; + + castMap.emplace(fieldDecl, castToType); +} + +loplugin::Plugin::Registration X("fieldcast", false); +} + +#endif + +/* vim:set shiftwidth=4 softtabstop=4 expandtab: */ diff --git a/compilerplugins/clang/fieldcast.py b/compilerplugins/clang/fieldcast.py new file mode 100755 index 0000000000..fc09063571 --- /dev/null +++ b/compilerplugins/clang/fieldcast.py @@ -0,0 +1,71 @@ +#!/usr/bin/python3 + +import re +import io + +definitionSet = set() +definitionToSourceLocationMap = dict() +definitionToTypeMap = dict() +castMap = dict() + +# clang does not always use exactly the same numbers in the type-parameter vars it generates +# so I need to substitute them to ensure we can match correctly. +normalizeTypeParamsRegex = re.compile(r"type-parameter-\d+-\d+") +def normalizeTypeParams( line ): + return normalizeTypeParamsRegex.sub("type-parameter-?-?", line) + + +with io.open("workdir/loplugin.fieldcast.log", "r", buffering=1024*1024) as txt: + for line in txt: + tokens = line.strip().split("\t") + if tokens[0] == "cast:": + fieldInfo = (normalizeTypeParams(tokens[1]), tokens[2]) + fieldType = tokens[3] + srcLoc = tokens[4] + castToType = tokens[5] + # ignore external source code + if srcLoc.startswith("external/"): + continue + # ignore build folder + if srcLoc.startswith("workdir/"): + continue + definitionSet.add(fieldInfo) + definitionToTypeMap[fieldInfo] = fieldType + definitionToSourceLocationMap[fieldInfo] = srcLoc + + if not (fieldInfo in castMap): + castMap[fieldInfo] = castToType + elif castMap[fieldInfo] != "": # if we are not ignoring it + # if it is cast to more than one type, mark it as being ignored + if castMap[fieldInfo] != castToType: + castMap[fieldInfo] = "" + else: + print( "unknown line: " + line) + +outputSet = set() +for k, v in castMap.items(): + if v == "": + continue + srcLoc = definitionToSourceLocationMap[k] + outputSet.add((k[0] + " " + k[1] + " " + definitionToTypeMap[k], srcLoc, v)) + +# sort the results using a "natural order" so sequences like [item1,item2,item10] sort nicely +def natural_sort_key(s, _nsre=re.compile('([0-9]+)')): + return [int(text) if text.isdigit() else text.lower() + for text in re.split(_nsre, s)] +# sort by both the source-line and the datatype, so the output file ordering is stable +# when we have multiple fields declared on the same source line +def v_sort_key(v): + return natural_sort_key(v[1]) + [v[0]] + +# sort results by name and line number +tmp1list = sorted(outputSet, key=lambda v: v_sort_key(v)) + +# print out the results +with open("compilerplugins/clang/fieldcast.results", "wt") as f: + for t in tmp1list: + f.write( t[1] + "\n" ) + f.write( " " + t[0] + "\n" ) + f.write( " " + t[2] + "\n" ) + + diff --git a/compilerplugins/clang/fieldcast.results b/compilerplugins/clang/fieldcast.results new file mode 100644 index 0000000000..7be14a330d --- /dev/null +++ b/compilerplugins/clang/fieldcast.results @@ -0,0 +1,681 @@ +accessibility/inc/extended/accessibletabbarbase.hxx:53 + accessibility::AccessibleTabBarBase m_pTabBar VclPtr + vcl::Window +basctl/source/inc/accessibledialogwindow.hxx:67 + basctl::AccessibleDialogWindow m_pDialogWindow VclPtr + vcl::Window +basctl/source/inc/basidesh.hxx:87 + basctl::Shell pLayout VclPtr + basctl::ModulWindowLayout +basctl/source/inc/basidesh.hxx:97 + basctl::Shell m_xLibListener css::uno::Reference + basctl::ContainerListenerImpl +basic/source/inc/errobject.hxx:27 + SbxErrObject m_xErr css::uno::Reference + ErrObject +basic/source/inc/runtime.hxx:220 + SbiRuntime pMod SbModule * + SbClassModuleObject +bridges/source/cpp_uno/gcc3_linux_x86-64/rtti.cxx:70 + (anonymous namespace)::GeneratedPad pad_ std::unique_ptr + std::type_info +bridges/source/jni_uno/jni_info.h:96 + jni_uno::JNI_compound_type_info m_base const JNI_type_info * + jni_uno::JNI_compound_type_info +bxml/parser.h:258 + _xmlParserCtxt _private void * + DOM::CDocumentBuilder +bxml/tree.h:390 + _xmlNs next struct _xmlNs * + _xmlNode +bxml/xpath.h:338 + _xmlXPathContext funcLookupData void * + CLibxml2XFormsExtension +chart2/source/controller/inc/dlg_CreationWizard_UNO.hxx:108 + chart::CreationWizardUnoDlg m_xParentWindow css::uno::Reference + weld::TransportAsXWindow +chart2/source/controller/inc/SelectionHelper.hxx:110 + chart::SelectionHelper m_pMarkObj SdrObject * + SdrPathObj +chart2/source/view/inc/PlotterBase.hxx:75 + chart::PlotterBase m_pPosHelper PlottingPositionHelper * + chart::PolarPlottingPositionHelper +configmgr/source/valueparser.hxx:76 + configmgr::ValueParser node_ rtl::Reference + configmgr::PropertyNode +configmgr/source/xcsparser.hxx:80 + configmgr::XcsParser::Element node rtl::Reference + configmgr::SetNode +cppu/source/uno/lbenv.cxx:72 + (anonymous namespace)::InterfaceEntry pTypeDescr typelib_InterfaceTypeDescription * + _typelib_TypeDescription +cui/source/inc/cfg.hxx:407 + SvxConfigPage m_xContentsListBox std::unique_ptr + SvxNotebookbarEntriesListBox +cui/source/inc/cuitabline.hxx:321 + SvxLineEndDefTabPage pPolyObj const SdrObject * + SdrPathObj +cui/source/options/optcolor.cxx:270 + (anonymous namespace)::ColorConfigWindow_Impl::Entry m_xText std::unique_ptr + weld::Toggleable +cui/source/options/treeopt.cxx:424 + OptionsPageInfo m_xPage std::unique_ptr + SvxDefaultColorOptPage +dbaccess/source/ui/app/AppDetailView.hxx:105 + dbaui::OApplicationDetailView m_xControlHelper std::shared_ptr + dbaui::OAppDetailPageHelper +dbaccess/source/ui/inc/RelationDlg.hxx:34 + dbaui::ORelationDialog m_pConnData TTableConnectionData::value_type + dbaui::ORelationTableConnectionData +dbaccess/source/ui/inc/RelationDlg.hxx:35 + dbaui::ORelationDialog m_pOrigConnData TTableConnectionData::value_type + dbaui::ORelationTableConnectionData +dbaccess/source/ui/querydesign/QueryDesignUndoAction.hxx:32 + dbaui::OQueryDesignUndoAction m_pOwner VclPtr + dbaui::OQueryTableView +dbaccess/source/ui/querydesign/querydlg.hxx:37 + dbaui::DlgQryJoin m_pConnData TTableConnectionData::value_type + dbaui::OQueryTableConnectionData +editeng/source/editeng/impedit.hxx:268 + ImpEditView mpViewShell OutlinerViewShell * + SfxViewShell +editeng/source/editeng/impedit.hxx:270 + ImpEditView mpOtherShell OutlinerViewShell * + SfxViewShell +editeng/source/editeng/impedit.hxx:506 + ImpEditEngine pEditEngine EditEngine * + OutlinerEditEng +extensions/source/update/check/updatecheck.hxx:164 + UpdateCheck m_pThread WorkerThread * + (anonymous namespace)::UpdateCheckThread +i18npool/inc/calendarImpl.hxx:103 + i18npool::CalendarImpl xCalendar css::uno::Reference + i18npool::Calendar_gregorian +include/basegfx/DrawCommands.hxx:121 + gfx::DrawRectangle mpFillGradient std::shared_ptr + gfx::LinearGradientInfo +include/basic/sbstar.hxx:47 + StarBASIC pRtl SbxObjectRef + SbiStdObject +include/basic/sbxvar.hxx:258 + SbxVariable pParent SbxObject * + StarBASIC +include/comphelper/propertycontainerhelper.hxx:48 + comphelper::PropertyDescription::LocationAccess pDerivedClassMember void * + com::sun::star::uno::Any +include/connectivity/sdbcx/VTable.hxx:77 + connectivity::sdbcx::OTable m_xColumns std::unique_ptr + dbaccess::OColumns +include/connectivity/sdbcx/VTable.hxx:79 + connectivity::sdbcx::OTable m_pTables OCollection * + connectivity::mysql::OTables +include/editeng/editdata.hxx:231 + HtmlImportInfo pParser SvParser * + HTMLParser +include/editeng/editdata.hxx:245 + RtfImportInfo pParser SvParser * + SvxRTFParser +include/filter/msfilter/msdffimp.hxx:219 + SvxMSDffImportRec pObj rtl::Reference + SdrObjGroup +include/filter/msfilter/svdfppt.hxx:458 + SdPageCapsule page SdrPage * + SdPage +include/formula/FormulaCompiler.hxx:394 + formula::FormulaCompiler mpToken FormulaTokenRef + ScTableRefToken +include/formula/FormulaCompiler.hxx:397 + formula::FormulaCompiler pArr FormulaTokenArray * + ScTokenArray +include/jvmaccess/unovirtualmachine.hxx:94 + jvmaccess::UnoVirtualMachine m_classLoader void * + _jobject +include/oox/drawingml/graphicshapecontext.hxx:55 + oox::drawingml::GraphicalObjectFrameContext mpParent ::oox::core::ContextHandler2Helper * + oox::ppt::PPTShapeGroupContext +include/oox/drawingml/shapecontext.hxx:46 + oox::drawingml::ShapeContext mpShapePtr ShapePtr + oox::ppt::PPTShape +include/oox/export/vmlexport.hxx:87 + oox::vml::VMLExport m_pSdrObject const SdrObject * + SdrGrafObj +include/oox/vml/vmlshapecontext.hxx:147 + oox::vml::ShapeContext mrShape ShapeBase & + oox::vml::SimpleShape +include/sfx2/basedlgs.hxx:129 + SfxSingleTabDialogController m_xSfxPage std::unique_ptr + SfxMacroTabPage +include/sfx2/devtools/DevelopmentToolDockingWindow.hxx:42 + DevelopmentToolDockingWindow mxSelectionListener css::uno::Reference + SelectionChangeHandler +include/sfx2/sfxstatuslistener.hxx:69 + SfxStatusListener m_xDispatch css::uno::Reference + SfxOfficeDispatch +include/sfx2/sidebar/Panel.hxx:102 + sfx2::sidebar::Panel mxElement css::uno::Reference + sfx2::sidebar::SidebarPanelBase +include/sot/storage.hxx:52 + SotStorageStream pOwnStm BaseStorageStream * + UCBStorageStream +include/sot/storage.hxx:77 + SotStorage m_pOwnStg BaseStorage * + UCBStorage +include/svl/style.hxx:208 + SfxStyleSheetIterator pBasePool const SfxStyleSheetBasePool * + SwDocStyleSheetPool +include/svl/style.hxx:236 + SfxStyleSheetBasePool rPool SfxItemPool & + ScDocumentPool +include/svl/undo.hxx:92 + MarkedUndoAction pAction std::unique_ptr + ScSimpleUndo +include/svx/AccessibleShape.hxx:391 + accessibility::AccessibleShape m_pShape SdrObject * + SdrOle2Obj +include/svx/fmsrcimp.hxx:161 + FmSearchEngine m_xSearchCursor CursorWrapper + com::sun::star::uno::Reference +include/svx/svdhdl.hxx:136 + SdrHdl m_pObj SdrObject * + SdrEdgeObj +include/svx/svdmodel.hxx:198 + SdrModel mxStyleSheetPool rtl::Reference + SdStyleSheetPool +include/svx/svdview.hxx:100 + SdrViewEvent mpObj SdrObject * + sdr::table::SdrTableObj +include/svx/unomodel.hxx:45 + SvxUnoDrawingModel mpDoc SdrModel * + FmFormModel +include/svx/unopage.hxx:65 + SvxDrawPage mpPage SdrPage * + SdPage +include/test/a11y/accessibletestbase.hxx:42 + test::AccessibleTestBase mxDocument css::uno::Reference + vcl::ITiledRenderable +include/toolkit/awt/vclxmenu.hxx:59 + VCLXMenu mpMenu VclPtr + PopupMenu +include/tools/zcodec.hxx:59 + ZCodec mpsC_Stream void * + z_stream_s +include/vbahelper/vbaeventshelperbase.hxx:214 + VbaEventsHelperBase mpShell SfxObjectShell * + ScDocShell +include/vcl/builder.hxx:144 + VclBuilder::WinAndId m_pWindow VclPtr + PushButton +include/vcl/builder.hxx:158 + VclBuilder::MenuAndId m_pMenu VclPtr + PopupMenu +include/vcl/dockwin.hxx:117 + DockingWindow mpOldBorderWin VclPtr + ImplBorderWindow +include/vcl/menu.hxx:127 + Menu pStartedFrom VclPtr + PopupMenu +include/vcl/sysdata.hxx:68 + SystemEnvData pDisplay void * + _XDisplay +include/vcl/sysdata.hxx:71 + SystemEnvData pVisual void * + Visual +include/vcl/sysdata.hxx:155 + SystemGraphicsData pDisplay void * + _XDisplay +include/vcl/sysdata.hxx:157 + SystemGraphicsData pVisual void * + Visual +include/vcl/sysdata.hxx:161 + SystemGraphicsData pSurface void * + _cairo_surface +include/vcl/sysdata.hxx:197 + SystemWindowData pVisual void * + Visual +include/vcl/toolkit/fmtfield.hxx:60 + FormattedField m_pFormatter Formatter * + (anonymous namespace)::DoubleCurrencyFormatter +include/vcl/toolkit/menubtn.hxx:41 + MenuButton mpFloatingWindow VclPtr + FloatingWindow +include/vcl/uitest/uiobject.hxx:156 + ButtonUIObject mxButton VclPtr