2343 Commits

Author SHA1 Message Date
Noel Grandin
10280dabe2 loplugin:constvars, look for loop vars that can be const
Change-Id: I67ee714739800f3718f9d3facf57474cd564d855
Reviewed-on: https://gerrit.libreoffice.org/77415
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-21 11:16:15 +02:00
Noel Grandin
25cce7cd24 Revert "loplugin:unusedmethods"
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-18 12:35:08 +02:00
Noel Grandin
7990680e92 loplugin:unusedmethods
Change-Id: I781a514787c83063dadd549ee043bbb264eee060
Reviewed-on: https://gerrit.libreoffice.org/77619
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-17 20:42:31 +02:00
Noel Grandin
0e0fb5eaae loplugin:unnecessaryvirtual
Change-Id: I9f2e524a4fb467ddc198fce1ff4740d3768ceeac
Reviewed-on: https://gerrit.libreoffice.org/77618
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-17 14:18:13 +02:00
Caolán McNamara
4d450704d6 move WizardMachine to vcl
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-16 22:32:42 +02:00
Stephan Bergmann
e380e35348 Adapt loplugin:nullptr to RecursiveASTVisitior::TraverseInitListExpr change
...<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-16 19:54:25 +02:00
Noel Grandin
7d7a7862a7 new loplugin:sequenceloop
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-16 09:04:51 +02:00
Stephan Bergmann
cd6698ca91 LLVM trunk requires C++14 now
...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-15 15:51:16 +02:00
Caolán McNamara
3c498ff3de drop newly unused EnableImageDisplay + EnableTextDisplay
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-01 22:19:41 +02:00
Noel Grandin
9496e3d2ac skip some indirection
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-01 20:07:55 +02:00
Stephan Bergmann
ed115c1bb7 missing include
Change-Id: I9c3d551d2053b53bde3b032036bc531a02217300
Reviewed-on: https://gerrit.libreoffice.org/76782
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-08-01 14:40:46 +02:00
Noel Grandin
12062cb281 new loplugin:mapindex
Change-Id: I6b5f73b2187009e95d4d666e03e5803f522cee06
Reviewed-on: https://gerrit.libreoffice.org/76584
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-08-01 09:09:34 +02:00
Stephan Bergmann
6b962889b2 Improved loplugin:stringconstant (now that GCC 7 supports it)
Change-Id: I8f83c1941b8f39b261005939f4dcf3577ae9fc6f
Reviewed-on: https://gerrit.libreoffice.org/76702
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-31 16:29:45 +02:00
Caolán McNamara
588f50ac41 remove newly unused SvxCheckListBox
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-30 21:14:11 +02:00
Gabor Kelemen
b368329430 tdf#62699 Drop (now) pass-through header include/vcl/salbtype.hxx
Change-Id: I2e2093ac3c8c6833b70d4932bc12a82a4483bde5
Reviewed-on: https://gerrit.libreoffice.org/76499
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2019-07-30 09:51:39 +02:00
Noel Grandin
5ae7908ece loplugin:unusedfields
Change-Id: I80ed513cf690f94bf4320b040b36d7f904c63482
Reviewed-on: https://gerrit.libreoffice.org/76233
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-24 15:36:24 +02:00
Noel Grandin
8d73da6696 loplugin:unusedenumconstants
Change-Id: I484b39d1060e6a563dabdde03867989b8ba067f9
Reviewed-on: https://gerrit.libreoffice.org/76237
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-24 15:10:17 +02:00
Andrea Gelmini
d29bd2ac60 Fix typos
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-23 22:20:26 +02:00
Noel Grandin
c4bce5dafd resurrect and improve loplugin:referencecasting
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-23 13:51:18 +02:00
Noel Grandin
ac933bb93a loplugin:unusedfields
Change-Id: If1e0b32f2cce7678f454009c0180d7612b4fb7c6
Reviewed-on: https://gerrit.libreoffice.org/76119
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-23 07:49:07 +02:00
Noel Grandin
ea20fcce1d close some more holes in structures
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-23 06:46:41 +02:00
Noel Grandin
a17b19726d loplugin:unusedmethods
Change-Id: I3bde62d674f5beaa6d19dcd22e6be15dfefe4205
Reviewed-on: https://gerrit.libreoffice.org/76118
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-23 06:46:22 +02:00
Michael Weghorn
f6d3e145d7 avmedia: Drop 'wrap_*' functions
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-22 17:40:50 +02:00
Michael Weghorn
adb3e60d3f kf5/gtk3_kde5 fpickers: Drop unused 'allowRemoteUrls'
Change-Id: I591bf9fbe6e22bedda5a94334130a4f674cd66e6
Reviewed-on: https://gerrit.libreoffice.org/76110
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
2019-07-22 16:16:30 +02:00
Jan-Marek Glogowski
d3c6ac6d0f tdf#125922 rename kde5 to kf5 + plasma5
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-21 23:22:46 +02:00
Noel Grandin
cc3d75e14c make cppunitassertequals a shared plugin
Change-Id: Ied9c26248cb72f2146fbe1a985f825f7525fa17c
Reviewed-on: https://gerrit.libreoffice.org/75836
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-19 09:06:25 +02:00
Noel Grandin
cdbe8a8700 loplugin:constantparam
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-19 09:05:58 +02:00
Noel Grandin
476fb5d26e Revert "simplify sharedplugin PostTraverse calls"
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-17 20:40:01 +02:00
Noel Grandin
dd969ad6e0 make some plugins used the shared framework
Change-Id: Ie283a4774564f25e0fde8ca35212f92be786d671
Reviewed-on: https://gerrit.libreoffice.org/75785
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-17 19:32:43 +02:00
Noel Grandin
5f4ae86cfe make passparamsbyref a shared plugin
Change-Id: I4119122f1bca77ee1424abdd90b0a0956b991704
Reviewed-on: https://gerrit.libreoffice.org/75743
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-17 10:42:48 +02:00
Noel Grandin
8e3f431782 make overrridevirtual a shared plugin
Change-Id: Ied3b772bdd54cb0e8d6214e7a51866364523b83b
Reviewed-on: https://gerrit.libreoffice.org/75742
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-17 09:56:25 +02:00
Noel Grandin
e557bd4eb7 rename override plugin
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-17 09:56:16 +02:00
Noel Grandin
7bad1516c5 loplugin:unusedmethods
Change-Id: Ie2285f64919d1c83b0a8df4ceb827f731e5cd609
Reviewed-on: https://gerrit.libreoffice.org/75739
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-17 08:18:11 +02:00
Noel Grandin
ff55ad1ace simplify sharedplugin PostTraverse calls
(*) 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-17 08:18:00 +02:00
Noel Grandin
40fc30d05d convert some plugins to LO_CLANG_SHARED_PLUGINS
Change-Id: I63c9e010d83c24e18a36164ceb0441e48b757142
Reviewed-on: https://gerrit.libreoffice.org/75725
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-16 21:31:22 +02:00
Noel Grandin
70c6651e02 convert redundantfcast to LO_CLANG_SHARED_PLUGINS
Change-Id: I8c1c990d91676b33f2fd508025acfa93a66f4950
Reviewed-on: https://gerrit.libreoffice.org/75724
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-16 21:31:07 +02:00
Noel Grandin
b5b044505a convert some plugins to LO_CLANG_SHARED_PLUGINS
Change-Id: I06ccd31248f9671fc96dc3d0e7f3cf696ec07f28
Reviewed-on: https://gerrit.libreoffice.org/75686
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-16 14:16:55 +02:00
Stephan Bergmann
c62360e4cb macOS ld doesn't know --rpath
Change-Id: I4ebef2f15c409805adcd16916a9137b94e4ee535
Reviewed-on: https://gerrit.libreoffice.org/75677
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-07-16 14:01:14 +02:00
Noel Grandin
d6a73b2ab7 remove sallogareas header file
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-16 11:57:39 +02:00
Noel Grandin
8d4fbc532e convert some plugins to LO_CLANG_SHARED_PLUGINS
Change-Id: I7451a95377101004c7c53c918f3234415e06f555
Reviewed-on: https://gerrit.libreoffice.org/75670
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-16 09:15:01 +02:00
Noel Grandin
574db10513 Revert "convert some plugins to use the sharedplugin infrastructure"
This reverts commit fc1b213d157afa57704cec5a0fb65ae8c11d7822.

I didn't convert these correctly, the Traverse calls need
adjusting.
2019-07-15 18:18:57 +02:00
Noel Grandin
fc1b213d15 convert some plugins to use the sharedplugin infrastructure
Change-Id: I690d9df436abdadc51a6d3f7df686a2e37f79f73
Reviewed-on: https://gerrit.libreoffice.org/75624
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-07-15 15:48:48 +02:00
Luboš Luňák
eb5283064e update clang sharedvisitor.cxx
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-02 09:52:30 +02:00
Noel Grandin
9fbedb7929 improve loplugin:blockblock
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-07-01 10:23:53 +02:00
Luboš Luňák
6583b2fb94 help compilerplugins generator find clang shared libs, if needed
Change-Id: I892aa42bc1e94823ab52cdfd6a855bf90106306d
Reviewed-on: https://gerrit.libreoffice.org/74681
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-06-25 19:47:42 +02:00
Luboš Luňák
4139e0edeb do not use -g unconditionally for building the clang plugin
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-25 19:46:58 +02:00
Noel Grandin
4583911575 improve loplugin:simplifyconstruct
Change-Id: If863d28c6db470faa0d22273020888d4219e069e
Reviewed-on: https://gerrit.libreoffice.org/74559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-25 13:53:21 +02:00
Noel Grandin
ef73fefd02 loplugin:logexceptionnicely in various
Change-Id: I207d21e674366046e2663ebaf7f5161cde2c5fab
Reviewed-on: https://gerrit.libreoffice.org/74336
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-20 10:38:48 +02:00
Noel Grandin
31f04378db loplugin:passstuffbyref
Change-Id: Icb7c22cf4ac95eab54d04e79312fb471ca27bceb
Reviewed-on: https://gerrit.libreoffice.org/74246
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-18 20:10:57 +02:00
Noel Grandin
ed617a7e6c loplugin:unusedmethods
Change-Id: I7787a8eedf500b0b16c04114935d3d3124d9ac3d
Reviewed-on: https://gerrit.libreoffice.org/74032
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-06-14 15:18:22 +02:00