1889 Commits

Author SHA1 Message Date
Luboš Luňák
051d0ccc16 make Makefile-clang.mk also use gb_Output_announce
So that the output is consistent, even though the actual build handling
is different.

Change-Id: I460dfe4c2ac74515cc1b598d47e119eb249b8277
Reviewed-on: https://gerrit.libreoffice.org/67972
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-02-18 17:10:42 +01:00
Luboš Luňák
af8deb6b21 make uninteresting code in clang's makefile to the uninteresting part
Change-Id: I235284c7198aa2a295b4d81ff2f8e9ca554a4174
Reviewed-on: https://gerrit.libreoffice.org/67971
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2019-02-18 17:10:17 +01:00
Stephan Bergmann
6ba818779d Make findOperator more precise wrt acceptable parameter types
Change-Id: I0a1ea253d999c9444344188d764134e83ae0c495
Reviewed-on: https://gerrit.libreoffice.org/67959
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-18 14:52:43 +01:00
Stephan Bergmann
893ee43180 Tell about presumed corresponding negated operator
Change-Id: Ic7ed64ecc4902853dc7431294484abb74e8da65b
Reviewed-on: https://gerrit.libreoffice.org/67953
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-18 10:22:48 +01:00
Noel Grandin
aa51774e6a loplugin:simplifybool, check for !(!a op !b)
Change-Id: Ic3ee9c05705817580633506498f848aac3ab7ba6
Reviewed-on: https://gerrit.libreoffice.org/67866
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-18 07:15:57 +01:00
Caolán McNamara
294be3035a drop newly unused code
drop now unused ListBoxWrapper

Change-Id: I19271de67269a9e23cf889a32910405cf3dc7a2a

drop unused SingleControlWrapper

Change-Id: I80bd639a9d64a1b35249c1c59c1c9d134ae6f1ca

drop unused PosValueMapper

Change-Id: I5e3d9ed48b5f544215ae82ba7899a62be4e59a25

drop unused ControlWrapperBase

Change-Id: I1890f492604ac848775e8d4b0070a3189a719a18

drop now empty itemconnect.cxx

Change-Id: I5374dbf91dbe715a563e7c694c9d96fb07d8f9c8

drop unnecessary controlwrapper.hxx

Change-Id: Ide633f64ca2851aee4f29a7f86e09cb78043d388
Reviewed-on: https://gerrit.libreoffice.org/67887
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2019-02-16 15:52:00 +01:00
Stephan Bergmann
177747c445 SourceManager::getExpansionRange already returns CharSourceRange since Clang 7
Change-Id: Ic7c6c648c71203116ca074bd7392a48ff850cd51
Reviewed-on: https://gerrit.libreoffice.org/67864
Reviewed-by: Tor Lillqvist <tml@collabora.com>
Tested-by: Tor Lillqvist <tml@collabora.com>
2019-02-15 12:19:34 +01:00
Noel Grandin
e132e781d8 loplugin:simplifybool extend to !(a == b) where comparison an overloaded op
Change-Id: I08fcbe2569c07f5f97269ad861fa6d38f23a7cc7
Reviewed-on: https://gerrit.libreoffice.org/67816
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-15 11:52:41 +01:00
Stephan Bergmann
bf1a511f9c Make loplugin:stringconcat more robust
Change-Id: Ib8adefd90141007c0422b4c15ba9c2cc5f707f3f
Reviewed-on: https://gerrit.libreoffice.org/67762
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-02-13 13:56:12 +01:00
Andrea Gelmini
6d52cd1c0b Fix typo
Change-Id: I036a41bd4d46973a8b6fb51a90c6506cf3f9b8f0
Reviewed-on: https://gerrit.libreoffice.org/67748
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
Tested-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2019-02-13 05:07:43 +01:00
Stephan Bergmann
a072b15e96 More loplugin:indentation Qt "emit" hackery
Change-Id: I6f71546a5f6ab07bb4df6fc89213962e74984c84
2019-02-12 08:54:19 +01:00
Noel Grandin
0d1253c232 new loplugin writeonlyvars
largely based on the relevant portion of the unusedfields loplugin, but
adapted for local vars

Change-Id: Ic522a941573940e8f75c88f90ba5f37508ca49b1
Reviewed-on: https://gerrit.libreoffice.org/66835
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11 13:25:31 +01:00
Noel Grandin
cc26cfd379 use more hasPathnamePrefix
Change-Id: I539e6aedad61d80b6ebe80104b77d720072395bd
2019-02-11 12:37:50 +02:00
Noel Grandin
c04eb27aff remove debugging code
Change-Id: Ibb6f3a1c711959cb4f32541dba96f005e51c9040
2019-02-11 11:37:07 +02:00
Noel Grandin
8c0bb7692a loplugin:indentation workaround qt macros
Change-Id: I17bb0b462bb4ce7e8128c9ad33491aa8b691e566
2019-02-11 10:59:35 +02:00
Noel Grandin
f76bf262a6 new loplugin indentation
look for mixed indentation in compound statements, which makes them hard
to read, and sometimes makes it look like a statement is associated with
a nearby if/for

Change-Id: Ic8429cee1f9a86d938097a4a8769a2bce97b3361
Reviewed-on: https://gerrit.libreoffice.org/63283
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-02-11 08:24:19 +01:00
Stephan Bergmann
4d3571a309 Fix compilerplugins/clang/test/useuniqueptr.cxx for clang-cl
...where it failed with

> error: 'error' diagnostics expected but not seen:
>   File C:/lo-clang/core/compilerplugins/clang/test/useuniqueptr.cxx Line 266: rather manage this var with std::some_container<std::unique_ptr<T>> [loplugin:useuniqueptr]
>   File C:/lo-clang/core/compilerplugins/clang/test/useuniqueptr.cxx Line 275: rather manage this member with std::some_container<std::unique_ptr<T>> [loplugin:useuniqueptr]

apparently due to differences in how some std types are implemented.

Change-Id: Ib81ed1a1da867359e7f22bb6fb6ceb3e610e2b41
Reviewed-on: https://gerrit.libreoffice.org/67226
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-31 20:23:39 +01:00
Stephan Bergmann
8949f98d16 loplugin:unusedfileds is no-op on Windows, so don't run its test there
But nevertheless, make sure that the variables m_bar9/10 used in combination
with css::uno::Any have UNO-compatible type.

Change-Id: I241d8b5d37de60b00b5bfdc69e642872b28e8ee2
Reviewed-on: https://gerrit.libreoffice.org/67201
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-31 14:13:22 +01:00
Noel Grandin
37f8ea642c loplugin:unusedmethods
Change-Id: Ifb0c479e9d1aed1cd90d78ed23902fc05db556d6
Reviewed-on: https://gerrit.libreoffice.org/66862
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-25 08:07:40 +01:00
Noel Grandin
a6358f1c1b improve loplugin constparams
Change-Id: Ic1833dbd030044011e7ee5f89dc35737e5469f05
Reviewed-on: https://gerrit.libreoffice.org/66586
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-25 07:58:04 +01:00
Noel Grandin
924da47e03 update useunique_ptr loplugin
with more exclusions

Change-Id: I95e7376ecf9c479d05b85c71f863d9ba40417538
Reviewed-on: https://gerrit.libreoffice.org/66552
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-18 07:51:04 +01:00
Stephan Bergmann
4828debf7b New loplugin:empty
Change-Id: I8729db064573ac21dfe6b203c5ae244d79ecc4fe
Reviewed-on: https://gerrit.libreoffice.org/66430
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-16 13:08:28 +01:00
Stephan Bergmann
dad7a53f11 Drop o3tl/string_view.hxx
...now that all of its uses have been replaced with C++17 <string_view>.

The LO-specific o3tl::basic_string_view ctors with OString and OUString params
have meanwhile been replaced with OString and OUString conversion functions (in
dac7be50cff94e0c34cdca5ac7e35c19685c40c1 "o3tl::string_view -> std::string_view
(in configmgr)"), the ctor with OUStringLiteral turned out to be no longer(?)
needed anyway, and the LO-specific o3tl::toOUString has meanwhile been replaced
with an OUString ctor with std::u16string_view param (in
6856da30665705be6380e84cf55de954c41f15d1 "o3tl::string_view -> std::string_view
(in embedserv)").

Change-Id: Ie5215b07e2387560fb7e94de8b5a963241539c64
Reviewed-on: https://gerrit.libreoffice.org/66144
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2019-01-11 10:52:54 +01:00
Noel Grandin
7a26512fdb loplugin:constantparam
Change-Id: Id5c7e66b8f8bc324f097dd739ce683d74fc6491b
Reviewed-on: https://gerrit.libreoffice.org/65953
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2019-01-08 10:05:45 +01:00
Adolfo Jayme Barrientos
588dc2808c Bump copyright year to 2019
Change-Id: I0d49ec7db57a0f7d18489dad61e86cbfdf4418cd
2019-01-01 00:00:00 -06:00
Andrea Gelmini
cc88570fe3 Fix typo in code
Change-Id: I3a4bfbd84735ddcc8d2d0754973f73a98e06c303
Reviewed-on: https://gerrit.libreoffice.org/65652
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2018-12-28 09:59:39 +01:00
Noel Grandin
526387b96e loplugin:unnecessaryvirtual
Change-Id: I4ca101ba838afecbbc8e841a6a9fa6c9c0460f14
Reviewed-on: https://gerrit.libreoffice.org/65497
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-21 07:26:51 +01:00
Noel Grandin
d9d8ec2521 loplugin:unusedfields
Change-Id: Ib41c168817c30ce11baf99c3f43005313fe484ff
Reviewed-on: https://gerrit.libreoffice.org/65496
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-21 07:26:25 +01:00
Noel Grandin
eacc089ce8 loplugin:unusedmethods
Change-Id: I63f03bd1a0510bf411341e1a04a40eb7fce2d57e
Reviewed-on: https://gerrit.libreoffice.org/65495
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-21 07:24:54 +01:00
Noel Grandin
61dfcdda88 loplugin:unusedfields improve write-only logic
when dealing with modifications to container classes (e.g. std::vector)

Change-Id: Ic30043631007355ee9a3d9e3f9b6488b435182d6
Reviewed-on: https://gerrit.libreoffice.org/65050
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-13 08:37:58 +01:00
Noel Grandin
d2bc01ff10 loplugin:constantparam
Change-Id: I389f98d06058ba65a8c2d4df2bf7d4e5102659ad
Reviewed-on: https://gerrit.libreoffice.org/65017
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-13 07:19:38 +01:00
Caolán McNamara
3bd103064b weld SwCaptionOptPage
Change-Id: I3373a39d6d8b39717b7aec69544a9d2957db15d8
Reviewed-on: https://gerrit.libreoffice.org/65010
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-12-12 21:07:12 +01:00
Noel Grandin
a8c1db5483 loplugin:unusedfields
Change-Id: I9f11c29a5bcb3512717ad01962f5645de96afe0b
Reviewed-on: https://gerrit.libreoffice.org/64918
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-11 10:37:52 +01:00
Noel Grandin
d35061b21b loplugin:useuniqueptr in svtools,toolkits
Change-Id: Ied7768293e7781772205c9e8f9fb743a584e3125
Reviewed-on: https://gerrit.libreoffice.org/64880
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-11 09:44:00 +01:00
Andrea Gelmini
43c3ca69fe accessibletable.hxx no more exists
Change-Id: I209c1483ee668c29e68b7a5412eff740eda348d1
Reviewed-on: https://gerrit.libreoffice.org/63849
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-11 09:18:24 +01:00
Noel Grandin
1cd32bcf1b loplugin:useuniqueptr in vcl
Change-Id: I24eca813321fd3919bba9d37c285484f865ea2ea
Reviewed-on: https://gerrit.libreoffice.org/64877
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-11 06:26:48 +01:00
Julien Nabet
88738347f8 cppcheck: incorrectStringBooleanError
Change-Id: I7f4bce8444c6c022d856d20b06de4a4834148ea2
Reviewed-on: https://gerrit.libreoffice.org/64834
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-12-10 11:46:41 +01:00
Noel Grandin
2cfdf00a9a loplugin:unnecessaryvirtual
Change-Id: I15633651aaa914918f1e7739c4f3d4793f7d800a
Reviewed-on: https://gerrit.libreoffice.org/64831
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-10 07:59:40 +01:00
Noel Grandin
7e19677fe9 loplugin:unusedfields
Change-Id: I03e8814407fd8e345cb07ac433db4230b4d96e10
Reviewed-on: https://gerrit.libreoffice.org/64822
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-10 07:59:29 +01:00
Noel Grandin
0d43b791e6 loplugin:unusedmethods
Change-Id: I4f2635d468c9ad83b3ac93733529e01a4d03f38e
Reviewed-on: https://gerrit.libreoffice.org/64805
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-09 07:18:17 +01:00
Stephan Bergmann
ab9b67bbb0 Remove obsolete SAL_FALLTHROUGH completely
...after 7ffdd830d5fb52f2ca25aa80277d22ea6d89970b
"HAVE_CPP_ATTRIBUTE_FALLTHROUGH is always true now"

Change-Id: I54e5ff4e036a6bb3e5774d1c0524158aae18e937
Reviewed-on: https://gerrit.libreoffice.org/64800
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-08 13:28:16 +01:00
Andrea Gelmini
e5efd197ad Removed spurious chars
$ file compilerplugins/clang/singlevalfields.results -i

Before:
    compilerplugins/clang/singlevalfields.results: application/octet-stream; charset=binary

After:
    compilerplugins/clang/singlevalfields.results: text/x-c; charset=iso-8859-1

Then converted to UTF-8, to avoid troubles reading it with Python/Editors without
forcing latin-1, like this:

UnicodeDecodeError('utf-8', b'    SwWW8ImplReader::Read_F_DocInfo aName41
    ZULETZTGEDRUCKT
sw/source/filter/ww8/ww8par5.cxx:1569
    SwWW8ImplReader::Read_F_DocInfo aName42
    DERNI\xc8REIMPRESSION
', 155, 156, 'invalid continuation byte')

See here:
https://stackoverflow.com/questions/5552555/unicodedecodeerror-invalid-continuation-byte

Change-Id: Ie54c25e069b3f12b6a28e3724f5b2d323f26f737
Reviewed-on: https://gerrit.libreoffice.org/64786
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-08 12:48:24 +01:00
Noel Grandin
38187ec15b loplugin:singlevalfields extend to all static vars
Change-Id: Ic238bb5291539fd1b7e98cb4afc9b25f37e7d528
Reviewed-on: https://gerrit.libreoffice.org/64710
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-07 07:38:24 +01:00
Stephan Bergmann
efe2889549 Remove broken rebuild of compilerplugins when CLANG_FULL_VERSION changed
Not all compilerplugins/clang/*.cxx depend on config_clang.h (e.g., check.cxx
doesn't), so this mechanism trying to rebuild compilerplugins once the
underlying Clang installation changes doesn't work reliably in practice (just
debugged through this with Miklos on IRC, and it wasn't the first time that
`make distclean` fixed compilerplugins for somebody after they upgraded their
Clang installation).  Removing the brittle mechanism shows that plugin.hxx
doesn't actually depend on config_clang.h.

(There's a second mechanism trying to rebuild compilerplugins once the
underlying Clang installation changes, namely

> # Clang most probably doesn't maintain binary compatibility, so rebuild when clang changes.
> $(CLANGOUTDIR)/clang-timestamp: $(CLANGDIR)/bin/clang$(CLANG_EXE_EXT)
>         $(QUIET)touch $@

in compilerplugins/Makefile-clang.mk, but that doesn't work reliably either, as
it depends on the newly installed clang executable being newer than our
clang-timestamp file, which will be the case for self-built Clang installations,
but not necessarily when updating e.g. a distro-provided Clang installation.)

Change-Id: Ie576f14356b3f0e55444375095c86aa851404bf3
Reviewed-on: https://gerrit.libreoffice.org/64623
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-12-06 08:37:14 +01:00
Noel Grandin
84568fb1ba loplugin:singlevalfields add checking for static class fields
which required a completely different set of code

Also add checking for in-class initialiser on struct/class fields

Change-Id: I31e1586975aaafe23996619e2f59678c5fbc390f
Reviewed-on: https://gerrit.libreoffice.org/64593
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05 10:45:40 +01:00
Noel Grandin
e4472d3c13 loplugin:unnecessaryparen include more assignments
Change-Id: I9fb8366634b31230b732dd38a98f800075529714
Reviewed-on: https://gerrit.libreoffice.org/64510
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-05 07:49:30 +01:00
Noel Grandin
e909028cab loplugin:unusedenumconstants look through parentheses
Change-Id: I2afdf5a56d827e283dd2362b87446ad7848cb274
Reviewed-on: https://gerrit.libreoffice.org/64452
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-04 07:12:19 +01:00
Noel Grandin
93e0622d00 loplugin:intvsfloat get this working reliably
Change-Id: Ifdf1a152f6bc2e2f6edae97a5191120f630f7e49
Reviewed-on: https://gerrit.libreoffice.org/64374
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-12-02 11:46:39 +01:00
Stephan Bergmann
9eff2ebf38 Make some loplugin:implicitboolconversion code use TypeCheck
Change-Id: If675d629784894573085122beadc6abc3e67f457
Reviewed-on: https://gerrit.libreoffice.org/64335
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-30 15:59:54 +01:00
Noel Grandin
437adaac0a loplugin:unusedmethods
Change-Id: Id0d68d659fa06a8230ed0d927b85b6b504525d1e
Reviewed-on: https://gerrit.libreoffice.org/64328
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-30 12:57:58 +01:00