Noel Grandin
05400958b0
disable constparams loplugin
...
increases compile time too much, I will run this by hand periodically
Change-Id: I118567ef294847ff609d4de771d998ce3b57161b
2017-10-06 12:52:05 +02:00
Stephan Bergmann
2e8a95d1f8
loplugin:constparams: Ignore functions whose address is taken
...
(unless as the callee of a function call). In response to
<https://gerrit.libreoffice.org/#/c/42912/ > "DO NOT MERGE - error in clang
static plugin". Many of the whitelisted functions can now be taken off the
list.
Change-Id: I04c2ee445e7973a288f42fd663d8b2d78cd3c5aa
Reviewed-on: https://gerrit.libreoffice.org/42958
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
Tested-by: Stephan Bergmann <sbergman@redhat.com >
2017-09-30 15:02:22 +02:00
Stephan Bergmann
0d43f5176d
Access to ProcessEventsToSignal's bSignal is racy
...
...so spell out its single use, locking the appropriate mutex around the access
Change-Id: I8e8f47de1979f5a80cf1ad65e5ec24d25145c463
Reviewed-on: https://gerrit.libreoffice.org/42908
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2017-09-30 09:30:03 +02:00
Stephan Bergmann
36910b444c
Revert loplugin:constparam behavior when param is subject of cast
...
...cf. 72cfd4d024
"loplugin:constparams: Also
handle ObjCObjectPointerType"
Change-Id: Ieec294d721002cac0c37bf2590a9ce20b3e123e3
2017-08-31 17:55:52 +02:00
Stephan Bergmann
6d57d6c40f
Adapt lopluign:constparams to variadic CXXOperatorCallExpr
...
Change-Id: I21c7a0fb447b5ba0a7aa0ddc690b969b156a91f3
2017-08-31 12:14:41 +02:00
Stephan Bergmann
4082b5874a
Restrict loplugin:constparams cast-to-void check
...
Change-Id: I3c4d4f99b423f46136a79f3b06c5f0e1492872f1
2017-08-31 11:23:26 +02:00
Stephan Bergmann
72cfd4d024
loplugin:constparams: Also handle ObjCObjectPointerType
...
...in 0660a30d54
"Avoid loplugin:constparam when
param is subject of cast to non-const pointer"
But turns out this whole avoidance is ill-advised and should eventually be
reverted:
Aug 31 09:09:26 <sberg> noelgrandin, the way you originally handled CastExpr in
constparam's checkIfCanBeConst, your intent was if there's code like
static_cast<T*>(p) and param p is found it can be made const, one would also
need to change that cast to static_cast<T const *>(p) when fixing the loplugin
warning, right?
Aug 31 09:09:43 <noelgrandin> sberg, correct
Aug 31 09:10:10 <sberg> noelgrandin, I messed the up with
0660a30d54
Aug 31 09:10:12 <IZBot> core - Avoid loplugin:constparam when param is subject
of cast to non-const pointer -
http://cgit.freedesktop.org/libreoffice/core/commit/?id=0660a30d54eb6762302cf1afd43de01e137f6393
Aug 31 09:10:24 <noelgrandin> sberg, I probably should have had a test for that
Aug 31 09:10:41 <noelgrandin> tests are better at expressing intent
Aug 31 09:10:56 <sberg> I ran across it in a function that needed to have the
param non-const for API reasons (callback fn), and it looked like the "obvious"
fix there, not needing to add the fn to the blacklist
Aug 31 09:11:26 <sberg> I'll eventually get that fixed again (but want to first
get the Mac and Windows builds to succeed)
Aug 31 09:11:44 <noelgrandin> fair enough
Change-Id: Idef0cfc417ec0597a26a29c8720e3e4051a68e00
2017-08-31 11:13:38 +02:00
Stephan Bergmann
20b11e8dc4
...in which Johnny returns from the fair for real
...
and finds loplugin:constparams adapted to ObjCIvarRefExpr also
Change-Id: Ib803cd80b01ad7a0fa07bddb77a873bb323a50c0
2017-08-31 11:02:38 +02:00
Stephan Bergmann
64a4ad3a67
Avoid loplugin:constparam when param is marked as unused
...
...as in entry_group_callback
(sd/source/ui/remotecontrol/AvahiNetworkService.cxx),
AVAHI_GCC_UNUSED void *userdata
Change-Id: I494067878181c51b77d581a21ab1c9ef81e482e5
2017-08-30 16:34:46 +02:00
Stephan Bergmann
5d2e830a30
Avoid loplugin:constparam when param is cast to void
...
...which typically indicates that the param just has to be of the given type for
some reason
Change-Id: Ide30f514c5a849ae897c31c1744ece9df712a9fc
2017-08-30 15:14:19 +02:00
Stephan Bergmann
0660a30d54
Avoid loplugin:constparam when param is subject of cast to non-const pointer
...
...as in WriteCallback (desktop/source/minidump/minidump.cxx), where
void *ptr
is use in
static_cast<char *>(ptr)
Change-Id: I0bd44329029cd793390d0744de3c839612e0b494
2017-08-30 14:57:46 +02:00
Stephan Bergmann
67bff64e10
Adapt loplugin:constparam to jurt/source/pipe/staticsalhack.cxx
...
Change-Id: I0193ce3be582cb0a06cca17257b1e6587c5b3752
2017-08-30 14:57:10 +02:00
Stephan Bergmann
99fb14ef72
...in which Johnny returns from the fair
...
and finds loplugin:constparams adapted to ObjCMessageExpr
Change-Id: I6e1ddd0fb1a8a61d5a78c156bccfc29f7233909e
2017-08-30 12:22:19 +02:00
Noel Grandin
008199ee75
loplugin:constparam in various
...
Change-Id: I6821a3946f2e8fabf26558a84370c16ac8827fed
Reviewed-on: https://gerrit.libreoffice.org/41721
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-08-30 10:58:56 +02:00
Noel Grandin
bcc372d15e
loplugin:constparam in sc part8
...
Change-Id: I6cf9c5e662b20de9c9698a8c1fab56a09950c522
Reviewed-on: https://gerrit.libreoffice.org/41683
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-08-29 14:15:16 +02:00
Noel Grandin
959ace5861
loplugin:constparams in sw part10
...
Change-Id: I7d708c3e6157d0b8690b433d3363d2c0745b2410
Reviewed-on: https://gerrit.libreoffice.org/40832
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-08-07 15:27:38 +02:00
Stephan Bergmann
1ac8d90d84
-Werror=unused-function
...
Change-Id: Ia98b64a5500b99c5a6f20c723d96d9c4686f3271
2017-08-07 13:12:59 +02:00
Noel Grandin
06e2246f16
loplugin:constparams in sw part9
...
Change-Id: I2edba9cde5a5efd06815a55632703b706ca523c7
Reviewed-on: https://gerrit.libreoffice.org/40830
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-08-07 13:09:50 +02:00
Noel Grandin
902d87147d
loplugin:constparams in sw part3
...
Change-Id: I05ad3204af4e6ec3c832b185a1b35fdb75a229b2
Reviewed-on: https://gerrit.libreoffice.org/40760
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-08-04 11:55:27 +02:00
Noel Grandin
98d7b40986
loplugin:constparams in sw part2
...
Change-Id: I51ae0e8caaf46f141d3d15ace47612df1e476de7
Reviewed-on: https://gerrit.libreoffice.org/40735
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-08-03 21:32:05 +02:00
Noel Grandin
5176c1dd60
loplugin:constparams in sw part1
...
Change-Id: Id8d8afe268a82585ec2d3699411073dfb905d6ba
Reviewed-on: https://gerrit.libreoffice.org/40734
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-08-03 20:49:15 +02:00
Noel Grandin
dafae0fe31
loplugin:constparams in sd
...
Change-Id: I833c6da99d5ccb8f6a8b5c905bee73b75fde0a89
Reviewed-on: https://gerrit.libreoffice.org/40700
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-08-03 11:06:54 +02:00
Noel Grandin
c394363c84
loplugin:constparams in basctl
...
Change-Id: If6c2b980a2916c4ee8ac108fbb84b006a35f49c5
Reviewed-on: https://gerrit.libreoffice.org/40570
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-31 08:25:37 +02:00
Noel Grandin
b09deb0753
loplugin:constparams handle constructors
...
had to change the structure of the plugin considerably, was too messy to
structure it to do the calculations on a per-function basis
Change-Id: I4edee7735f726101105c607368124a08dba21086
Reviewed-on: https://gerrit.libreoffice.org/40516
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-28 14:51:56 +02:00
Noel Grandin
620d032b18
loplugin:constparams in chart2
...
Change-Id: Ic325b79f04e04aa19e08a60db30b982d90f04c80
Reviewed-on: https://gerrit.libreoffice.org/40480
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-27 13:23:25 +02:00
Noel Grandin
8ce64dbb3d
loplugin:constparams in svx
...
and fix a bug in the plugin itself when calling operator's like the one
on std::function<>
Change-Id: I1617607107eeff06785c1841f69e13ad2926218e
Reviewed-on: https://gerrit.libreoffice.org/40446
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-27 08:03:26 +02:00
Noel Grandin
ec340697d6
loplugin:constparams in soltools and various
...
Change-Id: I5e8e4a9a31aa7c3ff54cc7ce137d08770ea297e1
Reviewed-on: https://gerrit.libreoffice.org/40279
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-21 17:11:15 +02:00
Noel Grandin
6d829ae4f2
loplugin:constparams in basic
...
Change-Id: Idf55f63f2d56be4997a8cdc6afc5690eacac9a60
Reviewed-on: https://gerrit.libreoffice.org/40214
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-20 12:01:08 +02:00
Noel Grandin
30f7ce30c9
loplugin:constparams in connectivity
...
Change-Id: I9b81c6227fb3c89a832640058a11444f72019694
Reviewed-on: https://gerrit.libreoffice.org/40155
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-19 09:35:59 +02:00
Noel Grandin
0f7e64f3ed
loplugin:constparams in desktop
...
Change-Id: Idba3acbd1e6ad5e1ce1cae9f80f764906ab8b143
Reviewed-on: https://gerrit.libreoffice.org/40157
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-19 09:28:00 +02:00
Noel Grandin
3964408f7f
loplugin:constparams in sdext
...
Change-Id: Ia5d2c00b02bf1758f7502065dd109f0f54fda2d3
Reviewed-on: https://gerrit.libreoffice.org/40124
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-18 14:59:47 +02:00
Noel Grandin
c932e26138
loplugin:constparams in toolkit,ucb,xmlhelp
...
Change-Id: I2287bf468aae5008e25aa8b1bc0b63cff7bb1bf1
Reviewed-on: https://gerrit.libreoffice.org/40117
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-18 11:13:05 +02:00
Noel Grandin
72f36adb93
loplugin:constparams in vcl
...
Change-Id: I36afe2107e07ffb9b73c0b76be600e3e999a0fd4
Reviewed-on: https://gerrit.libreoffice.org/40116
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-07-18 09:57:26 +02:00
Noel Grandin
2c83c40b43
improve unusedfields loplugin
...
to ignore assignments when doing writeonly analysis
Change-Id: I9eb6f2594003a610582dbc20acb7ccf14ef72c6c
2017-06-15 11:36:05 +02:00
Stephan Bergmann
df8d092c3a
Adapt pathname checks to mixed usage of \ and / on Windows
...
Change-Id: I91bc89a9076c6642e06b238f65f2d31a1d20c6b5
2017-05-18 09:56:01 +02:00
Noel Grandin
40fd53a238
loplugins: extract some common functionality
...
Change-Id: If470e1d9b481c9eda0829aa985152baf8fb46d7a
2016-10-18 08:51:07 +02:00
Noel Grandin
03fefeec99
new plugin constparams
...
very basic detection of pointer and reference params that can be const.
Off by default until the relevant changes have landed.
Change-Id: I88bba4e67307e3fb0e11dad252ec59c913828763
2016-07-12 10:54:43 +02:00