summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2019-03-11loplugin:constantparamNoel Grandin
Change-Id: Ibe167c208844b4cdd10df80ae804b1e5bfa6aa13 Reviewed-on: https://gerrit.libreoffice.org/68998 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-09loplugin:singlevalfieldsNoel Grandin
Change-Id: I7f9ff0fc58adf51eae7fef5ce925b91b8d1f4922 Reviewed-on: https://gerrit.libreoffice.org/68940 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-09loplugin:unusedfieldsNoel Grandin
Change-Id: Ifb2c9a2d1d7dcc0ed3e8458c1a13933ccababd4c Reviewed-on: https://gerrit.libreoffice.org/68939 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-09loplugin:unusedmethodsNoel Grandin
Change-Id: I242f56f2bc5dc8fce6db1ba8f1f8269da4fec0fa Reviewed-on: https://gerrit.libreoffice.org/68938 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-09loplugin:unnecessaryvirtualNoel Grandin
Change-Id: I1fcde14b66ce80157cbebe7f3ec8c5ced1e13143 Reviewed-on: https://gerrit.libreoffice.org/68937 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-08remove debugging leftoverNoel Grandin
Change-Id: Ia0d2a883a3bd3aca96fe4c8f72f44c694837e568
2019-03-08new loplugin constvarsNoel Grandin
detect static variables that can be made const. Thanks to mike kaganski for suggesting this. Here I introduce a new plugin feature - using markers in nearby comments to disable the plugin for specific vars. Some of this stuff was old debugging code. I removed the stuff that was older than 5 years. Change-Id: I6ec7742a7fdadf28fd128b592fcdf6da8257585c Reviewed-on: https://gerrit.libreoffice.org/68807 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-07Fix typoAndrea Gelmini
Change-Id: Icafc637004e219b523c862cb5fbad55a2bd4eaaf Reviewed-on: https://gerrit.libreoffice.org/68835 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-03-06loplugin:staticconstfield improve warning messageNoel Grandin
Change-Id: I000dff6b1b6e33e1b2c5aa337c027c1edd7b1003 Reviewed-on: https://gerrit.libreoffice.org/68795 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-06Remove debugging dump()sStephan Bergmann
Change-Id: I1f5479adefbf7c77a5584d698c6a6c35ff4716d0 Reviewed-on: https://gerrit.libreoffice.org/68778 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-06loplugin:unnecessaryparen improve member expressionNoel Grandin
Change-Id: I304621018cb1e2a47e478e86df4229bcf2176741 Reviewed-on: https://gerrit.libreoffice.org/68757 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-05re-land "new loplugin typedefparam""Noel Grandin
This reverts commit c9bb48386bad7d2a40e6958883328145ae439cad, and adds a bunch more fixes. Change-Id: Ib584d302a73125528eba85fa1e722cb6fc41538a Reviewed-on: https://gerrit.libreoffice.org/68680 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-04Revert "new loplugin typedefparam"Noel Grandin
This reverts commit 9865440d217d975206a3f91612f0666312bc8fd8. This is not ready to land yet, seems like the latest update of the logic reveals a bunch more places I need to fix before it can land.
2019-03-04new loplugin typedefparamNoel Grandin
verify that parameters use the exact same typedef-names (if any) in definition and declaration Change-Id: I55d2817f599b0253904dce2d35a1a93967e15a77 Reviewed-on: https://gerrit.libreoffice.org/68439 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-03-01do not call GetFormatTable() from GetNonThreadedContext() (tdf#121949)Luboš Luňák
ScDocument dtor calls ClearLookupCaches(), which calls GetNonThreadedContext(). But ScDocument instances used for copy&paste GetFormatTable() fails on null mxPoolHelper, because ScDocument ctor doesn't set it in such a case. So set up the pointer in ScInterpreterContext on demand only if actually needed. Change-Id: If3811da5bb00a2d7d404c089ee1bf46037a2cddb Reviewed-on: https://gerrit.libreoffice.org/68350 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
2019-02-28Remove unused YYWarning functions (cargo cult?)Stephan Bergmann
Change-Id: I9cb03530150ee35bdaee4920dd2e818007a0a658 Reviewed-on: https://gerrit.libreoffice.org/68469 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-27Fix apparent temporary debugging leftoverStephan Bergmann
Change-Id: I3277a341137b1b404ad9839431b5cc39a88fcbe1 Reviewed-on: https://gerrit.libreoffice.org/68425 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-27loplugin:unnecessaryoverride look for more patternsNoel Grandin
like bool Foo::bar() { b = Super::bar(); return b; } Change-Id: I5e4c8005a3da7d7487c9039c35dcbb1d17e65bd7 Reviewed-on: https://gerrit.libreoffice.org/68418 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27loplugin:unusedfields fix read/write when dealing with r<<= and >>=Noel Grandin
Change-Id: I103bcc2f21741d0a52a0bdf053fdbddf5a3e9ea0 Reviewed-on: https://gerrit.libreoffice.org/68387 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27m_bShowAllShapes in SdPageObjsTLV is deadNoel Grandin
since commit c4a91f1409fc21d92f207718f29377c2862e381f Date: Mon Feb 11 17:32:44 2019 +0000 weld SdInsertPagesObjsDlg Change-Id: I9644c492d02e930592fd568c15f2f87d12f4f038 Reviewed-on: https://gerrit.libreoffice.org/68386 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27loplugin:simplifybool improve search for negated operatorNoel Grandin
Change-Id: Id6ac35fefa5c3e1f64c222713791e849b3cb4d34 Reviewed-on: https://gerrit.libreoffice.org/68379 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-27loplugin:unusedfields look for classes where we can make all the..Noel Grandin
fields private Change-Id: Id3c6b123f06ab5dcf87628de4c347626110d2d27 Reviewed-on: https://gerrit.libreoffice.org/68302 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-25loplugin:unusedmethodsNoel Grandin
Change-Id: I085394e0f4b780dc5b376d5ac0e9d761434e3ead Reviewed-on: https://gerrit.libreoffice.org/68301 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-24Fix typoAndrea Gelmini
Change-Id: I70542a0cbbed834f47a84be4a60330ddc6e84d6f Reviewed-on: https://gerrit.libreoffice.org/68274 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-02-23Fix typoAndrea Gelmini
Change-Id: I428b4c484ba6e18ee2947c9be4688317764769f2 Reviewed-on: https://gerrit.libreoffice.org/68240 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2019-02-22loplugin:writeonlyvars is no-op on Windows, so don't run its test thereStephan Bergmann
But nevertheless, make sure that the variables m_bar9/10 used in combination with css::uno::Any have UNO-compatible type. Change-Id: I4e9915193386278ace128df94f7722d90b2567f2 Reviewed-on: https://gerrit.libreoffice.org/68195 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-21loplugin:unusedfields improve write-only when dealing with operatorsNoel Grandin
Change-Id: I3a060d94de7c3d77a54e7f7f87bef88458ab5161 Reviewed-on: https://gerrit.libreoffice.org/68132 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-21Fix typoAndrea Gelmini
Change-Id: Ibd7c52137674eb07c35c951260a8102d06a436cc Reviewed-on: https://gerrit.libreoffice.org/68130 Tested-by: Jenkins Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-02-20Avoid loplugin:indentation after preproc conditional inclusion linesStephan Bergmann
...to not trigger (for --disable-dbgutil) at > rContentAtPos.eContentAtPos = IsAttrAtPos::TableBoxFml; > #ifdef DBG_UTIL > if( RES_BOXATR_VALUE == pItem->Which() ) > rContentAtPos.eContentAtPos = IsAttrAtPos::TableBoxValue; > else > #endif > const_cast<SwTableBoxFormula*>(static_cast<const SwTableBoxFormula*>(pItem))->PtrToBoxNm( &pTableNd->GetTable() ); (sw/source/core/crsr/crstrvl.cxx:1710) Change-Id: I8fd5c8a1cd40450bdd8cc97057e5233a0134f044 Reviewed-on: https://gerrit.libreoffice.org/68030 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-19Better loplugin:unnecessaryparen check for vexing parseStephan Bergmann
Change-Id: Id7b09a8556da25b81c056d5811ba721e781682d6 Reviewed-on: https://gerrit.libreoffice.org/68025 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-18make Makefile-clang.mk also use gb_Output_announceLuboš Luňák
So that the output is consistent, even though the actual build handling is different. Change-Id: I460dfe4c2ac74515cc1b598d47e119eb249b8277 Reviewed-on: https://gerrit.libreoffice.org/67972 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-02-18make uninteresting code in clang's makefile to the uninteresting partLuboš Luňák
Change-Id: I235284c7198aa2a295b4d81ff2f8e9ca554a4174 Reviewed-on: https://gerrit.libreoffice.org/67971 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-02-18Make findOperator more precise wrt acceptable parameter typesStephan Bergmann
Change-Id: I0a1ea253d999c9444344188d764134e83ae0c495 Reviewed-on: https://gerrit.libreoffice.org/67959 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-18Tell about presumed corresponding negated operatorStephan Bergmann
Change-Id: Ic7ed64ecc4902853dc7431294484abb74e8da65b Reviewed-on: https://gerrit.libreoffice.org/67953 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-18loplugin:simplifybool, check for !(!a op !b)Noel Grandin
Change-Id: Ic3ee9c05705817580633506498f848aac3ab7ba6 Reviewed-on: https://gerrit.libreoffice.org/67866 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-16drop newly unused codeCaolán McNamara
drop now unused ListBoxWrapper Change-Id: I19271de67269a9e23cf889a32910405cf3dc7a2a drop unused SingleControlWrapper Change-Id: I80bd639a9d64a1b35249c1c59c1c9d134ae6f1ca drop unused PosValueMapper Change-Id: I5e3d9ed48b5f544215ae82ba7899a62be4e59a25 drop unused ControlWrapperBase Change-Id: I1890f492604ac848775e8d4b0070a3189a719a18 drop now empty itemconnect.cxx Change-Id: I5374dbf91dbe715a563e7c694c9d96fb07d8f9c8 drop unnecessary controlwrapper.hxx Change-Id: Ide633f64ca2851aee4f29a7f86e09cb78043d388 Reviewed-on: https://gerrit.libreoffice.org/67887 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-15SourceManager::getExpansionRange already returns CharSourceRange since Clang 7Stephan Bergmann
Change-Id: Ic7c6c648c71203116ca074bd7392a48ff850cd51 Reviewed-on: https://gerrit.libreoffice.org/67864 Reviewed-by: Tor Lillqvist <tml@collabora.com> Tested-by: Tor Lillqvist <tml@collabora.com>
2019-02-15loplugin:simplifybool extend to !(a == b) where comparison an overloaded opNoel Grandin
Change-Id: I08fcbe2569c07f5f97269ad861fa6d38f23a7cc7 Reviewed-on: https://gerrit.libreoffice.org/67816 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-13Make loplugin:stringconcat more robustStephan Bergmann
Change-Id: Ib8adefd90141007c0422b4c15ba9c2cc5f707f3f Reviewed-on: https://gerrit.libreoffice.org/67762 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-13Fix typoAndrea Gelmini
Change-Id: I036a41bd4d46973a8b6fb51a90c6506cf3f9b8f0 Reviewed-on: https://gerrit.libreoffice.org/67748 Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com> Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-02-12More loplugin:indentation Qt "emit" hackeryStephan Bergmann
Change-Id: I6f71546a5f6ab07bb4df6fc89213962e74984c84
2019-02-11new loplugin writeonlyvarsNoel Grandin
largely based on the relevant portion of the unusedfields loplugin, but adapted for local vars Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1 Reviewed-on: https://gerrit.libreoffice.org/66835 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11use more hasPathnamePrefixNoel Grandin
Change-Id: I539e6aedad61d80b6ebe80104b77d720072395bd
2019-02-11remove debugging codeNoel Grandin
Change-Id: Ibb6f3a1c711959cb4f32541dba96f005e51c9040
2019-02-11loplugin:indentation workaround qt macrosNoel Grandin
Change-Id: I17bb0b462bb4ce7e8128c9ad33491aa8b691e566
2019-02-11new loplugin indentationNoel Grandin
look for mixed indentation in compound statements, which makes them hard to read, and sometimes makes it look like a statement is associated with a nearby if/for Change-Id: Ic8429cee1f9a86d938097a4a8769a2bce97b3361 Reviewed-on: https://gerrit.libreoffice.org/63283 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-31Fix compilerplugins/clang/test/useuniqueptr.cxx for clang-clStephan Bergmann
...where it failed with > error: 'error' diagnostics expected but not seen: > File C:/lo-clang/core/compilerplugins/clang/test/useuniqueptr.cxx Line 266: rather manage this var with std::some_container<std::unique_ptr<T>> [loplugin:useuniqueptr] > File C:/lo-clang/core/compilerplugins/clang/test/useuniqueptr.cxx Line 275: rather manage this member with std::some_container<std::unique_ptr<T>> [loplugin:useuniqueptr] apparently due to differences in how some std types are implemented. Change-Id: Ib81ed1a1da867359e7f22bb6fb6ceb3e610e2b41 Reviewed-on: https://gerrit.libreoffice.org/67226 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-31loplugin:unusedfileds is no-op on Windows, so don't run its test thereStephan Bergmann
But nevertheless, make sure that the variables m_bar9/10 used in combination with css::uno::Any have UNO-compatible type. Change-Id: I241d8b5d37de60b00b5bfdc69e642872b28e8ee2 Reviewed-on: https://gerrit.libreoffice.org/67201 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-25loplugin:unusedmethodsNoel Grandin
Change-Id: Ifb0c479e9d1aed1cd90d78ed23902fc05db556d6 Reviewed-on: https://gerrit.libreoffice.org/66862 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-25improve loplugin constparamsNoel Grandin
Change-Id: Ic1833dbd030044011e7ee5f89dc35737e5469f05 Reviewed-on: https://gerrit.libreoffice.org/66586 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>