Noel Grandin
dd6d7992d6
loplugin:constantparam
...
Change-Id: I67d74072c776c32a1f91df94c621efe180baf5dc
Reviewed-on: https://gerrit.libreoffice.org/37481
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-12 12:30:53 +02:00
Andrea Gelmini
28dfcd5da4
Fix typos
...
Change-Id: I204178ed4cf0fd3f43043cf1dfde85bb27002fee
Reviewed-on: https://gerrit.libreoffice.org/37498
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Michael Stahl <mstahl@redhat.com >
2017-05-11 16:19:58 +02:00
Noel Grandin
16e09c988e
new loplugin checkunusedparams
...
Change-Id: I8f6974e34e686fc97014de97f072b81aa73f969b
2017-05-10 14:17:43 +02:00
Noel Grandin
4c0fb07f34
add some some empty string names to constantparam loplugin
...
Change-Id: I8f67212271a798d544b7aad46f08890122cd5e18
2017-05-10 09:17:41 +02:00
Noel Grandin
12191a4f30
make loplugin constantparam smarter about string params
...
Change-Id: Id3df69b38fd35f46735246a6d307a89aa10d4294
Reviewed-on: https://gerrit.libreoffice.org/37426
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-09 13:52:30 +02:00
Noel Grandin
185ed3ddb8
teach loplugin:constantparam about simple constructor calls
...
Change-Id: I7d2a28ab5951fbdb5a427c84e9ac4c1e32ecf9f9
Reviewed-on: https://gerrit.libreoffice.org/37280
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-05-08 08:29:03 +02:00
Maxim Monastirsky
8ac571d470
sc: Remove some dead slots
...
Change-Id: I92cfd5043c084d64fdfba3a1df817ee035388797
2017-05-05 11:23:51 +03:00
Noel Grandin
f12096272e
spelling, implictly->implicitly
...
Change-Id: I2d733ed3ce9395d11700d739cbd6d123649b4013
2017-05-03 11:18:21 +02:00
Stephan Bergmann
4f6563b508
Adapt to Clang 5 change of PPCallbacks::MacroUndefined signature
...
...since <http://llvm.org/viewvc/llvm-project?view=revision&revision=301449 >
"PPCallbacks::MacroUndefined, change signature and add test."
Change-Id: I6a420dc4ca33607fef1356e8869cedee87192e93
2017-05-02 15:33:05 +02:00
Stephan Bergmann
5a4d03131f
loplugin:salunicodeliteral
...
For the c-char in the u'...' literal, the preceding commits consistently use:
* a simple-escape-sequence if the original code already used one
* \0 for U+0000
* the (\ escaped, for ' and \) source character matching U+0020..7E (even if it
is not a basic source character)
* a consistently four-digit hexadecimal-escape-sequence otherwise, \xNNNN
For non-surrogate code points, the last case could probably also use \uNNNN
universal-character-names. However, for one, it isn't quite clear to me whether
conversion of such to members of the execution chacacter set in character
literals (in translation phase 5) is implementation-specific. And for another,
the current C++ standard references the dated (no pun intended) ISO/IEC
10646-1:1993 specification, rather than the current ISO/IEC 10646:2014, and
requires that a universal-characrer-name designate a character with a specific
"character short name in ISO/IEC 10646", but I do not find a specification of a
"short name" in ISO/IEC 10646:2014 and don't have access to ISO/IEC
10646-1:1993, so am not sure whether that would e.g. cover noncharacters like
U+FFFF.
(The only exception is one occurrence of u'\x6C' in bestFitOpenSymbolToMSFont,
filter/source/msfilter/util.cxx, where it is clear from the context that the
value denotes neither a Unicode code point nor a UTF-16 code unit, but rather an
index into the Wingdings font glyph table.)
Change-Id: If36b94168428ba1e05977c370aceaa7e90131e90
2017-04-28 18:27:01 +02:00
Noel Grandin
fdc6f654ca
remove unnecessary machine-specific data out of loplugin output
...
Change-Id: Ib8ac5acacb1dab80943b1193201021f9890121c3
2017-04-28 14:50:13 +02:00
Stephan Bergmann
a528392e71
Fixed/improved loplugin:cppunitassertequals
...
* 994e38e336 "loplugin: use TypeCheck instead of
getQualifiedNameAsString" had effectively disabled this plugin (Asserter is a
struct, not a namespace). Fixed that.
* Also improved the checks, for one removing the---expensive---use of
Plugin::parentStmt, for another making the plugin look into (...), !..., and
...&&... expressions.
* However, as the plugin had effectively already been disabled (see above) when
it was switched on generally with 839e53b933
"compilerplugins: enable loplugin:cppunitassertequals by default", it now hit
way more places than I had initially anticipated. To keep the amount of work
manageable, midway-through I disabled looking into ...&&... expressions for
now. That will be enabled (and resulting warnings fixed) in follow-up
commits.
* Checks like
CPPUNIT_ASSERT(a == b)
that actually want to check a specific overloaded operator == implementation,
rather than using such an operator == to actually check that a and b are
equal, can be rewritten as
CPPUNIT_ASSERT(operator ==(a, b))
to avoid false warnings from this plugin.
Change-Id: If3501020e2d150ad0f2454a65a39081e31470c0f
2017-04-28 14:23:35 +02:00
Noel Grandin
6ac7dfdba4
loplugin:unusedfields
...
Change-Id: I67a0372d6982648717651f736c51e447d0b7d6a2
Reviewed-on: https://gerrit.libreoffice.org/37047
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-28 10:59:41 +02:00
Noel Grandin
5503b0b791
loplugin:unusedmethods
...
Change-Id: I8b618d791fd093ea069fdc26ed6c274e172222a4
Reviewed-on: https://gerrit.libreoffice.org/37048
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-28 09:48:31 +02:00
Caolán McNamara
a70dd5c57b
drop unused comphelper::EventLogger::logp
...
Change-Id: I833210f036356c09d6c2f9f72dde7012064b01ef
2017-04-27 16:26:39 +01:00
Stephan Bergmann
5a7123d686
Fix build after 7d71451e8e
...
"vcl: change pImpl class names to fit with existing convention"
Change-Id: Ic02ca5b71a96b852951ac1b14b966b1ba2f006e9
2017-04-27 10:03:03 +02:00
Noel Grandin
dbd20b5c79
loplugin:unusedmethods
...
Change-Id: If2e1241bbe8a3d17859e3ca076b0f55f25c48ea5
Reviewed-on: https://gerrit.libreoffice.org/36983
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-26 13:25:23 +02:00
Noel Grandin
494c710374
add various loplugin results files
...
so that instead of trying to maintain a list of false positives inside
the python processing code, I can just run the plugin, generate the
result, and then look at the git diff from last time.
Change-Id: Ic287f19e3b139705222a1f9541ad6471dfcb9c18
2017-04-25 12:44:02 +02:00
Chris Sherlock
da64d198ec
tools: svstream.hxx needs only errcode.hxx & not errinf.hxx
...
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca
Reviewed-on: https://gerrit.libreoffice.org/36896
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com >
2017-04-25 09:31:31 +02:00
Noel Grandin
93449eee17
merge comphelper::ChainablePropertySet with comphelper::ChainableHelperNoState
...
Change-Id: I8fb93665b2a2f46019306f473882a7f3d7aece87
Reviewed-on: https://gerrit.libreoffice.org/36787
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-23 13:48:37 +02:00
Noel Grandin
76a3df733e
loplugin:mergeclasses RscConst with RscEnum
...
Change-Id: I7bd35df0751c9ffce076848edd5373e00815dbc5
Reviewed-on: https://gerrit.libreoffice.org/36772
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-21 11:45:59 +02:00
Noel Grandin
8411f48bfb
loplugin:unusedfields
...
Change-Id: I0026e0a1890b984675e82ab7be5cdbc56e142a87
Reviewed-on: https://gerrit.libreoffice.org/36722
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-20 12:35:18 +02:00
Noel Grandin
1c5cae479b
loplugin:unusedmethods
...
Change-Id: Ib7a9b1b0802ca751da258065e89b412b090bb672
Reviewed-on: https://gerrit.libreoffice.org/36718
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-20 10:07:10 +02:00
Markus Mohrhard
b7b159d79c
remove the old collaboration feature based on telepathy
...
Change-Id: I1f08d6ef43b76e7bae41ac33bb954f506ae7c485
Reviewed-on: https://gerrit.libreoffice.org/36542
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com >
2017-04-14 03:32:37 +02:00
Stephan Bergmann
6925007c2a
Simplify jfw_findAllJREs
...
...dropping remaining uses of CJavaInfo
Change-Id: I76afd5af927233712181f58b14fe6f4c1a9c15c2
2017-04-13 17:32:43 +02:00
Stephan Bergmann
24ccdd63b7
loplugin:useuniquptr: Remove no longer needed blacklist entries
...
Change-Id: Ib372d93c5a6e7550ad0d3dc1017fe49d9059146c
2017-04-12 10:55:45 +02:00
Noel Grandin
f762a7772b
loplugin constantparam, ignore variadic methods
...
Change-Id: Ieabb020406d5a381dd9cbace3b1e4cc434857d54
2017-04-11 13:08:19 +02:00
Noel Grandin
bf6449230a
loplugin:mergeclasses merge SwAnnotationWin and SwSidebarWin
...
Change-Id: Idaf7d7e8e4da37e0ba423dca3e22dc6711ba806a
Reviewed-on: https://gerrit.libreoffice.org/36380
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-11 10:20:58 +02:00
Noel Grandin
9fa75f677a
loplugin:mergeclasses merge E3dScene with E3dPolyScene
...
Change-Id: I70f28fb4c87ad8c0e0ad46f4ce04914b6536d6b9
Reviewed-on: https://gerrit.libreoffice.org/36376
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-11 10:16:16 +02:00
Noel Grandin
67af00a76a
new loplugin:inlinefields
...
look for fields which can be declared inline in the parent class.
start with some likely candidates in svx
Change-Id: I56cdca273272b72bb728ed2e3f5e1e976f8c7c32
Reviewed-on: https://gerrit.libreoffice.org/36262
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-10 08:51:52 +02:00
Noel Grandin
be8b9b4d29
loplugin:redundantcast find cstyle arithmetic casts
...
Change-Id: If7c259f0d12a41182f476ddb558f7cb5f76f9577
Reviewed-on: https://gerrit.libreoffice.org/36253
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-07 12:16:13 +00:00
Andrea Gelmini
caf3889595
Fix typos
...
Change-Id: Ibad3f8e9f55af5e652b6be198bebace2b1bfb35b
Reviewed-on: https://gerrit.libreoffice.org/36235
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Eike Rathke <erack@redhat.com >
2017-04-07 10:15:51 +00:00
Noel Grandin
26e7c6d6ab
loplugin:redundantcast check for c-style char casts
...
Change-Id: Id6881262e370fd563ec29db95e4af5cfcb04ea34
Reviewed-on: https://gerrit.libreoffice.org/36247
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-07 07:07:40 +00:00
Stephan Bergmann
6b4a4bab6d
Improved loplugin:redundantcast, static_cast on arithmetic types
...
Change-Id: I6e1f76de4b1ebf76ad02e7d0cd1374b4def83932
2017-04-06 18:33:20 +02:00
Stephan Bergmann
fb2cd383f7
Look through ExprWithCleanups etc.
...
Change-Id: I5c8af20a71eca245c4b2a0061dc0612a4770c8ff
2017-04-06 15:20:15 +02:00
Noel Grandin
6768a9b602
loplugin:redundantcast check for c-style casts to void
...
Change-Id: Ic8b99f590436f94825e471bc61411c69fd768862
Reviewed-on: https://gerrit.libreoffice.org/36208
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-06 13:03:06 +00:00
Noel Grandin
f1945405b0
loplugin:redundantcast check for c-style float casts
...
Change-Id: I86b6f58887cb398a80698f8d8564b5bc3f55eabb
Reviewed-on: https://gerrit.libreoffice.org/36198
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-06 11:41:46 +00:00
Noel Grandin
aa09b0c27a
loplugin:useuniqueptr extend to catch more localvar cases
...
i.e. where the code looks like
{
foo * p = new foo;
...
delete p;
return ...;
}
Change-Id: Id5f2e55d0363fc62c72535a23faeaaf1f0ac6aee
Reviewed-on: https://gerrit.libreoffice.org/36190
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-06 09:22:46 +00:00
Noel Grandin
0c82dff153
loplugin:singlevalfields
...
Change-Id: Ia681765aa1da5c80a3dbe91b7376af841a9c9ec1
Reviewed-on: https://gerrit.libreoffice.org/36145
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-06 09:21:58 +00:00
Noel Grandin
7662e92c64
loplugin:redundantcast find cstyle double casts
...
Change-Id: I5507be190dac781e5cdb545a60acf3d50056c9f8
Reviewed-on: https://gerrit.libreoffice.org/36187
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-06 07:47:30 +00:00
Noel Grandin
572e9cde74
loplugin:redundantcast find c-style bool casts
...
Change-Id: I3237b93babc67de12c3771aa84766c2141ca93b2
Reviewed-on: https://gerrit.libreoffice.org/36137
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-05 12:21:19 +00:00
Noel Grandin
e3eadc96cc
teach constantparam plugin to find always on and always off bitmask values
...
Change-Id: If56a483494bd3d7feb3fa67c01000dddd0d34421
Reviewed-on: https://gerrit.libreoffice.org/36085
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-04-05 06:49:56 +00:00
Stephan Bergmann
9ac98e6e34
Finally switch MSVC to sal_Unicode = char16_t, too
...
There is lots of (Windows-only) code that relied on sal_Unicode being the same
as wchar_t, and the best change may be different in each case (and doing the
changes may be somewhat error prone). So for now add SAL_U/SAL_W scaffolding
functions to sal/types.h, remove their uses one by one again, and finally drop
those functions again.
Change-Id: I2cc791bd941d089901abb5f6fc2f05fbc49e65ea
Reviewed-on: https://gerrit.libreoffice.org/36077
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2017-04-04 16:12:11 +00:00
Noel Grandin
90305526ee
loplugin:unusedenumconstants
...
Change-Id: I628a0114e56ec25926bd08d159c61cfecb719a1c
Reviewed-on: https://gerrit.libreoffice.org/35854
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-03-30 06:26:26 +00:00
Noel Grandin
9bfd742d8c
loplugin:unusedmethods
...
Change-Id: Ib008613fb06c82791c63d5b074a3e2ff1c3607a0
Reviewed-on: https://gerrit.libreoffice.org/35834
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-03-29 11:43:40 +00:00
Noel Grandin
0cb5435dd3
update results of mergeclasses plugin
...
Change-Id: I97f67bb7f98d0cf0a835f55e12c24a30ffd4ed3d
2017-03-28 13:42:13 +02:00
Noel Grandin
0d199688fb
fixes for some loplugins
...
ran the ones in store/ just for fun, but didn't find anything useful
Change-Id: I2bb251e8d99b5d88e11b2ca74e99672d75f0a1fd
2017-03-28 13:40:25 +02:00
Stephan Bergmann
4e808469d5
Make loplugin:loopvartoosmall look past top-level ExprWithCleanups
...
Note the two "//TODO!" in the fix of the one newly found issue.
Change-Id: I181691da4b74cd55611452e002b37bd6798ff1e6
2017-03-27 15:50:48 +02:00
Noel Grandin
d615af618c
create SfxInterfaceId o3tl::strong_int
...
Change-Id: Ie52f63382a9fb36f9a472801be012b140bfb51f6
Reviewed-on: https://gerrit.libreoffice.org/35722
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk >
2017-03-27 09:43:58 +00:00
Stephan Bergmann
2258f33a5f
Make loplugin:loopvartoosmall find more suspicious cases
...
...where the "controlling expression" of any sort of loop contains a sub-
expression of the form
var < val
where the type of var is smaller than that of val. Theoretically, this could
turn up lots of false positives, but practically it didn't run into any. Most
findings have been cleaned up over the last weeks. There's just a handful
remaining places that are hard to clean up, so I flagged them here with
(deliberately awkward) sal::static_int_cast for later clean-up.
Change-Id: I0f735d46dda15b9b336150095df65cf247e9d6d3
Reviewed-on: https://gerrit.libreoffice.org/35682
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
Tested-by: Stephan Bergmann <sbergman@redhat.com >
2017-03-25 16:21:34 +00:00