Age | Commit message (Collapse) | Author |
|
if one side of the expression is a compile-time-constant, we don't need
to worry about side-effects on the other side
Change-Id: Iee71ea51b327ef244bf39f128f921ac325d74e2b
Reviewed-on: https://gerrit.libreoffice.org/81589
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...similar to OUStringChar, to be used in string concatenation expressions. And
enable the corresponding loplugin:stringadd check, and fix its findings.
Change-Id: I35ebb2253ba82bda6c98ae6ebd2ad4f27cf9abf9
Reviewed-on: https://gerrit.libreoffice.org/81456
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Replace them with default initialization or calloc
Change-Id: I747f53c2ced2d0473fd5a5ede4f8520a0633dcc1
Reviewed-on: https://gerrit.libreoffice.org/80805
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...that had been missing because the plugin didn't implement postRun, so it
didn't report anything when run as part of the shared plugin. (But did report
the expected warnings when run as a standalone plugin during
CompilerTest_compilerplugins_clang.)
Most fixes are straightforward. A noteworthy one is PreparedStatement::setBytes
in connectivity/source/drivers/postgresql/pq_preparedstatement.cxx: The old
preallocation of a 20 character OStringBuffer might have prevented
buf.append( reinterpret_cast<char *>(escapedString), len -1 );
from potentially throwing std::bad_alloc, which would have caused escapedString
to be leaked. Even though that 20-character preallocation was likely just
random junk and not meant to address the potential leak, lets address it now.
Change-Id: Ib506332d061684a22a74e5e39e591539fd2c4900
Reviewed-on: https://gerrit.libreoffice.org/80925
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...ever since 8f55fe4c6c73f110b1c72903c209399ff2527ea5 "INTEGRATION: CWS help2"
dropped p->application and "/" from strBuff.
Change-Id: I48aa9271daac4caf23d932741a5c75cb00ad7ee9
Reviewed-on: https://gerrit.libreoffice.org/80924
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ifbdb3e41eae665f7dcaf5301aaba2b6e4662cf48
Reviewed-on: https://gerrit.libreoffice.org/80855
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
mostly so that my stringadd loplugin can point out places to improve
Change-Id: I9920ee1c99cdb6b811ba67ff9d8e32aa261884b5
Reviewed-on: https://gerrit.libreoffice.org/80618
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Apply the constmethod plugin, but only to accessor-type methods, e.g.
IsFoo(), GetBar(), etc, where we can be sure of that
constifying is a reasonable thing to do.
Change-Id: Ibc97f5f359a0992dd1ce2d66f0189f8a0a43d98a
Reviewed-on: https://gerrit.libreoffice.org/74269
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I266367d4f9e2b9bf637fc103a5e4876bd6b1d2b9
Reviewed-on: https://gerrit.libreoffice.org/79261
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I17f06c9415b9d43b6d8896360e07216c2856367a
Reviewed-on: https://gerrit.libreoffice.org/79627
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I3a51812bbd3fcdc6b11e47cb12962f0d4fa7a2ae
Reviewed-on: https://gerrit.libreoffice.org/78191
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
in uui, xmlhelp
Change-Id: I588ed4154e6b21e178f2466c58abc08562eddf80
Reviewed-on: https://gerrit.libreoffice.org/77663
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
in ucb, xmlhelp
Change-Id: I79f6378cff14c71987f77e0c08e0107bd4b3eefb
Reviewed-on: https://gerrit.libreoffice.org/77623
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: I7c9c911aa6b051eeab46344f25ea2919605de645
Reviewed-on: https://gerrit.libreoffice.org/77534
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I545154bddfd29194630d744b4aa4f5c385321531
Reviewed-on: https://gerrit.libreoffice.org/77138
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|
|
Change-Id: Idd6533cce6e8710c245940b08a7d5fc0abfef84f
Reviewed-on: https://gerrit.libreoffice.org/76624
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I3c014f53607a849c743a2fd1aa47d03d5af978fb
Reviewed-on: https://gerrit.libreoffice.org/76495
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I84954e35f285d968e3a83591c476b3c814c2a13f
Reviewed-on: https://gerrit.libreoffice.org/76033
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I6fb22b972a19b42787242d98d08fc425f5c0aea9
Reviewed-on: https://gerrit.libreoffice.org/75842
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Change-Id: Ic0a9d173c24af8962539b00207b8dd24cbbcdbc0
Reviewed-on: https://gerrit.libreoffice.org/75841
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
So finding correct offline help will actually work with language
tags containing scripts or variants.
Change-Id: I493041fbfe62dc7cd2e035592fe94ef9fe3c2480
Reviewed-on: https://gerrit.libreoffice.org/74855
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
... but a tag of an installed language, e.g. "en-US".
Adding a country then resulted in "en-US-US", used to load a
collator.
Further inspection of processLang() needed which can't work for
sr-Latn or ca-valencia, for example.
Change-Id: Id587ede738143c506da1ff2822aa605d0e7bee83
Reviewed-on: https://gerrit.libreoffice.org/74847
Reviewed-by: Eike Rathke <erack@redhat.com>
Tested-by: Jenkins
|
|
Change-Id: If863d28c6db470faa0d22273020888d4219e069e
Reviewed-on: https://gerrit.libreoffice.org/74559
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Idbf0de3f953b08f98144241346533ad30f49269e
Reviewed-on: https://gerrit.libreoffice.org/74285
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Use range-based loops or replace with comphelper or STL functions
Change-Id: I9113e04d15ad84d0abac087afc627969e8ebc354
Reviewed-on: https://gerrit.libreoffice.org/73867
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
to find stuff like
OUString s = OUString("xxx")
Change-Id: Ie7ed074c1ae012734c67a2a89c564c1900a4ab04
Reviewed-on: https://gerrit.libreoffice.org/70697
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
V572 It is odd that the object which was created using 'new' operator
is immediately cast to another type.
Change-Id: I54976062dc3f62eaaa79f89eff54454f0b24ac2c
Reviewed-on: https://gerrit.libreoffice.org/69989
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
|
|
Change-Id: Id3858365a54e6ae96bf9e6c3e27a777441ab56ae
Reviewed-on: https://gerrit.libreoffice.org/68133
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
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>
|
|
Change-Id: Ibda157508e92ab5fb222daf79a38941c30a8057e
Reviewed-on: https://gerrit.libreoffice.org/67611
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Since it is now possible to use C++14, it's time to replace
the temporary solution with the standard one
Change-Id: Ib3201f865d43f372007cdf381c7e244e9cbeae26
Reviewed-on: https://gerrit.libreoffice.org/67474
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
|
|
Change-Id: I3c1e0bfbba1a1849075500882133aac3899de5c8
Reviewed-on: https://gerrit.libreoffice.org/66834
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic49bb1bc6591735562b0b23d821202bab00ceba2
Reviewed-on: https://gerrit.libreoffice.org/65533
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I9fb8366634b31230b732dd38a98f800075529714
Reviewed-on: https://gerrit.libreoffice.org/64510
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia505df60f5758d40dd55bc5b24886fd8aec327ce
Reviewed-on: https://gerrit.libreoffice.org/64092
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie375f7fded2592cd1e926f14be0216608c2695d6
Reviewed-on: https://gerrit.libreoffice.org/63130
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I565f22594a371188c4a6eff5f405946ec1e04d95
Reviewed-on: https://gerrit.libreoffice.org/62061
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
Tested-by: Caolán McNamara <caolanm@redhat.com>
|
|
Patch by: me
(cherry picked from commit ae1f34be5c9a49fae1eacdb3c1e5267acea53441)
Change-Id: I0e5277b17243f6b8f5f4303206cf446b10dd0aef
Reviewed-on: https://gerrit.libreoffice.org/61597
Reviewed-by: Michael Stahl <Michael.Stahl@cib.de>
Tested-by: Michael Stahl <Michael.Stahl@cib.de>
|
|
...where "inline" (in its meaning of "this function can be defined in multiple
translation units") thus doesn't make much sense. (As discussed in
compilerplugins/clang/redundantinline.cxx, exempt such "static inline" functions
in include files for now.)
All the rewriting has been done automatically by the plugin, except for one
instance in sw/source/ui/frmdlg/column.cxx that used to involve an #if), plus
some subsequent solenv/clang-format/reformat-formatted-files.
Change-Id: Ib8b996b651aeafc03bbdc8890faa05ed50517224
Reviewed-on: https://gerrit.libreoffice.org/61573
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I5d51df50a0c2279c52273254c451f3f21eaafbfb
Reviewed-on: https://gerrit.libreoffice.org/61112
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Idaf73fd5d12badbee58861c6ca3b087c16946b9c
Reviewed-on: https://gerrit.libreoffice.org/60615
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...warning about (for now only) functions and variables with external linkage
that likely don't need it.
The problems with moving entities into unnamed namespacs and breaking ADL
(as alluded to in comments in compilerplugins/clang/external.cxx) are
illustrated by the fact that while
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
struct S2: S1 { int f() { return 1; } };
int f(S2 s) { return s.f(); }
}
int main() { return f(N::S2()); }
returns 1, both moving just the struct S2 into an nunnamed namespace,
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
namespace { struct S2: S1 { int f() { return 1; } }; }
int f(S2 s) { return s.f(); }
}
int main() { return f(N::S2()); }
as well as moving just the function f overload into an unnamed namespace,
struct S1 { int f() { return 0; } };
int f(S1 s) { return s.f(); }
namespace N {
struct S2: S1 { int f() { return 1; } };
namespace { int f(S2 s) { return s.f(); } }
}
int main() { return f(N::S2()); }
would each change the program to return 0 instead.
Change-Id: I4d09f7ac5e8f9bcd6e6bde4712608444b642265c
Reviewed-on: https://gerrit.libreoffice.org/60539
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Use range-based loop or replace with functions from std algorithm.
Change-Id: I5b1859da37c2a6c6e5e70602287bfc2ada951893
Reviewed-on: https://gerrit.libreoffice.org/60463
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia8eda3075b0387ec3a5ed6267f1dfcfb3a8cf782
Reviewed-on: https://gerrit.libreoffice.org/60426
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Found with bin/find-unneeded-includes
Only removal proposals are dealt with here.
Change-Id: I7bfeef47abaf94cfb355db95c0fdb928ce36c0a6
Reviewed-on: https://gerrit.libreoffice.org/60232
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: Ic2d901ca0dbc2d6fa96611d260c1572da8a783c0
Reviewed-on: https://gerrit.libreoffice.org/60398
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I8a407e0492adf61e1d815cadd5da0a1623c2b23b
Reviewed-on: https://gerrit.libreoffice.org/60191
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: If9ffa025ba0ce9a1c97c89ec50e71e7f90c5435b
Reviewed-on: https://gerrit.libreoffice.org/59436
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia400e67108e622ae63a8d59667eae96c858f22dc
Reviewed-on: https://gerrit.libreoffice.org/58463
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Iaa00d65b518b3e638c2d31912e247cb91bdd0950
Reviewed-on: https://gerrit.libreoffice.org/58347
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
|