summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2019-10-21loplugin:virtualdead unused param in SfxObjectShell::FillClassNoel Grandin
and since I notice that the two call sites also don't care about pShortTypeName, remove that too Change-Id: I4649fc4c134c1113555b9dedb53499ce39d17132 Reviewed-on: https://gerrit.libreoffice.org/81213 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in SfxStatusListener::StateChangedNoel Grandin
Change-Id: Ic467490ddd1b0762bfa61878c4026afb53b02743 Reviewed-on: https://gerrit.libreoffice.org/81212 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21Don't invoke the linker when generating pch filesStephan Bergmann
When `llvm-config --cxxflags` outputs -Wl,... options (as has been discussed at 824d9394b529bb1fc521e4a4df8c4e3458ec5641 "Properly handle comma in CLANGFLAGS", and which end up on the compiler command lines here), Clang failed with an error "cannot specify -o when generating multiple output files" when generating sharedvisitor/clang.pch. Change-Id: I200ebd152f5a524ce7ecdd2f25c34bbaa634f515 Reviewed-on: https://gerrit.libreoffice.org/81065 Tested-by: Jenkins Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-21loplugin:deadvirtual unused param in ItemUpdateReceiverInterfaceNoel Grandin
Change-Id: I3db5a456a259a97dc9bdf6be0d478177bac05215 Reviewed-on: https://gerrit.libreoffice.org/81186 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in TitleBar::PaintDecorationNoel Grandin
Change-Id: I3dd8ee6492be1a4b3d1032c4d50cc01111d748cb Reviewed-on: https://gerrit.libreoffice.org/81185 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in ITableRendererNoel Grandin
Change-Id: I008ff69494af305485a022def72a14a04b26a19e Reviewed-on: https://gerrit.libreoffice.org/81183 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in ThumbnailViewItem::calculateItemsPositionNoel Grandin
Change-Id: I8db99a3672e3603a25ee1f6ca4741a02b73c9516 Reviewed-on: https://gerrit.libreoffice.org/81184 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in FmXDisposeListener::disposingNoel Grandin
Change-Id: I2189f0a35b03bc8192ab91cd63b210f303f5d3e6 Reviewed-on: https://gerrit.libreoffice.org/81182 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in SdrHdl::onHelpRequestNoel Grandin
Change-Id: I3d75755bd6fd7f3168725c53fd8ce571a938fa37 Reviewed-on: https://gerrit.libreoffice.org/81181 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in GetSdrRepeatCommentNoel Grandin
Change-Id: I0a27d1a200e8af50adf98de2c5ba7d3c7e199b00 Reviewed-on: https://gerrit.libreoffice.org/81180 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-21loplugin:virtualdead unused param in CreateSvxFormatCellsDialogNoel Grandin
Change-Id: I8455c10d62ae8c3c3e6e543301f8c69a1189456a Reviewed-on: https://gerrit.libreoffice.org/81179 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-20loplugin:virtualdead unused param in Task::UpdateMinPeriodNoel Grandin
Change-Id: Ie24f56fed811b3b317d6c20e15289e7cecfb738d Reviewed-on: https://gerrit.libreoffice.org/81157 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-20loplugin:virtualdead unused param in SvListView::ModelIsMovingNoel Grandin
Change-Id: I83af14bb3a29cb8a4a36f714ac2fb91687f13996 Reviewed-on: https://gerrit.libreoffice.org/81156 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-20loplugin:virtualdead unused param in RedlineAdjustStartNodeCursorNoel Grandin
Change-Id: Ic8eaad705b0cf8289035f7eee3ad01439fc24ee7 Reviewed-on: https://gerrit.libreoffice.org/81155 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-20loplugin:virtualdead unused param in XMLEventContextFactory::CreateContextNoel Grandin
Change-Id: I6fda2e04724d69fd218ffc85f9881b429714e63b Reviewed-on: https://gerrit.libreoffice.org/81154 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-19loplugin:unusedfieldsNoel Grandin
Change-Id: I7dd5fc3d53df63fd2ee2caa71586f0f5e13f187e Reviewed-on: https://gerrit.libreoffice.org/81078 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-19loplugin:unusedmethodsNoel Grandin
Change-Id: I95e63105654952d12c1dfd62f51593de114be569 Reviewed-on: https://gerrit.libreoffice.org/81077 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-19loplugin:virtualdead unused param in ValueGetter::processValueNoel Grandin
Change-Id: Id2b514b0892f8d7cf93fe3c5884e8d89a6f0a7b1 Reviewed-on: https://gerrit.libreoffice.org/81076 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-19loplugin:virtualdead unused param in sd::View::AcceptDropNoel Grandin
Change-Id: I51aceb8a1f908cf89a0b8b6d0e58755fc4374862 Reviewed-on: https://gerrit.libreoffice.org/81075 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-19loplugin:virtualdead unused param in ViewClipboard::DetermineInsertPositionNoel Grandin
Change-Id: Iad1a4dbd603e9258e8835e7ab534cd74f4882968 Reviewed-on: https://gerrit.libreoffice.org/81074 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-19loplugin:virtualdead unused param in sd::ViewShell::UpdatePreviewNoel Grandin
Change-Id: I1ac98096d117e3ae7c2f0be2690acef32b85fbdb Reviewed-on: https://gerrit.libreoffice.org/81073 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-19loplugin:virtualdead unused params in OGLTransitionImplNoel Grandin
rename finish to cleanup to avoid conflict with already existing finish method Change-Id: I1036eea7e50b20c3c17d769c4094c640939d552d Reviewed-on: https://gerrit.libreoffice.org/81072 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-19loplugin:virtualdead unused param in Animation::prefetchNoel Grandin
Change-Id: I7eaf01548567ce560b0e32f222880d21b966c78d Reviewed-on: https://gerrit.libreoffice.org/81071 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-19loplugin:virtualdead unused params in ShapeListenerEventHandlerNoel Grandin
Change-Id: Ied95fd01912737ba1ae73fb1fea6ddd57eb8a14d Reviewed-on: https://gerrit.libreoffice.org/81070 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-18Properly handle comma in CLANGFLAGSStephan Bergmann
...which would cause an error that STRINGIFY takes only a single argument. According to chris_wot on IRC, LLVM 6.0 on Ubuntu 18.04.3 LTS output of `llvm --cxxflags` (as is used in configure.ac to determine what ultimately ends up in CLANGFLAGS here) includes e.g. -Wl,--no-keep-files-mapped. Change-Id: Iff570840fe62c2aa2d972431e610a05fe2f6922c Reviewed-on: https://gerrit.libreoffice.org/81037 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2019-10-18loplugin:virtualdead unused param in contextMenuRequestedNoel Grandin
Change-Id: Ifc13a476da29966a2a0023226967201ecc97b444 Reviewed-on: https://gerrit.libreoffice.org/81017 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-18loplugin:virtualdead unused param in IDocumentLinksAdministration::SetDataNoel Grandin
Change-Id: I4d36b56a10266293285b9b7727f3c6bfac23a45b Reviewed-on: https://gerrit.libreoffice.org/81016 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-18lopligin:virtualdead unused params in IDocumentRedlineAccessNoel Grandin
Change-Id: I60b343d5e7acb6310e5a0f501f8cfb78dc4ea7a8 Reviewed-on: https://gerrit.libreoffice.org/81015 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-18loplugin:virtualdead unused param in SwFlowFrame::ShouldBwdMovedNoel Grandin
Change-Id: Ife69fe8c9023682278c02d037d35d15bd015f127 Reviewed-on: https://gerrit.libreoffice.org/81014 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-18loplugin:virtualdead unused param in SwImpBlocks::RenameNoel Grandin
Change-Id: Ifed3e1e89a2d67b08d96d89424e83c49160cb3fe Reviewed-on: https://gerrit.libreoffice.org/81010 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-18loplugin:virtualdead unused params in SvXMLExportItemMapper::handleElementItemNoel Grandin
Change-Id: Ib77a29d23d8a67fab8441d369b2ff4660c1f99bc Reviewed-on: https://gerrit.libreoffice.org/81009 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-18loplugin:virtualdead unused param in SvXMLImportItemMapper::handleSpecialItemNoel Grandin
Change-Id: Ie1a8fdafb64f6374ae9108dbb47592b044703cc9 Reviewed-on: https://gerrit.libreoffice.org/81008 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-18loplugin:virtualdead unused params in IMailDispatcherListenerNoel Grandin
Change-Id: I0cc6a813db88efc98673400447d98e50c32bc720 Reviewed-on: https://gerrit.libreoffice.org/80962 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17loplugin:virtualdead unused param in BinaryObj::dataNoel Grandin
Change-Id: I726745b82747f24cc93662bfb0dd381a114fde78 Reviewed-on: https://gerrit.libreoffice.org/80955 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17loplugin:virtualdead unused param in LoggedStream::lcl_infoNoel Grandin
which means the whole method is actually unused Change-Id: I72d33ab6e260012b82002ceae7ff9e54e2ea6349 Reviewed-on: https://gerrit.libreoffice.org/80953 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17loplugin:virtualdead unusedparam in LoggedTable::lcl_entryNoel Grandin
Change-Id: I45c7330b3803f21165714c6140fac46a6592db9b Reviewed-on: https://gerrit.libreoffice.org/80952 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17loplugin:buffereadd find stuff involving adding *StringBufferNoel Grandin
and create conversion methods on *StringBuffer to make this work Change-Id: I3cf5ee3e139826168894b46eff8ee4bcde00cb7e Reviewed-on: https://gerrit.libreoffice.org/80949 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17loplugin:virtualdead dead propertygroup functionalityNoel Grandin
ever since it was introduced in commit d09dd8986436f17717443823ef18bd8552fdf408 Date: Wed Sep 15 13:55:34 2010 +0200 dba34a: export/import min-/max-/default-/value for date/time as XML-Schema conformant strings looks like classic over-engineering Change-Id: Ia4e4b65cfe92f522dee238a54a37db01f691750e Reviewed-on: https://gerrit.libreoffice.org/80951 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17loplugin:virtualdead look for virtual methods where a param is unusedNoel Grandin
Change-Id: Ibadc2aa79a52082db16eff44c89ab30938838dd8 Reviewed-on: https://gerrit.libreoffice.org/80935 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17loplugin:stringadd fix conditionNoel Grandin
Change-Id: I7752c281b1b6dd0d26bd7d6c4a6896c663f4cbc3 Reviewed-on: https://gerrit.libreoffice.org/80921 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-17Remaining loplugin:bufferaddStephan Bergmann
...that had been missing because the plugin didn't implement postRun, so it didn't report anything when run as part of the shared plugin. (But did report the expected warnings when run as a standalone plugin during CompilerTest_compilerplugins_clang.) Most fixes are straightforward. A noteworthy one is PreparedStatement::setBytes in connectivity/source/drivers/postgresql/pq_preparedstatement.cxx: The old preallocation of a 20 character OStringBuffer might have prevented buf.append( reinterpret_cast<char *>(escapedString), len -1 ); from potentially throwing std::bad_alloc, which would have caused escapedString to be leaked. Even though that 20-character preallocation was likely just random junk and not meant to address the potential leak, lets address it now. Change-Id: Ib506332d061684a22a74e5e39e591539fd2c4900 Reviewed-on: https://gerrit.libreoffice.org/80925 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-17Rename OUStringLiteral1 to OUStringCharStephan Bergmann
It started out as a wrapper around character literals, but has by now become a wrapper around arbitrary single characters. Besides updating the documentation, this change is a mechanical for i in $(git grep -Fl OUStringLiteral1); do sed -i -e s/OUStringLiteral1/OUStringChar/g "$i"; done Change-Id: I1b9eaa4b3fbc9025ce4a4bffea3db1c16188b76f Reviewed-on: https://gerrit.libreoffice.org/80892 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-16loplugin:bufferadd loosen some constraintsNoel Grandin
and extend O*StringView to have a constructor that takes a pointer and a length Change-Id: I6120e96280f030757e855a6596efdae438b7e1e8 Reviewed-on: https://gerrit.libreoffice.org/80872 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-16loplugin:stringadd look through a couple more known-good methodsNoel Grandin
Change-Id: Ifbdb3e41eae665f7dcaf5301aaba2b6e4662cf48 Reviewed-on: https://gerrit.libreoffice.org/80855 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-15Improve loplugin:stringadd diagnosticsStephan Bergmann
Change-Id: I8b87c4e56f10417acd538b765b3f8e4cc6e12fb9 Reviewed-on: https://gerrit.libreoffice.org/80844 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-15Fix typoAndrea Gelmini
Change-Id: I48a52bd1c7afe83fe02c9651963436b9c5e07ca0 Reviewed-on: https://gerrit.libreoffice.org/80849 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2019-10-15Improve loplugin:stringaddStephan Bergmann
...after 9b5dad13b56bdde7c40970351af3da3a2c3c9350 "loplugin:stringadd look for unnecessary temporaries". There was no reason to check for implicit MaterializeTemporaryExpr instead of explicitly written CXXFunctionalCastExpr, and checking for the latter makes it easier to report the casted-from type, which gives useful information how to change code that exhibits the warning. See the comments at <https://gerrit.libreoffice.org/#/c/80724/> "loplugin:stringadd look for unnecessary temporaries" for details. (And while at it, remove some commented-out debug code that is probably no longer relevant now.) Change-Id: I7d4cab85432885d617dd7114c75163c1eb376fc2 Reviewed-on: https://gerrit.libreoffice.org/80823 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-10-15use PCH for clang plugin source too, if enabledLuboš Luňák
This currently supports only building with Clang on Linux, as I'm lazy to handle the other cases (and Clang should be usually self-built anyway). The main compile time cost is in optimizing the code, but this still saves few seconds per source. Change-Id: Ib6c0fd874820af737ee1257cb5234fb78bc63ad8 Reviewed-on: https://gerrit.libreoffice.org/80810 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-10-15new loplugin:bufferaddNoel Grandin
look for OUStringBuffer append sequences that can be turned into creating an OUString with + operations Change-Id: Ica840dc096000307b4a105fb4d9ec7588a15ade6 Reviewed-on: https://gerrit.libreoffice.org/80809 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-10-15Can use pointer to const hereStephan Bergmann
Change-Id: I1960e0a460ec4eae4f8d4da526aad8db863087af Reviewed-on: https://gerrit.libreoffice.org/80813 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>