summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2016-10-18-Werror=unused-functionStephan Bergmann
Change-Id: I9e0585460d908024f75a1134bc1cd20d12ea3b4e
2016-10-18rename inlineablemethods plugin to expandablemethodsNoel Grandin
and add support for nested functions Change-Id: I63daee5b3047fa1ed5de0e5ddaf998f8b17bc780
2016-10-18loplugins: extract some common functionalityNoel Grandin
Change-Id: If470e1d9b481c9eda0829aa985152baf8fb46d7a
2016-10-18simplify inlineablemethods lopluginNoel Grandin
Change-Id: I72750a14664aa042da232c35cca3373ce367cfb0
2016-10-18some cleanups to the unusedmethods lopluginNoel Grandin
- publicDefinitionSet is unnecessary, the python post-processor does not need it - remove the traversing of templates, clang will do that for us since we have set the shouldVisitTemplateInstantiations() method Change-Id: I0e96dad0b1cc941fe6c4a2e9227e86d8c3f1d85a
2016-10-18new loplugin inlineablemethodsNoel Grandin
look for methods that are: (*) non-virtual (*) only called once (*) only called from inside their own class (*) small i.e. < 40 characters which are candidates for just having their code inlined Change-Id: I0e9e8125d140282cdcdd2a77374059b17b2fcd7d
2016-10-16clang::FileEntry::getName now returns StringRef on Clang masterStephan Bergmann
Change-Id: I94c9676e52a3c60ad70567396a8484e844176c6e
2016-10-14loplugin:mergeclasses merge TextView with ExtTextViewNoel Grandin
Change-Id: If7e11dd8f6b2cb6dc19c6aa3f7e50e2e88861eac Reviewed-on: https://gerrit.libreoffice.org/29828 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-14loplugin:mergeclasses merge SfxWorkWindow with SfxFrameWorkWin_ImplNoel Grandin
Change-Id: If6cab49904fdb044d85a4fd29f79faa7b52c9959
2016-10-14loplugin:mergeclasses merge SwTextAttrIterator with SwLanguageIteratorNoel Grandin
Change-Id: Iaa9184f6145625c897fa5b919e9bf0c898b41102
2016-10-14loplugin:mergeclasses merge SwComboBox with CaptionComboBoxNoel Grandin
Change-Id: Ieef8f00cb1f6f8fb62ad385d1085e8a63161a710
2016-10-14loplugin:mergeclasses merge SvxListBoxControl with SvxUndoRedoControlNoel Grandin
Change-Id: I5ba9c9d970246d80bb60e27e3b703ec03376c35c
2016-10-14loplugin:mergeclasses merge svx::ISlotInvalidator with svx::FmTextControlShellNoel Grandin
Change-Id: I828ef52bc093d3fa2946f813a2dd09ac6b34e94c
2016-10-14loplugin:mergeclasse merge ScCbWarningBox with ScReplaceWarnBoNoel Grandin
Change-Id: I7b55b036c1992b88b01b51053a3560e9f97986c9
2016-10-13loplugin:mergeclasses ImplEESdrWriter with ImplEscherExSdrNoel Grandin
Change-Id: Iea2241d9fc44b92e18101b3f367a643f03729183
2016-10-13loplugin:unnecessaryoverrideNoel Grandin
Change-Id: I08c55a3023ec2e8990098eeb60e91cd18556e7ae Reviewed-on: https://gerrit.libreoffice.org/29656 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-12typoStephan Bergmann
Change-Id: Iea55eee0e5e777e46bb02435f10bca03e554a15c
2016-10-12improve error message in refcounting pluginNoel Grandin
Change-Id: I02b483c1d696913b33112b9248747f9c3d28dc55
2016-10-11loplugin:constantfunctionNoel Grandin
update the plugin similarly to commit 3ee3b36ae0c064fb5c81268d8d63444309d1b970 Author: Stephan Bergmann <sbergman@redhat.com> Date: Fri Oct 7 12:05:49 2016 +0200 loplugin:staticmethods: Don't be fooled by decls starting with macros Change-Id: I98ac3216d5acf89a49a26feb089ae2fd34e6e510 Reviewed-on: https://gerrit.libreoffice.org/29665 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-10Handle loplugin:fpcomparison false positives by whitelistStephan Bergmann
Change-Id: I58e2beb0695a27922856bd8f8988d9e4508aceb6
2016-10-09loplugin:fpcomparison, macOS reduxStephan Bergmann
Change-Id: Ie41be540209b4af7c0571f7c16bedd0665daff10
2016-10-09loplugin:badstatics: reliably look into std container typesStephan Bergmann
Change-Id: Ifca7325533e3f7d5ce5c59cc6b14d4232d4fc792 Reviewed-on: https://gerrit.libreoffice.org/29614 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-09loplugin:badstaticsStephan Bergmann
ScAddInListener has a member ScAddInDocs* pDocs; // documents where this is used where ScAddInDocs is set<ScDocument*>, and ScDocument has a memmber VclPtr<SfxPrinter> pPrinter; so that's only a chain of (apparently non-owning) pointers. Change-Id: I050218320eb2c588dcfaee80225f4e45a515ed32 Reviewed-on: https://gerrit.libreoffice.org/29613 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-10-07loplugin:staticmethods: Don't be fooled by decls starting with macrosStephan Bergmann
...like SAL_DLLPRIVATE coming from UNO include files. Change-Id: I9eb64c96b7e9e2a3742a166cedcf635d98fe65a0
2016-10-07loplugin:staticmethods: swStephan Bergmann
Change-Id: I2b06eb926ebc8ab04883da3272ea239a12e09436
2016-10-07loplugin:nullptr: remove duplicate warningsStephan Bergmann
Change-Id: I859d9ac8f7e4134bdac59b39e95eb563d1291e8b
2016-10-06loplugin:fpcomparison: also look into member functionsStephan Bergmann
By accident, the plugin had only looked into non-member functions until now. However, for the vast majority of newly found cases, it is unclear to me whether the relevant code needs fixing or not, so I put all those into a giant whitelist for now. Maybe the plugin's sginal/noise ration just isn't worth it, anyway. Change-Id: I7997a0ebdb4211af208285611656a40ead97d935
2016-10-05merge dbaccess::StorageInputStream with dbaccess::StorageXMLInputStreamNoel Grandin
Change-Id: I05b54b8a2fe4ff0c8b9f89e3d29e864e8665b7b8 Reviewed-on: https://gerrit.libreoffice.org/29519 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-04merge sd::FuOutline with sd::FuOutlineTextNoel Grandin
Change-Id: Ie8191ac91175ba51f89809aaa53bc1ffacf42df0 Reviewed-on: https://gerrit.libreoffice.org/29520 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-04loplugin:mergeclasses various fixesNoel Grandin
better tracking of templates, ignore more noise in the plugin so the python has less log to process Change-Id: I62874236d362529bd566140ac3fcc65e734fd62c
2016-10-03Fix typosAndrea Gelmini
Change-Id: Ie44267e7c9f92eb1920f05235826abff761251f1 Reviewed-on: https://gerrit.libreoffice.org/29430 Reviewed-by: jan iversen <jani@documentfoundation.org> Tested-by: jan iversen <jani@documentfoundation.org>
2016-10-01Fix typosAndrea Gelmini
Change-Id: I6aeda978911b25caa45d4e459e581fc743e93d2c Reviewed-on: https://gerrit.libreoffice.org/29442 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-01Fix typosAndrea Gelmini
Change-Id: I8374d6d08f4eb4ae2821e213371c615b92d7e9ab Reviewed-on: https://gerrit.libreoffice.org/29432 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-30unuseddefaultparams plugin has been supercededNoel Grandin
by the countusersofdefaultparams plugin Change-Id: I79cdc4cf884deea212ee76e1436f07696ff49f44
2016-09-30loplugin:constantparamNoel Grandin
Change-Id: Idbe8c8e6b3d44cacce296ec8c79b2b244281057c Reviewed-on: https://gerrit.libreoffice.org/29321 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-27clang plugins: do "dotdot" normalisationNoel Grandin
which fixes some false positives Change-Id: I555349180b5ca819f29695789f1545ba2177bd09 Reviewed-on: https://gerrit.libreoffice.org/29320 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22loplugin:unusedmethods in chart2..svxNoel Grandin
Change-Id: Ifb6045885049733415895f58cdd911256f48323c Reviewed-on: https://gerrit.libreoffice.org/29187 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22loplugin:unusedmethods in sc..vclNoel Grandin
Change-Id: I70fcf95dfd3db05b4fd6e5cee37866f673d3afa8 Reviewed-on: https://gerrit.libreoffice.org/29183 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22loplugin:unusedmethods unused returnsNoel Grandin
Change-Id: I4da3374e31d3c7407b401d66275da7f56ae83d30 Reviewed-on: https://gerrit.libreoffice.org/29178 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22loplugin:unnecessaryvirtualNoel Grandin
Change-Id: I7b1aa65a557f3855939ad8b183bba8ff656946f8 Reviewed-on: https://gerrit.libreoffice.org/29173 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-22Check harder whether file is really under WORKDIRStephan Bergmann
1977b57bc9aaea71252358fa502110c348153c70 "vcl: loplugin:override" had only hit in out-of-tree builds, where the #include in the generated workdir/CustomTarget/vcl/unx/kde4/tst_exclude_socket_notifiers.moc is an absolute path. For in-tree builds, the generated #include line is "../../../../../vcl/unx/kde4/tst_exclude_socket_notifiers.hxx", so the returned getFileName() is .../workdir/../../../../../vcl/..., so was erroneously considered to be under WORKDIR. Change-Id: I9abef04b90ecb4921087a53ff196b833940085e5
2016-09-20loplugin:unusedfieldsNoel Grandin
Change-Id: I852e98b16fdcb88b04e39d11e3101d502c918c24 Reviewed-on: https://gerrit.libreoffice.org/29078 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-20Adapt loplugin:dllprivate to DISABLE_DYNLOADINGStephan Bergmann
Change-Id: I721cfeaa144c773ead457e1c9138009d4071a06a
2016-09-19loplugin:unusedenumvaluesNoel Grandin
Change-Id: I9dcc9f73af6db5b4f7cc946bc28931e5c230b34c Reviewed-on: https://gerrit.libreoffice.org/29012 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-18loplugin:unusedenumvaluesNoel Grandin
Change-Id: Icf17f936ce6d07d0e152252833c8645cf9b1163b Reviewed-on: https://gerrit.libreoffice.org/28942 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-16loplugin:singlevalfields in basic..idlNoel Grandin
Also fix obvious bug in the initialisation of the connectivity::odbc::OConnection::m_bClosed field. Probably closes some kind of connection leak there. Change-Id: I04579cf91bcd6d6c51c697d83971da4142743a82 Reviewed-on: https://gerrit.libreoffice.org/28932 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-16loplogin:singlevalfields in include/Noel Grandin
Change-Id: I27842162fcf82120ecb811ee8e89e187430931fc Reviewed-on: https://gerrit.libreoffice.org/28931 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-09-15Some of our supported compilers don't do constexpr, which meansNoel Grandin
o3tl::typed_flags can't be 'static const' Change-Id: Ia2e40353f7a1b9e66617fa42f9eed6213f9e2d62
2016-09-15loplugin:singlevalfields in l10ntools..saxNoel Grandin
and ignore URE headers in the plugin Change-Id: I939df744c1173cf0f67d515f6c3fb4ac4cb25588
2016-09-15loplugin:singlevalfields in sc..vclNoel Grandin
Change-Id: I68752a3daf5ddd8581c07759b8be2c1dabbb9258