summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)AuthorFilesLines
2019-08-27loplugin:referencecasting find more redundant static_castNoel Grandin5-41/+125
Change-Id: I3a51812bbd3fcdc6b11e47cb12962f0d4fa7a2ae Reviewed-on: https://gerrit.libreoffice.org/78191 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-26loplugin:unusedmethodsNoel Grandin2-140/+256
Change-Id: I9d1abe62e7e0ae3434e0b2d440d6ccf0435e97cc Reviewed-on: https://gerrit.libreoffice.org/78131 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-26loplugin:unusedenumconstantsNoel Grandin3-2202/+2250
Change-Id: I4c75db3931e234d04a8d14f0a9dc9103132b0e72 Reviewed-on: https://gerrit.libreoffice.org/78137 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-26use shared-plugin infra for some recent pluginsNoel Grandin6-17/+136
Change-Id: Ia9cba59718de91fed2045ffd7e0ec06d28bf37dc Reviewed-on: https://gerrit.libreoffice.org/78118 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-26loplugin:returnconstval in variousNoel Grandin1-1/+1
Change-Id: Ib5d293417b1faeb7ef63a8df99fc1ba644989cdc Reviewed-on: https://gerrit.libreoffice.org/78079 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-23Improve loplugin:sequenceloop warningStephan Bergmann1-1/+1
...from > sfx2/source/appl/shutdowniconaqua.mm:416:13: error: use std::as_const, or make range var const, to avoid creating a copy of the Sequence [loplugin:sequenceloop] > for ( auto const & newMenuProp : aNewMenu ) > ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ to > sfx2/source/appl/shutdowniconaqua.mm:416:46: error: use std::as_const, or make range var const, to avoid creating a copy of the Sequence [loplugin:sequenceloop] > for ( auto const & newMenuProp : aNewMenu ) > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~ Change-Id: I1eabe80abeed1784a246a6e3c9b7036f664ee681 Reviewed-on: https://gerrit.libreoffice.org/77989 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-23new loplugin:returnconstvalNoel Grandin2-0/+97
look for code that thwarts copy-elision/move optimisations by returning const values. Change-Id: Iafa038d15051e06ee76d8a1c0ce8b7d234cd8488 Reviewed-on: https://gerrit.libreoffice.org/77964 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-21llvm::make_unique is gone from LLVM trunkStephan Bergmann1-0/+5
(but when targeting older versions of LLVM/Clang, COMPILER_PLUGINS_CXX can still specify -std=c++11) Change-Id: I1b91f2817516d015bc12b6a3faf1874ab938a3ae Reviewed-on: https://gerrit.libreoffice.org/77866 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-21loplugin:constvars, look for loop vars that can be constNoel Grandin2-13/+117
Change-Id: I67ee714739800f3718f9d3facf57474cd564d855 Reviewed-on: https://gerrit.libreoffice.org/77415 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-18Revert "loplugin:unusedmethods"Noel Grandin2-196/+122
This reverts commit 7990680e92e4fba376ef4f9346d1bc53661bde30. screenshot build is failing Change-Id: Idfe4cac73edaf9be1e704c0bd734e858643defda Reviewed-on: https://gerrit.libreoffice.org/77654 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-17loplugin:unusedmethodsNoel Grandin2-122/+196
Change-Id: I781a514787c83063dadd549ee043bbb264eee060 Reviewed-on: https://gerrit.libreoffice.org/77619 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-17loplugin:unnecessaryvirtualNoel Grandin2-47/+53
Change-Id: I9f2e524a4fb467ddc198fce1ff4740d3768ceeac Reviewed-on: https://gerrit.libreoffice.org/77618 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-16move WizardMachine to vclCaolán McNamara1-4/+4
Change-Id: I55cc4a6c1ad111a22a43fd66a3cd01b5b02fb7cb Reviewed-on: https://gerrit.libreoffice.org/76902 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-16Adapt loplugin:nullptr to RecursiveASTVisitior::TraverseInitListExpr changeStephan Bergmann2-0/+31
...<https://github.com/llvm/llvm-project/commit/ 0a42fe70a566f22599e04a6f1344ca2dc5565e17> "[AST] Treat semantic form of InitListExpr as implicit code in traversals" Change-Id: Ifd17009fcc6933abf0e9178dbe47fb9c14b274b7 Reviewed-on: https://gerrit.libreoffice.org/77595 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-16new loplugin:sequenceloopNoel Grandin2-0/+111
look for places we should be using std::as_const on for-range loops over uno::Sequence, to avoid triggering a copy Change-Id: I7efb641bf09d37c87946f03428ee4eec90298c8a Reviewed-on: https://gerrit.libreoffice.org/77441 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-15LLVM trunk requires C++14 nowStephan Bergmann2-1/+3
...which caused failures like > [GEN] compilerplugins/clang/sharedvisitor/sharedvisitor.cxx > In file included from /data/sbergman/lo/core/compilerplugins/clang/badstatics.cxx:14: > In file included from /data/sbergman/lo/core/compilerplugins/clang/check.hxx:15: > In file included from /data/sbergman/llvm/inst/include/clang/AST/DeclBase.h:18: > In file included from /data/sbergman/llvm/inst/include/clang/AST/DeclarationName.h:16: > In file included from /data/sbergman/llvm/inst/include/clang/AST/Type.h:48: > /data/sbergman/llvm/inst/include/llvm/Support/TrailingObjects.h:252:24: error: no member named 'is_final' in namespace 'std' > static_assert(std::is_final<BaseTy>(), "BaseTy must be final."); > ~~~~~^ [...] However, unconditionally using -std=c++14 in generator.cxx would cause failures for builds against older Clang (and with COMPILER_PLUGINS_CXX specifying -std=c++11) on machines that have an old C++11-only system libstdc++. Those machines typically use --gcc-toolchain to use a newer non-system libstdc++ (cf. e.g. setting CC and CXX in lode's bin/linux_clang_dbgutil_64.env), so one solution could be to propagate such an option from CXX through to generator.cxx. But the easier fix appears to be to instead propagate the -std option. Change-Id: Ib081754ce8ad567305d1520e3a1ff6700fb22755 Reviewed-on: https://gerrit.libreoffice.org/77502 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-01drop newly unused EnableImageDisplay + EnableTextDisplayCaolán McNamara1-8/+0
Change-Id: I534c5fcfe2e8b55d0f01075b62e7168a10e805a9 Reviewed-on: https://gerrit.libreoffice.org/76819 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-08-01skip some indirectionNoel Grandin1-1/+1
these don't need to use std::unique_ptr Change-Id: I03140c7957fd59443db932c37890a6742c6d3bec Reviewed-on: https://gerrit.libreoffice.org/76800 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-01missing includeStephan Bergmann1-0/+1
Change-Id: I9c3d551d2053b53bde3b032036bc531a02217300 Reviewed-on: https://gerrit.libreoffice.org/76782 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-01new loplugin:mapindexNoel Grandin2-0/+147
Change-Id: I6b5f73b2187009e95d4d666e03e5803f522cee06 Reviewed-on: https://gerrit.libreoffice.org/76584 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-31Improved loplugin:stringconstant (now that GCC 7 supports it)Stephan Bergmann3-0/+152
Change-Id: I8f83c1941b8f39b261005939f4dcf3577ae9fc6f Reviewed-on: https://gerrit.libreoffice.org/76702 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-30remove newly unused SvxCheckListBoxCaolán McNamara2-12/+0
Change-Id: I6a5f4dfea9fbb34f02c1752140e04d1d0a8a67a7 Reviewed-on: https://gerrit.libreoffice.org/76617 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-07-30tdf#62699 Drop (now) pass-through header include/vcl/salbtype.hxxGabor Kelemen1-1/+0
Change-Id: I2e2093ac3c8c6833b70d4932bc12a82a4483bde5 Reviewed-on: https://gerrit.libreoffice.org/76499 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-24loplugin:unusedfieldsNoel Grandin4-57/+63
Change-Id: I80ed513cf690f94bf4320b040b36d7f904c63482 Reviewed-on: https://gerrit.libreoffice.org/76233 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-24loplugin:unusedenumconstantsNoel Grandin3-3648/+3594
Change-Id: I484b39d1060e6a563dabdde03867989b8ba067f9 Reviewed-on: https://gerrit.libreoffice.org/76237 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-23Fix typosAndrea Gelmini1-1/+1
It passed "make check" Change-Id: I055017a7616ed4d9725c66a387c040b55e22751f Reviewed-on: https://gerrit.libreoffice.org/76202 Tested-by: Jenkins Reviewed-by: Andrea Gelmini <andrea.gelmini@gelma.net>
2019-07-23resurrect and improve loplugin:referencecastingNoel Grandin4-228/+535
Improve the plugin to avoid generating false+ with the special case of querying XInterface (what the code calls normalisation). Also ignore places where the querying is dealing with ambiguous base classes. Change-Id: I23b2b2fa6618328fafc4707b94c26582a462ea87 Reviewed-on: https://gerrit.libreoffice.org/74993 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-23loplugin:unusedfieldsNoel Grandin4-187/+269
Change-Id: If1e0b32f2cce7678f454009c0180d7612b4fb7c6 Reviewed-on: https://gerrit.libreoffice.org/76119 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-23close some more holes in structuresNoel Grandin1-75/+81
and improve the pahole script so I can just run it once over the whole codebase Change-Id: I7e1775974a3a61f8c0e40646158f01163ace60cc Reviewed-on: https://gerrit.libreoffice.org/76122 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-23loplugin:unusedmethodsNoel Grandin2-60/+24
Change-Id: I3bde62d674f5beaa6d19dcd22e6be15dfefe4205 Reviewed-on: https://gerrit.libreoffice.org/76118 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-22avmedia: Drop 'wrap_*' functionsMichael Weghorn1-8/+0
Just call the corresponding GStreamer functions directly. The wrapper functions are pointless since commit 6b911ae9eb9484bebbdc1323210020486f5ef33f ("Drop support for gstreamer-0.10"). Change-Id: I2963bd25a83632f4e693a1691180790452edffda Reviewed-on: https://gerrit.libreoffice.org/76116 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-07-22kf5/gtk3_kde5 fpickers: Drop unused 'allowRemoteUrls'Michael Weghorn2-4/+0
Change-Id: I591bf9fbe6e22bedda5a94334130a4f674cd66e6 Reviewed-on: https://gerrit.libreoffice.org/76110 Tested-by: Jenkins Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-07-21tdf#125922 rename kde5 to kf5 + plasma5Jan-Marek Glogowski2-6/+6
Just as the gtk3 plugin isn't named GNOME, rename kde5 to kf5, as it is based on the KDE frameworks 5 libraries. This also includes: * a convenience alias to load the kf5 VCL plugin in case someone requests the kde5 plugin. * keep convenience kde5 configure switch, but warn about it * rename detected desktop from kde5 to plasma5 Change-Id: I6764a05b81a5edbf284484c234fee2649aacf735 Reviewed-on: https://gerrit.libreoffice.org/75313 Tested-by: Jenkins Reviewed-by: Jan-Marek Glogowski <glogow@fbihome.de>
2019-07-19make cppunitassertequals a shared pluginNoel Grandin2-5/+28
Change-Id: Ied9c26248cb72f2146fbe1a985f825f7525fa17c Reviewed-on: https://gerrit.libreoffice.org/75836 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-19loplugin:constantparamNoel Grandin5-1629/+1486
and tweak the plugin to handle a crash seen with clang-9 Change-Id: Ie1ccf80c16a20dbca58e5bd081af13f75cf5ac8f Reviewed-on: https://gerrit.libreoffice.org/75850 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-17Revert "simplify sharedplugin PostTraverse calls"Noel Grandin8-31/+53
This reverts commit ff55ad1aceb10b900254c8ad3629775b7789d60a, Lubos prefers it the way it was. Change-Id: I68edc21c438b6aa2fc819245dd9a3d590af3a278 Reviewed-on: https://gerrit.libreoffice.org/75790 Reviewed-by: Luboš Luňák <l.lunak@collabora.com> Tested-by: Jenkins
2019-07-17make some plugins used the shared frameworkNoel Grandin16-101/+428
Change-Id: Ie283a4774564f25e0fde8ca35212f92be786d671 Reviewed-on: https://gerrit.libreoffice.org/75785 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-17make passparamsbyref a shared pluginNoel Grandin2-15/+99
Change-Id: I4119122f1bca77ee1424abdd90b0a0956b991704 Reviewed-on: https://gerrit.libreoffice.org/75743 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-17make overrridevirtual a shared pluginNoel Grandin2-7/+28
Change-Id: Ied3b772bdd54cb0e8d6214e7a51866364523b83b Reviewed-on: https://gerrit.libreoffice.org/75742 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-17rename override pluginNoel Grandin1-6/+6
in preparation for using it in the shared plugin infrastructure, which needs the name of the Registration variable to match the name of the plugin, which doesn't work when the plugin is named the same as a keyword Change-Id: I40a3dc1902f2fa1efe76b5e472cd03f4b480ff34 Reviewed-on: https://gerrit.libreoffice.org/75741 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-17loplugin:unusedmethodsNoel Grandin2-130/+192
Change-Id: Ie2285f64919d1c83b0a8df4ceb827f731e5cd609 Reviewed-on: https://gerrit.libreoffice.org/75739 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-17simplify sharedplugin PostTraverse callsNoel Grandin5-30/+17
(*) nobody is using the bool parameter, so drop it (*) nobody is using the "return false to permanently disable the plugin", and that is a dangerous footgun, so drop it Change-Id: I75c1fbd022ffb8aba7237568ce048031bbc31a5d Reviewed-on: https://gerrit.libreoffice.org/75726 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-16convert some plugins to LO_CLANG_SHARED_PLUGINSNoel Grandin5-17/+104
Change-Id: I63c9e010d83c24e18a36164ceb0441e48b757142 Reviewed-on: https://gerrit.libreoffice.org/75725 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-16convert redundantfcast to LO_CLANG_SHARED_PLUGINSNoel Grandin2-18/+47
Change-Id: I8c1c990d91676b33f2fd508025acfa93a66f4950 Reviewed-on: https://gerrit.libreoffice.org/75724 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-16convert some plugins to LO_CLANG_SHARED_PLUGINSNoel Grandin4-14/+99
Change-Id: I06ccd31248f9671fc96dc3d0e7f3cf696ec07f28 Reviewed-on: https://gerrit.libreoffice.org/75686 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-16macOS ld doesn't know --rpathStephan Bergmann1-1/+1
Change-Id: I4ebef2f15c409805adcd16916a9137b94e4ee535 Reviewed-on: https://gerrit.libreoffice.org/75677 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-16remove sallogareas header fileNoel Grandin2-56/+26
in preparation for using LO_CLANG_SHARED_PLUGINS Change-Id: I91cf186188bf0f15fc4e5adc095d404d89d0b025 Reviewed-on: https://gerrit.libreoffice.org/75681 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-16convert some plugins to LO_CLANG_SHARED_PLUGINSNoel Grandin12-41/+408
Change-Id: I7451a95377101004c7c53c918f3234415e06f555 Reviewed-on: https://gerrit.libreoffice.org/75670 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-15Revert "convert some plugins to use the sharedplugin infrastructure"Noel Grandin16-538/+51
This reverts commit fc1b213d157afa57704cec5a0fb65ae8c11d7822. I didn't convert these correctly, the Traverse calls need adjusting.
2019-07-15convert some plugins to use the sharedplugin infrastructureNoel Grandin16-51/+538
Change-Id: I690d9df436abdadc51a6d3f7df686a2e37f79f73 Reviewed-on: https://gerrit.libreoffice.org/75624 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>