summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)AuthorFilesLines
2018-03-19lokdialog: Make the badstatic loplugin happy.Jan Holesovsky1-0/+1
Change-Id: Ic19bbd2a3533e4e600d8856e55c4e8d06f0ad752 Reviewed-on: https://gerrit.libreoffice.org/45500 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Jan Holesovsky <kendy@collabora.com> (cherry picked from commit 8ce967ad157d83ad567c5f8c750f4225dd974219)
2018-02-01tdf#114596 dbaccess: fix mysterious dataloss bugMichael Stahl1-0/+4
OBookmarkContainer actually re-uses the reference count of ODatabaseSource, so converting ODatabaseSource::m_aBookmark to Reference created a cycle, which somehow causes the dataloss, because evidently something as important as storing the data must be done in the destructor. (regression from 2660d24a07866e083c5135ea263030f3e3a2e729) (cherry picked from commit 96ae2a3300811897c24cccb20f8c2faf382483df) tdf#114596 compilerplugins: add exception to [loplugin:refcounting] (cherry picked from commit e80da60895b45309fa1d018760d5f11cca4367f4) Change-Id: I4cad01dc9cdaf405c1eb31d6c0e161eb6712b78f Reviewed-on: https://gerrit.libreoffice.org/49025 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-12-03Don't prevent ODatabaseDocument refcount from dropping to zeroStephan Bergmann2-0/+8
...preventing the dtor from ever being called. (DocumentEvents forwards its acquire/release calls to its m_pData->rParent, i.e., the ODatabaseDocument, for better or worse.) This caused ODatabaseDocument instances to be leaked during e.g. JunitTest_dbaccess_complex. Regression introduced with de2ac128da025502c533f8cede5862e054dd9c44 "loplugin:useuniqueptr in dbaccess". Change-Id: Ida073c7e576b88e0d1d1a90253445e946e6eac99 Reviewed-on: https://gerrit.libreoffice.org/45652 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit 5066377bbeab1000f31e3fa689bad2ff8bf35295) Reviewed-on: https://gerrit.libreoffice.org/45685
2017-12-01Move loplugin:fpcomparison to store/Stephan Bergmann1-0/+0
...after bc4e8de8eea1ccebda479c8e2db2f3c6dfff60d2 "Silence new loplugin:fpcomparison for now": > Nov 30 08:33:16 <sberg> noelgrandin, thoughts on whether fpcomparison is actually worth it, seeing the loooooooong blacklist there? > Nov 30 08:34:11 <noelgrandin> sberg, that's wasn't my idea, can't remember who came up with it. vmiklos was that you? > Nov 30 08:34:36 <noelgrandin> sberg, the original commit message was "Find code that compares floating point values with == or != > Nov 30 08:34:36 <noelgrandin> It should rather use rtl::math::approxEqual" > Nov 30 08:34:45 <noelgrandin> so in theory the replacement should be fairly manual > Nov 30 08:34:48 <vmiklos> i don't think so :) > Nov 30 08:35:15 <noelgrandin> might have been moggi, but he's not around so.... just disable it > Nov 30 08:36:19 <sberg> noelgrandin, yeah, in theory; in practice, I guess there's also cases where x==1.0 is what you want exactly (given x tends not to be a computed value after all, but some literal that's being passed around) > Nov 30 08:36:33 <sberg> noelgrandin, yeah, I'll disable it then Change-Id: I35f5328efa0ec02d9be837c12efab2b03a3dae52 Reviewed-on: https://gerrit.libreoffice.org/45550 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit bf59f89d8818f62b03acaf7820e1a9560a388252) Reviewed-on: https://gerrit.libreoffice.org/45658 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com> Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2017-11-25Use the canonical TemplateDeclStephan Bergmann1-0/+1
...in case there are multiple, as is the case at least with recent (towards GCC 8) libstdc++, where std::pair is forward-declared also in include/c++/8.0.0/bits/stl_iterator.h, so that in dbaccess/source/ui/dlg/DbAdminImpl.cxx std::pair< Reference<XConnection>,sal_Bool> aRet; aRet.second = false; failed to reconstruct the sal_Bool template argument and issued a loplugin:implicitboolconversion warning. Change-Id: I0054f2596d3f8837b857f1dca2f25952828b12cc Reviewed-on: https://gerrit.libreoffice.org/45254 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-24Clean up loplugin:unnecessaryparen blacklistStephan Bergmann3-8/+9
* rsc/source/parser/rscyacc.cxx no longer exists * writerfilter/source/rtftok/rtftokenizer.cxx appears to be just fine nowadays? * sw/source/filter/html/htmltab.cxx used redundant parentheses around a comma operator in a while condition, and I see no reason not to remove them (the result requires a---reasonable---tweak to loplugin:commaoperator, though) Change-Id: I451132c700b0ae5a43b03d704156484df897ad5c Reviewed-on: https://gerrit.libreoffice.org/45213 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-24loplugin:countusersofdefaultparams in sw (1)Noel Grandin1-2/+4
Change-Id: I0d14f9c375f93079aef21ca4f1132adc4e1fe06c Reviewed-on: https://gerrit.libreoffice.org/45207 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-24Clarify that loplugin:unnecessaryparen doesn't want to warn about sizeofStephan Bergmann1-0/+3
...for whatever reason Change-Id: Iaae919dc6c636c4846c548914e593cb8bd94fe8b
2017-11-23loplugin:simplifybool can't invert conditions involving float typesNoel Grandin2-1/+14
so revert some of the changes from commit 7a1c21e53fc4733a4bb52282ce0098fcc085ab0e loplugin:simplifybool for negation of comparison operator Change-Id: I937d575b86c1e418805d399b0dc16ae91876b4fe Reviewed-on: https://gerrit.libreoffice.org/45130 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-23Make not warning about !! in loplugin:simplifybool consistentStephan Bergmann2-3/+61
...so that 640e03da110d76b2c7d5ed5b8b8ba3b4367865ba "loplugin:simplifybool re- activate the !! warning", which did not warn about !!( nAttribs & ucb::ContentInfoAttribute::KIND_FOLDER ) in ucb/source/core/ucbcmds.cxx (involving sal_Int32 and sal_Int16), would not have warned about !!(nMode & nUpdateMode) in sfx2/source/appl/workwin.cxx (ivolving o3tl::typed_flags<SfxVisibilityFlags>) either. Change-Id: Ibe955592951a04b1bd9a9b4e8cc502024bc1d460 Reviewed-on: https://gerrit.libreoffice.org/45083 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-23Make loplugin:unnecessaryparen look through implicitStephan Bergmann2-3/+28
...similar to how <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in loplugin:simplifybool consistent" does for loplugin:simplifybool Change-Id: I23eef400af71c582d380c9bae6546ce06e8a1e18 Reviewed-on: https://gerrit.libreoffice.org/45122 Tested-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-23loplugin:simplifybool for negation of comparison operatorNoel Grandin2-17/+53
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791 Reviewed-on: https://gerrit.libreoffice.org/45068 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-22Make loplugin:unnecessaryparen warn about (x) ? ... : ... after allStephan Bergmann2-15/+1
...which had been left out because "lots of our code uses this style, which I'm loathe to bulk-fix as yet", but now in <https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have caused an otherwise innocent-looking code change to trigger a loplugin:unnecessaryparen warning for pFormat = (pGrfObj) ? ... (barring a change to ignoreAllImplicit in compilerplugins/clang/unnecessaryparen.cxx similar to that in <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in loplugin:simplifybool consistent", which should also have caused the warning to disappear for the modified code, IIUC). Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2 Reviewed-on: https://gerrit.libreoffice.org/45088 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-22loplugin:flatten look for large if statement at end of functionNoel Grandin2-22/+274
the rewriter is capable of flattening the function by returning early, and inverting simple conditions. More complex conditions are just wrapped in "!(x)" Change-Id: I028fd7b018dc7347c1b323b2a73ab99c18508faa Reviewed-on: https://gerrit.libreoffice.org/45071 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-22There appears to be no reason to ignore macros in these parts of...Stephan Bergmann1-22/+11
...loplugin:unnecessaryparen Change-Id: I473a1e16cf9f485a61af5477aca22798996253a3
2017-11-22loplugin:simplifybool re-activate the !! warningNoel Grandin1-2/+8
Change-Id: Iac7d82a1c228734177be536e9a6c41803c03637b Reviewed-on: https://gerrit.libreoffice.org/45035 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-20look for =() in loplugin:unnecessaryparenNoel Grandin2-17/+101
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0 Reviewed-on: https://gerrit.libreoffice.org/44944 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-20re-enable loplugin:useuniqueptrNoel Grandin1-1/+1
Change-Id: Ic1a7e5bd3a8002ac996a6af1d1d9a439d4153b0b Reviewed-on: https://gerrit.libreoffice.org/44864 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-17Make loplugin:casttovoid more resilient against macrosStephan Bergmann1-1/+1
...in the type at the start of a ParmVarDecl, so that it does not erroneously assume in isSharedCAndCppCode that the whole decl is in "the body of a macro definition". (Even better might be to check the whole ParmVarDecl is inside one macro body.) Turns out that vcl/unx/gtk/gtkdata.cxx indirectly includes stdbool.h via some vcl/inc/unx/saldisp.hxx -> workdir/UnpackedTarball/epoxy/include/epoxy/glx.h -> workdir/UnpackedTarball/epoxy/include/epoxy/gl.h, and Clang's stdbool.h contains > /* Don't define bool, true, and false in C++, except as a GNU extension. */ > #ifndef __cplusplus > #define bool _Bool > #define true 1 > #define false 0 > #elif defined(__GNUC__) && !defined(__STRICT_ANSI__) > /* Define _Bool, bool, false, true as a GNU extension. */ > #define _Bool bool > #define bool bool > #define false false > #define true true > #endif since <http://llvm.org/viewvc/llvm-project?view=revision&revision=115028> "Define _Bool, bool, true, and false macros in <stdbool.h> when we're in a GNU-compatible C++ dialect. Fixes <rdar://problem/8477819>" while GCC's stdbool.h has meanwhile been improved with <https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=216679> "C++11 explicitly forbids macros for bool, true and false" to > #ifndef __cplusplus > > #define bool _Bool > #define true 1 > #define false 0 > > #else /* __cplusplus */ > > /* Supporting _Bool in C++ is a GCC extension. */ > #define _Bool bool > > #if __cplusplus < 201103L > /* Defining these macros in C++98 is a GCC extension. */ > #define bool bool > #define false false > #define true true > #endif > > #endif /* __cplusplus */ Change-Id: I42caab83ac6e4d5e5297376136a6bbe6f3d70818
2017-11-16Make checkIdenticalDefaultArguments more preciseStephan Bergmann2-0/+97
...by structurally comparing complex constexpr exprs that use template functions that happen to not have been instantiated, so Expr::EvaluateAsRValue et al would fail. (Which happened with SFX_PRINTER_ALL in SfxViewShell::SetPrinter, include/sfx2/viewsh.hxx.) Now all of the LO code base should compile without causing checkIdenticalDefaultArguments to return Maybe. Change-Id: I2b103418c2c68f6d2242535c9cca3222a2508778 Reviewed-on: https://gerrit.libreoffice.org/44773 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-16Avoid infinite loops in lopluginStephan Bergmann1-0/+1
...introduced with cab6e6836973a9ddfc5ed9df757e07138328c1c3 "Make checkIdenticalDefaultArguments more precise", causing older Clang to hang when compiling specific LO source files. Change-Id: I99cfcad2f0cd9adccd5aa84d21502f586762217f
2017-11-15Make checkIdenticalDefaultArguments more preciseStephan Bergmann3-16/+38
...when creating objects involves copy/move constructors Change-Id: I0c7ccb85b7dcb584502a48817d7d2abfde25aaf2 Reviewed-on: https://gerrit.libreoffice.org/44733 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-14clang-format fixStephan Bergmann1-1/+6
Change-Id: I09db5eeee5734f980a794e9adee70b6b634dfd99 Reviewed-on: https://gerrit.libreoffice.org/44732 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-14Make checkIdenticalDefaultArguments more preciseStephan Bergmann2-15/+43
...when creating objects of the same derived type Change-Id: I109b614473a2fb5b08dddd07a4fbe757086141a1 Reviewed-on: https://gerrit.libreoffice.org/44716 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-14loplugin:flatten loosen conditionNoel Grandin2-9/+26
the description in the comment was right, but the code was not Change-Id: I7c038e7453f4387d33ec6423c0c55446d6d0df47 Reviewed-on: https://gerrit.libreoffice.org/44680 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-13Fix typosAndrea Gelmini1-2/+2
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91 Reviewed-on: https://gerrit.libreoffice.org/44654 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Mark Page <aptitude@btconnect.com>
2017-11-11loplugin:unnecessaryoverride: suppress warnings when default args differStephan Bergmann5-50/+125
...instead of blacklisting such cases. Reuses the checkIdenticalDefaultArguments code that was originally in loplugin:overrideparam (and appears to work reasonably well for the default arguments that actually happen in practice). Change-Id: I9cf2db17101beb135b2039a9b7ed335bd2af2c08 Reviewed-on: https://gerrit.libreoffice.org/44594 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-10loplugin:unnecessaryoverride: no warnings when fns are actually differentStephan Bergmann2-0/+21
Change-Id: I90d8af7a1affa459400b1cae4805e3a80b6c5200 Reviewed-on: https://gerrit.libreoffice.org/44593 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-10No need to blacklist this loplugin:unnecessaryoverrideStephan Bergmann1-3/+0
...a using declaration should fix it just fine Change-Id: I05cf76672bcceb7a94afa602e215a0b5a32de82b Reviewed-on: https://gerrit.libreoffice.org/44591 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-10No need to blacklist this loplugin:unnecessaryoverrideStephan Bergmann1-3/+0
...a using declaration should fix it just fine Change-Id: I0279994c155775e9a58e93aef8da4522d4fd93fd Reviewed-on: https://gerrit.libreoffice.org/44590 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-10loplugin:unusedmethods new analysisNoel Grandin2-0/+48
look for classes containing protected methods where we can convert them all to private Change-Id: I4a448341943e0a613cde30501c4012da61dba713 Reviewed-on: https://gerrit.libreoffice.org/44588 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-10loplugin:unusedmethodsNoel Grandin2-90/+1
Change-Id: I543b0943f0bc918d59debc8ee051f88c29d18454 Reviewed-on: https://gerrit.libreoffice.org/44553 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-10No need to check both (identical) param_size() and getNumParams()Stephan Bergmann1-2/+0
Change-Id: I481cfa8b0f4bb9cbc257d28f36c372fb7367f294
2017-11-09connectivity: fix loplugin:datamembershadow warning in the Calc driverMiklos Vajna1-2/+0
Change-Id: Idcc6b1734599eec5d9eefbefb8849dc050b6a9d6 Reviewed-on: https://gerrit.libreoffice.org/44522 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
2017-11-09loplugin:unusedvariable add some more std:: typesNoel Grandin1-0/+8
Change-Id: Ib15931e415990b56367fe3e1c7cf3f22cc4826d5 Reviewed-on: https://gerrit.libreoffice.org/44529 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-09loplugin:unusedfieldsNoel Grandin4-89/+110
Change-Id: Ie8a2c6462ddc708140e725847199c8234ab6b592 Reviewed-on: https://gerrit.libreoffice.org/44528 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-09No need to blacklist this loplugin:unnecessaryoverrideStephan Bergmann1-3/+0
This now hides one of the ScVbaFormatCondition_BASE::Operator overloads, but that doesn't get called directly at ScVbaFormatCondition anyway. (And if it were, we could add an appropriate using declaration to ScVbaFormatCondition.) Change-Id: I8440b76a5745c6874f7a3bfcbb4bc4ce5618a4c4
2017-11-09new loplugin simplifydynamiccastNoel Grandin2-0/+150
simplify dynamic_cast followed by static_cast Change-Id: I965afcf05d1675094cfde53d3590a0fd00f26279 Reviewed-on: https://gerrit.libreoffice.org/44460 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-09loplugin:unnecessaryvirtualNoel Grandin1-37/+37
Change-Id: I5696c853daa16c9e55ff046d67102ba3042bfea8 Reviewed-on: https://gerrit.libreoffice.org/44459 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-08Fix loplugin::unusedvariablecheck check for std classesStephan Bergmann2-8/+31
(but which finds no new hits) Change-Id: I862a3c82932ee6d6d0946cd33f965bb8e917cff8
2017-11-08Drop HAVE_GCC_ATTRIBUTE_WARN_UNUSED_STLStephan Bergmann1-7/+0
For one, loplugin:unusedvariablecheck does not merely check for unused variables with types from the standard library since fe2164949b38a7f73883dbdcb3271b94e5c81744 "teach unusedvariablecheck plugin about SfxPoolItem subclasses", so disabling loplugin:unusedvariablecheck based on HAVE_GCC_ATTRIBUTE_WARN_UNUSED_STL is wrong. For another, I have seen no standard library implementation that decorates its types with such "warn-if-unused" attributes, and <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0600r0.pdf> "[[nodiscard]] in the Library" (which proposes to add the corresponding C++17 attribute to just a few select functions and no types at all) makes it appear unlikely that will happen. Change-Id: I0a7759e1caf3e3137057c9689080948a4d6747e0
2017-11-08Fix loplugin:flatten's skipping of if/then/else/if chainsStephan Bergmann2-5/+45
(but which finds no new hits) Change-Id: I5d5f351402797b662a08ec8dca301bd174e22a50 Reviewed-on: https://gerrit.libreoffice.org/44433 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-08Remove obsolete "lo_warn_unused" workaroundStephan Bergmann1-12/+0
Per README.md, Clang 3.4 is the baseline for --enable-compiler-plugins, which is the sole consumer of the "lo_warn_unused" attribute, but Clang 3.4 already supports HAVE_GCC_ATTRIBUTE_WARN_UNUSED. Change-Id: I9654028e24852335e463c73bcb5ece5e5b54d53c
2017-11-08Suppress loplugin:unnecessaryoverride...Stephan Bergmann2-7/+100
...when a class derives from multiple (non-virtual) instances of one base class, and the override disambiguates which of those instances' member to call. That was the case with SwXTextDocument::queryAdapter (sw/source/uibase/uno/unotxdoc.cxx), where SwXTextDocument derives from cppu::OWeakObject through both SwXTextDocumentBaseClass and SfxBaseModel, but calling queryAdapter through a pointer to SwXTextDocumentBaseClass apparently needs to call OWeakObject::queryAdapter on the second, SfxBaseModel-inherited OWeakObject base instance, or else CppunitTest_sw_macros_test fails. Who knows what other instances of similar non-unnecessary overrides have been removed with the help of broken loplugin:unnecessaryoverride, for which there were no tests that started to fail... Turns out .clang-format lacked "ReflowComments: false" to not break the special "// expected-error {{...}}" etc. comments in compilerplugins/clang/test/. Also, use a better location to report loplugin:unnecessaryoverride, to keep clang-format and loplugin:unnecessaryoverride from fighting over how to split lines and where to put the comment in compilerplugins/clang/test/unnecessaryoverride.cxx. Change-Id: I3b24df24369db12f8ec1080d6c9f7b70ff561a16 Reviewed-on: https://gerrit.libreoffice.org/44418 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2017-11-07Remove obsolete commentStephan Bergmann1-1/+0
...that should have been removed in 2446d2b2fb8b091eaae015fd5bb26bd8e0f596f7 "Avoid expensive calls to containsPreprocessingConditionalInclusion" Change-Id: I2ffe0ec7b6f1ec0b418979f2864bd5de79ab2c9a
2017-11-07Avoid expensive calls to containsPreprocessingConditionalInclusionStephan Bergmann1-13/+14
Change-Id: I42981a23f75298591b2c3b073aea66426220f3e2
2017-11-07loplugin:constparams in sdNoel Grandin1-0/+20
Change-Id: Id4b68ca0509111396ed354f4cda43d663083cad0 Reviewed-on: https://gerrit.libreoffice.org/44388 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-11-07Clean away temporarily added using declarationsStephan Bergmann86-106/+160
Change-Id: I26734c13515394162d88351a1cbe2b20abdac865
2017-11-07Memoize ignoreLocation resultsStephan Bergmann4-67/+100
...which, according to callgrind, reduces instruction fetch count spent on compiling sw/source/core/layout/paintfrm.cxx (randomly selected because it is rather large) by 5% from 41,992,064,226 to 39,861,989,855 (function main() in clang-6.0). This is best done by forwarding ignoreLocation calls from Plugin to the PluginHandler signleton, but due to the tight mutual coupling between plugin.hxx and pluginhandler.hxx that unfortunately required some reorganization (and two outstanding TODO clean-ups of temporarily introduced using declarations in plugin.hxx). Change-Id: Ia4270517d194def7db7ed80cb6894e9c473e9499
2017-11-02improve constparam lopluginNoel Grandin2-94/+165
lots of little fixes to make the logic less pessimistic Change-Id: If368822984250b11b98c56f5890177a1402e8660 Reviewed-on: https://gerrit.libreoffice.org/44168 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>