summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
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>
2019-01-18update useunique_ptr lopluginNoel Grandin
with more exclusions Change-Id: I95e7376ecf9c479d05b85c71f863d9ba40417538 Reviewed-on: https://gerrit.libreoffice.org/66552 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-16New loplugin:emptyStephan Bergmann
Change-Id: I8729db064573ac21dfe6b203c5ae244d79ecc4fe Reviewed-on: https://gerrit.libreoffice.org/66430 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-11Drop o3tl/string_view.hxxStephan Bergmann
...now that all of its uses have been replaced with C++17 <string_view>. The LO-specific o3tl::basic_string_view ctors with OString and OUString params have meanwhile been replaced with OString and OUString conversion functions (in dac7be50cff94e0c34cdca5ac7e35c19685c40c1 "o3tl::string_view -> std::string_view (in configmgr)"), the ctor with OUStringLiteral turned out to be no longer(?) needed anyway, and the LO-specific o3tl::toOUString has meanwhile been replaced with an OUString ctor with std::u16string_view param (in 6856da30665705be6380e84cf55de954c41f15d1 "o3tl::string_view -> std::string_view (in embedserv)"). Change-Id: Ie5215b07e2387560fb7e94de8b5a963241539c64 Reviewed-on: https://gerrit.libreoffice.org/66144 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-08loplugin:constantparamNoel Grandin
Change-Id: Id5c7e66b8f8bc324f097dd739ce683d74fc6491b Reviewed-on: https://gerrit.libreoffice.org/65953 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-01Bump copyright year to 2019Adolfo Jayme Barrientos
Change-Id: I0d49ec7db57a0f7d18489dad61e86cbfdf4418cd
2018-12-28Fix typo in codeAndrea Gelmini
Change-Id: I3a4bfbd84735ddcc8d2d0754973f73a98e06c303 Reviewed-on: https://gerrit.libreoffice.org/65652 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-12-21loplugin:unnecessaryvirtualNoel Grandin
Change-Id: I4ca101ba838afecbbc8e841a6a9fa6c9c0460f14 Reviewed-on: https://gerrit.libreoffice.org/65497 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-21loplugin:unusedfieldsNoel Grandin
Change-Id: Ib41c168817c30ce11baf99c3f43005313fe484ff Reviewed-on: https://gerrit.libreoffice.org/65496 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-21loplugin:unusedmethodsNoel Grandin
Change-Id: I63f03bd1a0510bf411341e1a04a40eb7fce2d57e Reviewed-on: https://gerrit.libreoffice.org/65495 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-13loplugin:unusedfields improve write-only logicNoel Grandin
when dealing with modifications to container classes (e.g. std::vector) Change-Id: Ic30043631007355ee9a3d9e3f9b6488b435182d6 Reviewed-on: https://gerrit.libreoffice.org/65050 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-13loplugin:constantparamNoel Grandin
Change-Id: I389f98d06058ba65a8c2d4df2bf7d4e5102659ad Reviewed-on: https://gerrit.libreoffice.org/65017 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-12weld SwCaptionOptPageCaolán McNamara
Change-Id: I3373a39d6d8b39717b7aec69544a9d2957db15d8 Reviewed-on: https://gerrit.libreoffice.org/65010 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-11loplugin:unusedfieldsNoel Grandin
Change-Id: I9f11c29a5bcb3512717ad01962f5645de96afe0b Reviewed-on: https://gerrit.libreoffice.org/64918 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-11loplugin:useuniqueptr in svtools,toolkitsNoel Grandin
Change-Id: Ied7768293e7781772205c9e8f9fb743a584e3125 Reviewed-on: https://gerrit.libreoffice.org/64880 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-11accessibletable.hxx no more existsAndrea Gelmini
Change-Id: I209c1483ee668c29e68b7a5412eff740eda348d1 Reviewed-on: https://gerrit.libreoffice.org/63849 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-11loplugin:useuniqueptr in vclNoel Grandin
Change-Id: I24eca813321fd3919bba9d37c285484f865ea2ea Reviewed-on: https://gerrit.libreoffice.org/64877 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-10cppcheck: incorrectStringBooleanErrorJulien Nabet
Change-Id: I7f4bce8444c6c022d856d20b06de4a4834148ea2 Reviewed-on: https://gerrit.libreoffice.org/64834 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-12-10loplugin:unnecessaryvirtualNoel Grandin
Change-Id: I15633651aaa914918f1e7739c4f3d4793f7d800a Reviewed-on: https://gerrit.libreoffice.org/64831 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-10loplugin:unusedfieldsNoel Grandin
Change-Id: I03e8814407fd8e345cb07ac433db4230b4d96e10 Reviewed-on: https://gerrit.libreoffice.org/64822 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-09loplugin:unusedmethodsNoel Grandin
Change-Id: I4f2635d468c9ad83b3ac93733529e01a4d03f38e Reviewed-on: https://gerrit.libreoffice.org/64805 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-08Remove obsolete SAL_FALLTHROUGH completelyStephan Bergmann
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b "HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now" Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937 Reviewed-on: https://gerrit.libreoffice.org/64800 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08Removed spurious charsAndrea Gelmini
$ file compilerplugins/clang/singlevalfields.results -i Before: compilerplugins/clang/singlevalfields.results: application/octet-stream; charset=binary After: compilerplugins/clang/singlevalfields.results: text/x-c; charset=iso-8859-1 Then converted to UTF-8, to avoid troubles reading it with Python/Editors without forcing latin-1, like this: UnicodeDecodeError('utf-8', b' SwWW8ImplReader::Read_F_DocInfo aName41 ZULETZTGEDRUCKT sw/source/filter/ww8/ww8par5.cxx:1569 SwWW8ImplReader::Read_F_DocInfo aName42 DERNI\xc8REIMPRESSION ', 155, 156, 'invalid continuation byte') See here: https://stackoverflow.com/questions/5552555/unicodedecodeerror-invalid-continuation-byte Change-Id: Ie54c25e069b3f12b6a28e3724f5b2d323f26f737 Reviewed-on: https://gerrit.libreoffice.org/64786 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-07loplugin:singlevalfields extend to all static varsNoel Grandin
Change-Id: Ic238bb5291539fd1b7e98cb4afc9b25f37e7d528 Reviewed-on: https://gerrit.libreoffice.org/64710 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-06Remove broken rebuild of compilerplugins when CLANG_FULL_VERSION changedStephan Bergmann
Not all compilerplugins/clang/*.cxx depend on config_clang.h (e.g., check.cxx doesn't), so this mechanism trying to rebuild compilerplugins once the underlying Clang installation changes doesn't work reliably in practice (just debugged through this with Miklos on IRC, and it wasn't the first time that `make distclean` fixed compilerplugins for somebody after they upgraded their Clang installation). Removing the brittle mechanism shows that plugin.hxx doesn't actually depend on config_clang.h. (There's a second mechanism trying to rebuild compilerplugins once the underlying Clang installation changes, namely > # Clang most probably doesn't maintain binary compatibility, so rebuild when clang changes. > $(CLANGOUTDIR)/clang-timestamp: $(CLANGDIR)/bin/clang$(CLANG_EXE_EXT) > $(QUIET)touch $@ in compilerplugins/Makefile-clang.mk, but that doesn't work reliably either, as it depends on the newly installed clang executable being newer than our clang-timestamp file, which will be the case for self-built Clang installations, but not necessarily when updating e.g. a distro-provided Clang installation.) Change-Id: Ie576f14356b3f0e55444375095c86aa851404bf3 Reviewed-on: https://gerrit.libreoffice.org/64623 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-05loplugin:singlevalfields add checking for static class fieldsNoel Grandin
which required a completely different set of code Also add checking for in-class initialiser on struct/class fields Change-Id: I31e1586975aaafe23996619e2f59678c5fbc390f Reviewed-on: https://gerrit.libreoffice.org/64593 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05loplugin:unnecessaryparen include more assignmentsNoel Grandin
Change-Id: I9fb8366634b31230b732dd38a98f800075529714 Reviewed-on: https://gerrit.libreoffice.org/64510 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-04loplugin:unusedenumconstants look through parenthesesNoel Grandin
Change-Id: I2afdf5a56d827e283dd2362b87446ad7848cb274 Reviewed-on: https://gerrit.libreoffice.org/64452 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-02loplugin:intvsfloat get this working reliablyNoel Grandin
Change-Id: Ifdf1a152f6bc2e2f6edae97a5191120f630f7e49 Reviewed-on: https://gerrit.libreoffice.org/64374 Tested-by: Jenkins Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-30Make some loplugin:implicitboolconversion code use TypeCheckStephan Bergmann
Change-Id: If675d629784894573085122beadc6abc3e67f457 Reviewed-on: https://gerrit.libreoffice.org/64335 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-30loplugin:unusedmethodsNoel Grandin
Change-Id: Id0d68d659fa06a8230ed0d927b85b6b504525d1e Reviewed-on: https://gerrit.libreoffice.org/64328 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-30loplugin:unusedfieldsNoel Grandin
Change-Id: Ib3c797584493763773fd44fc3e8ac8b70ab0c221 Reviewed-on: https://gerrit.libreoffice.org/64326 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-30loplugin:singlevalfieldsNoel Grandin
Change-Id: I70dc861573fd1b3d799c88aa2a6d9a3eda0e2a43 Reviewed-on: https://gerrit.libreoffice.org/64327 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-30loplugin:unusedenumconstants ignore common patternNoel Grandin
Ignore a common pattern that does not introduce any new information, merely removes information. Change-Id: I37da352c9295ec12b9dac7aad4b4792a6d726b0d Reviewed-on: https://gerrit.libreoffice.org/64255 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-29loplugin:stringconstant look for unnecessary OString constructor useNoel Grandin
and tweak the methods in check.hxx to make them more flexible when called with dc.Class(xxx ? "foo" : "bar") Change-Id: I881fe628f22121ced4d8849715d6b1c92b092da1 Reviewed-on: https://gerrit.libreoffice.org/64207 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-29Revert "comment out the EvaluateAsInt compat code for now"Stephan Bergmann
This reverts commit da9fb5d6d9ebf9363981c370ce937d8848989fcb, obsoleted by <http://llvm.org/viewvc/llvm-project?view=revision&revision=347756> "Re-commit r347417 'Re-Reinstate 347294 with a fix for the failures.'"
2018-11-29remove unused SdrInsertFlags enum valueNoel Grandin
Change-Id: Ic68f2dc4e3752859c943d9885b52b70f33896aea Reviewed-on: https://gerrit.libreoffice.org/64172 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-29comment out the EvaluateAsInt compat code for nowNoel Grandin
sberg: Note how that Clang change keeps getting reverted; latest one is <http://llvm.org/viewvc/llvm-project?view=revision&revision=347656> "Revert r347417 'Re-Reinstate 347294 with a fix for the failures.'" But lets wait a little while to see how things settle there. Change-Id: I05b34ca1377792bcb4c557defd3e9b5d11ee2b14 Reviewed-on: https://gerrit.libreoffice.org/64168 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-28loplugin:unusedfields in swNoel Grandin
Change-Id: I7a9184511df96bf2a6c40e39091010a7e2974ed6 Reviewed-on: https://gerrit.libreoffice.org/64143 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-28loplugin:unusedmethodsNoel Grandin
Change-Id: Idbdf2d5d12fad894a3dfc3a86cae839502f42cf6 Reviewed-on: https://gerrit.libreoffice.org/64114 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27loplugin:unnecessaryvirtualNoel Grandin
Change-Id: I3e6424e10eade04951f8ab24bb61af4ce19d1204 Reviewed-on: https://gerrit.libreoffice.org/64113 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27add EvaluateAsInt compat function for latest clangNoel Grandin
the old EvaluateAsInt method has been dropped as from current clang Change-Id: Ie30d1547ad8de777badff4b380d2fc9fb261e8fe Reviewed-on: https://gerrit.libreoffice.org/64107 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27remove unused BorderWindowStyle enum valueNoel Grandin
Change-Id: I05ae398b75bbafe9b144a90e6735cf7d5e532ce4 Reviewed-on: https://gerrit.libreoffice.org/64097 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27remove unused EEControlBits enum valueNoel Grandin
Change-Id: Ic363903bb6e32c029f5aac6810f69d590df1bf79 Reviewed-on: https://gerrit.libreoffice.org/64091 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27remove unused EVControlBits enum valuesNoel Grandin
Change-Id: I4e10f0a2f40f9e7b6cc40a810468f43b2ab97aa9 Reviewed-on: https://gerrit.libreoffice.org/64090 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27remove unused SfxObjectShellFlags enum valuesNoel Grandin
Change-Id: I945047c0955bc66602d1a5033197a7405a69a8d3 Reviewed-on: https://gerrit.libreoffice.org/64089 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27remove unused GraphicsStateUpdateFlags enum valuesNoel Grandin
Change-Id: I1a83c897d93a29d38aebccdba33be7b70592922e Reviewed-on: https://gerrit.libreoffice.org/64096 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27remove unused SfxViewShellFlags enum valueNoel Grandin
Change-Id: Ie754752203dcb066c69dff6effb835d7e1db1753 Reviewed-on: https://gerrit.libreoffice.org/64088 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-27remove unused enum storeAccessMode valueNoel Grandin
Change-Id: I88a53e285cc3e8b6cc1c67b1e56322a918554de6 Reviewed-on: https://gerrit.libreoffice.org/64087 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>