summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2019-08-17loplugin:unusedmethodsNoel Grandin
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 Grandin
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 McNamara
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 Bergmann
...<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 Grandin
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 Bergmann
...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 McNamara
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 Grandin
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 Bergmann
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 Grandin
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 Bergmann
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 McNamara
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 Kelemen
Change-Id: I2e2093ac3c8c6833b70d4932bc12a82a4483bde5 Reviewed-on: https://gerrit.libreoffice.org/76499 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-24loplugin:unusedfieldsNoel Grandin
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 Grandin
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 Gelmini
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 Grandin
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 Grandin
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 Grandin
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 Grandin
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 Weghorn
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 Weghorn
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 Glogowski
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 Grandin
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 Grandin
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 Grandin
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 Grandin
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 Grandin
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 Grandin
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 Grandin
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 Grandin
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 Grandin
(*) 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 Grandin
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 Grandin
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 Grandin
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 Bergmann
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 Grandin
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 Grandin
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 Grandin
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 Grandin
Change-Id: I690d9df436abdadc51a6d3f7df686a2e37f79f73 Reviewed-on: https://gerrit.libreoffice.org/75624 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-02update clang sharedvisitor.cxxLuboš Luňák
This should have been included in 9fbedb792993. Change-Id: I3b8b1a463c3f85d6cd4a4db14edcfedf01d7e5a9 Reviewed-on: https://gerrit.libreoffice.org/74956 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-07-01improve loplugin:blockblockNoel Grandin
look for nested blocks where the inner block also contains a break statement. Change-Id: I1e5b6ca4c42b995c9479a68b34a1e2f1eb015f57 Reviewed-on: https://gerrit.libreoffice.org/74946 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-25help compilerplugins generator find clang shared libs, if neededLuboš Luňák
Change-Id: I892aa42bc1e94823ab52cdfd6a855bf90106306d Reviewed-on: https://gerrit.libreoffice.org/74681 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-06-25do not use -g unconditionally for building the clang pluginLuboš Luňák
The generated files are ~700MiB here, compared to ~85MiB without. Change-Id: I76bafc59ff89fd7eb8ffbc4b9ad79bc63da8f064 Reviewed-on: https://gerrit.libreoffice.org/74678 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-06-25improve loplugin:simplifyconstructNoel Grandin
Change-Id: If863d28c6db470faa0d22273020888d4219e069e Reviewed-on: https://gerrit.libreoffice.org/74559 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-20loplugin:logexceptionnicely in variousNoel Grandin
Change-Id: I207d21e674366046e2663ebaf7f5161cde2c5fab Reviewed-on: https://gerrit.libreoffice.org/74336 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-18loplugin:passstuffbyrefNoel Grandin
Change-Id: Icb7c22cf4ac95eab54d04e79312fb471ca27bceb Reviewed-on: https://gerrit.libreoffice.org/74246 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-14loplugin:unusedmethodsNoel Grandin
Change-Id: I7787a8eedf500b0b16c04114935d3d3124d9ac3d Reviewed-on: https://gerrit.libreoffice.org/74032 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-14loplugin:unusedfields improvementsNoel Grandin
tighten up the only calling write-only methods part of the analysis Change-Id: I5bc6fdf0ce51940653317e8a48c5241705c90d4c Reviewed-on: https://gerrit.libreoffice.org/74022 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-13new loplugin logexceptionnicelyNoel Grandin
to be used to find places to use new TOOLS_WARN_EXCEPTION,etc macros Change-Id: I213ab47efa82075435bb800736ee0937aea0486c Reviewed-on: https://gerrit.libreoffice.org/73950 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>