Age | Commit message (Collapse) | Author |
|
OBookmarkContainer actually re-uses the reference count of
ODatabaseSource, so converting ODatabaseSource::m_aBookmark to Reference
created a cycle, which somehow causes the dataloss, because evidently
something as important as storing the data must be done in the
destructor.
(regression from 2660d24a07866e083c5135ea263030f3e3a2e729)
(cherry picked from commit 96ae2a3300811897c24cccb20f8c2faf382483df)
tdf#114596 compilerplugins: add exception to [loplugin:refcounting]
(cherry picked from commit e80da60895b45309fa1d018760d5f11cca4367f4)
Change-Id: I4cad01dc9cdaf405c1eb31d6c0e161eb6712b78f
Reviewed-on: https://gerrit.libreoffice.org/49025
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...preventing the dtor from ever being called. (DocumentEvents forwards its
acquire/release calls to its m_pData->rParent, i.e., the ODatabaseDocument, for
better or worse.) This caused ODatabaseDocument instances to be leaked during
e.g. JunitTest_dbaccess_complex. Regression introduced with
de2ac128da025502c533f8cede5862e054dd9c44 "loplugin:useuniqueptr in dbaccess".
Change-Id: Ida073c7e576b88e0d1d1a90253445e946e6eac99
Reviewed-on: https://gerrit.libreoffice.org/45652
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit 5066377bbeab1000f31e3fa689bad2ff8bf35295)
Reviewed-on: https://gerrit.libreoffice.org/45685
|
|
...after bc4e8de8eea1ccebda479c8e2db2f3c6dfff60d2 "Silence new
loplugin:fpcomparison for now":
> Nov 30 08:33:16 <sberg> noelgrandin, thoughts on whether fpcomparison is actually worth it, seeing the loooooooong blacklist there?
> Nov 30 08:34:11 <noelgrandin> sberg, that's wasn't my idea, can't remember who came up with it. vmiklos was that you?
> Nov 30 08:34:36 <noelgrandin> sberg, the original commit message was "Find code that compares floating point values with == or !=
> Nov 30 08:34:36 <noelgrandin> It should rather use rtl::math::approxEqual"
> Nov 30 08:34:45 <noelgrandin> so in theory the replacement should be fairly manual
> Nov 30 08:34:48 <vmiklos> i don't think so :)
> Nov 30 08:35:15 <noelgrandin> might have been moggi, but he's not around so.... just disable it
> Nov 30 08:36:19 <sberg> noelgrandin, yeah, in theory; in practice, I guess there's also cases where x==1.0 is what you want exactly (given x tends not to be a computed value after all, but some literal that's being passed around)
> Nov 30 08:36:33 <sberg> noelgrandin, yeah, I'll disable it then
Change-Id: I35f5328efa0ec02d9be837c12efab2b03a3dae52
Reviewed-on: https://gerrit.libreoffice.org/45550
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
(cherry picked from commit bf59f89d8818f62b03acaf7820e1a9560a388252)
Reviewed-on: https://gerrit.libreoffice.org/45658
Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Tested-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
|
|
...in case there are multiple, as is the case at least with recent (towards
GCC 8) libstdc++, where std::pair is forward-declared also in
include/c++/8.0.0/bits/stl_iterator.h, so that in
dbaccess/source/ui/dlg/DbAdminImpl.cxx
std::pair< Reference<XConnection>,sal_Bool> aRet;
aRet.second = false;
failed to reconstruct the sal_Bool template argument and issued a
loplugin:implicitboolconversion warning.
Change-Id: I0054f2596d3f8837b857f1dca2f25952828b12cc
Reviewed-on: https://gerrit.libreoffice.org/45254
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
* rsc/source/parser/rscyacc.cxx no longer exists
* writerfilter/source/rtftok/rtftokenizer.cxx appears to be just fine nowadays?
* sw/source/filter/html/htmltab.cxx used redundant parentheses around a comma
operator in a while condition, and I see no reason not to remove them (the
result requires a---reasonable---tweak to loplugin:commaoperator, though)
Change-Id: I451132c700b0ae5a43b03d704156484df897ad5c
Reviewed-on: https://gerrit.libreoffice.org/45213
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I0d14f9c375f93079aef21ca4f1132adc4e1fe06c
Reviewed-on: https://gerrit.libreoffice.org/45207
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...for whatever reason
Change-Id: Iaae919dc6c636c4846c548914e593cb8bd94fe8b
|
|
so revert some of the changes from
commit 7a1c21e53fc4733a4bb52282ce0098fcc085ab0e
loplugin:simplifybool for negation of comparison operator
Change-Id: I937d575b86c1e418805d399b0dc16ae91876b4fe
Reviewed-on: https://gerrit.libreoffice.org/45130
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...so that 640e03da110d76b2c7d5ed5b8b8ba3b4367865ba "loplugin:simplifybool re-
activate the !! warning", which did not warn about
!!( nAttribs & ucb::ContentInfoAttribute::KIND_FOLDER )
in ucb/source/core/ucbcmds.cxx (involving sal_Int32 and sal_Int16), would not
have warned about
!!(nMode & nUpdateMode)
in sfx2/source/appl/workwin.cxx (ivolving o3tl::typed_flags<SfxVisibilityFlags>)
either.
Change-Id: Ibe955592951a04b1bd9a9b4e8cc502024bc1d460
Reviewed-on: https://gerrit.libreoffice.org/45083
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...similar to how <https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning
about !! in loplugin:simplifybool consistent" does for loplugin:simplifybool
Change-Id: I23eef400af71c582d380c9bae6546ce06e8a1e18
Reviewed-on: https://gerrit.libreoffice.org/45122
Tested-by: Stephan Bergmann <sbergman@redhat.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: Ie56daf560185274754afbc7a09c432b5c2793791
Reviewed-on: https://gerrit.libreoffice.org/45068
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...which had been left out because "lots of our code uses this style, which I'm
loathe to bulk-fix as yet", but now in
<https://gerrit.libreoffice.org/#/c/45060/1/> "use std::unique_ptr" would have
caused an otherwise innocent-looking code change to trigger a
loplugin:unnecessaryparen warning for
pFormat = (pGrfObj)
? ...
(barring a change to ignoreAllImplicit in
compilerplugins/clang/unnecessaryparen.cxx similar to that in
<https://gerrit.libreoffice.org/#/c/45083/2> "Make not warning about !! in
loplugin:simplifybool consistent", which should also have caused the warning to
disappear for the modified code, IIUC).
Change-Id: I8bff0cc11bbb839ef06d07b8d9237f150804fec2
Reviewed-on: https://gerrit.libreoffice.org/45088
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
the rewriter is capable of flattening the function
by returning early, and inverting simple conditions. More
complex conditions are just wrapped in "!(x)"
Change-Id: I028fd7b018dc7347c1b323b2a73ab99c18508faa
Reviewed-on: https://gerrit.libreoffice.org/45071
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...loplugin:unnecessaryparen
Change-Id: I473a1e16cf9f485a61af5477aca22798996253a3
|
|
Change-Id: Iac7d82a1c228734177be536e9a6c41803c03637b
Reviewed-on: https://gerrit.libreoffice.org/45035
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I4f9b71ff7767e90987bb40358fc46ed5d1d571d0
Reviewed-on: https://gerrit.libreoffice.org/44944
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ic1a7e5bd3a8002ac996a6af1d1d9a439d4153b0b
Reviewed-on: https://gerrit.libreoffice.org/44864
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...in the type at the start of a ParmVarDecl, so that it does not erroneously
assume in isSharedCAndCppCode that the whole decl is in "the body of a macro
definition". (Even better might be to check the whole ParmVarDecl is inside one
macro body.)
Turns out that vcl/unx/gtk/gtkdata.cxx indirectly includes stdbool.h via some
vcl/inc/unx/saldisp.hxx -> workdir/UnpackedTarball/epoxy/include/epoxy/glx.h ->
workdir/UnpackedTarball/epoxy/include/epoxy/gl.h, and Clang's stdbool.h contains
> /* Don't define bool, true, and false in C++, except as a GNU extension. */
> #ifndef __cplusplus
> #define bool _Bool
> #define true 1
> #define false 0
> #elif defined(__GNUC__) && !defined(__STRICT_ANSI__)
> /* Define _Bool, bool, false, true as a GNU extension. */
> #define _Bool bool
> #define bool bool
> #define false false
> #define true true
> #endif
since <http://llvm.org/viewvc/llvm-project?view=revision&revision=115028>
"Define _Bool, bool, true, and false macros in <stdbool.h> when we're in a
GNU-compatible C++ dialect. Fixes <rdar://problem/8477819>" while GCC's
stdbool.h has meanwhile been improved with
<https://gcc.gnu.org/viewcvs/gcc?view=revision&revision=216679> "C++11
explicitly forbids macros for bool, true and false" to
> #ifndef __cplusplus
>
> #define bool _Bool
> #define true 1
> #define false 0
>
> #else /* __cplusplus */
>
> /* Supporting _Bool in C++ is a GCC extension. */
> #define _Bool bool
>
> #if __cplusplus < 201103L
> /* Defining these macros in C++98 is a GCC extension. */
> #define bool bool
> #define false false
> #define true true
> #endif
>
> #endif /* __cplusplus */
Change-Id: I42caab83ac6e4d5e5297376136a6bbe6f3d70818
|
|
...by structurally comparing complex constexpr exprs that use template functions
that happen to not have been instantiated, so Expr::EvaluateAsRValue et al would
fail. (Which happened with SFX_PRINTER_ALL in SfxViewShell::SetPrinter,
include/sfx2/viewsh.hxx.)
Now all of the LO code base should compile without causing
checkIdenticalDefaultArguments to return Maybe.
Change-Id: I2b103418c2c68f6d2242535c9cca3222a2508778
Reviewed-on: https://gerrit.libreoffice.org/44773
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...introduced with cab6e6836973a9ddfc5ed9df757e07138328c1c3 "Make
checkIdenticalDefaultArguments more precise", causing older Clang to hang when
compiling specific LO source files.
Change-Id: I99cfcad2f0cd9adccd5aa84d21502f586762217f
|
|
...when creating objects involves copy/move constructors
Change-Id: I0c7ccb85b7dcb584502a48817d7d2abfde25aaf2
Reviewed-on: https://gerrit.libreoffice.org/44733
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I09db5eeee5734f980a794e9adee70b6b634dfd99
Reviewed-on: https://gerrit.libreoffice.org/44732
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...when creating objects of the same derived type
Change-Id: I109b614473a2fb5b08dddd07a4fbe757086141a1
Reviewed-on: https://gerrit.libreoffice.org/44716
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
the description in the comment was right, but the code was not
Change-Id: I7c038e7453f4387d33ec6423c0c55446d6d0df47
Reviewed-on: https://gerrit.libreoffice.org/44680
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ia544298334364ece3b3963a4adc00c5e01189b91
Reviewed-on: https://gerrit.libreoffice.org/44654
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Mark Page <aptitude@btconnect.com>
|
|
...instead of blacklisting such cases. Reuses the
checkIdenticalDefaultArguments code that was originally in
loplugin:overrideparam (and appears to work reasonably well for the default
arguments that actually happen in practice).
Change-Id: I9cf2db17101beb135b2039a9b7ed335bd2af2c08
Reviewed-on: https://gerrit.libreoffice.org/44594
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Change-Id: I90d8af7a1affa459400b1cae4805e3a80b6c5200
Reviewed-on: https://gerrit.libreoffice.org/44593
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...a using declaration should fix it just fine
Change-Id: I05cf76672bcceb7a94afa602e215a0b5a32de82b
Reviewed-on: https://gerrit.libreoffice.org/44591
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...a using declaration should fix it just fine
Change-Id: I0279994c155775e9a58e93aef8da4522d4fd93fd
Reviewed-on: https://gerrit.libreoffice.org/44590
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
look for classes containing protected methods where we can convert them
all to private
Change-Id: I4a448341943e0a613cde30501c4012da61dba713
Reviewed-on: https://gerrit.libreoffice.org/44588
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I543b0943f0bc918d59debc8ee051f88c29d18454
Reviewed-on: https://gerrit.libreoffice.org/44553
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I481cfa8b0f4bb9cbc257d28f36c372fb7367f294
|
|
Change-Id: Idcc6b1734599eec5d9eefbefb8849dc050b6a9d6
Reviewed-on: https://gerrit.libreoffice.org/44522
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
|
|
Change-Id: Ib15931e415990b56367fe3e1c7cf3f22cc4826d5
Reviewed-on: https://gerrit.libreoffice.org/44529
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: Ie8a2c6462ddc708140e725847199c8234ab6b592
Reviewed-on: https://gerrit.libreoffice.org/44528
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
This now hides one of the ScVbaFormatCondition_BASE::Operator overloads, but
that doesn't get called directly at ScVbaFormatCondition anyway. (And if it
were, we could add an appropriate using declaration to ScVbaFormatCondition.)
Change-Id: I8440b76a5745c6874f7a3bfcbb4bc4ce5618a4c4
|
|
simplify dynamic_cast followed by static_cast
Change-Id: I965afcf05d1675094cfde53d3590a0fd00f26279
Reviewed-on: https://gerrit.libreoffice.org/44460
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I5696c853daa16c9e55ff046d67102ba3042bfea8
Reviewed-on: https://gerrit.libreoffice.org/44459
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
(but which finds no new hits)
Change-Id: I862a3c82932ee6d6d0946cd33f965bb8e917cff8
|
|
For one, loplugin:unusedvariablecheck does not merely check for unused variables
with types from the standard library since
fe2164949b38a7f73883dbdcb3271b94e5c81744 "teach unusedvariablecheck plugin about
SfxPoolItem subclasses", so disabling loplugin:unusedvariablecheck based on
HAVE_GCC_ATTRIBUTE_WARN_UNUSED_STL is wrong.
For another, I have seen no standard library implementation that decorates its
types with such "warn-if-unused" attributes, and
<http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2017/p0600r0.pdf>
"[[nodiscard]] in the Library" (which proposes to add the corresponding C++17
attribute to just a few select functions and no types at all) makes it appear
unlikely that will happen.
Change-Id: I0a7759e1caf3e3137057c9689080948a4d6747e0
|
|
(but which finds no new hits)
Change-Id: I5d5f351402797b662a08ec8dca301bd174e22a50
Reviewed-on: https://gerrit.libreoffice.org/44433
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
Per README.md, Clang 3.4 is the baseline for --enable-compiler-plugins, which is
the sole consumer of the "lo_warn_unused" attribute, but Clang 3.4 already
supports HAVE_GCC_ATTRIBUTE_WARN_UNUSED.
Change-Id: I9654028e24852335e463c73bcb5ece5e5b54d53c
|
|
...when a class derives from multiple (non-virtual) instances of one base class,
and the override disambiguates which of those instances' member to call.
That was the case with SwXTextDocument::queryAdapter
(sw/source/uibase/uno/unotxdoc.cxx), where SwXTextDocument derives from
cppu::OWeakObject through both SwXTextDocumentBaseClass and SfxBaseModel, but
calling queryAdapter through a pointer to SwXTextDocumentBaseClass apparently
needs to call OWeakObject::queryAdapter on the second, SfxBaseModel-inherited
OWeakObject base instance, or else CppunitTest_sw_macros_test fails.
Who knows what other instances of similar non-unnecessary overrides have been
removed with the help of broken loplugin:unnecessaryoverride, for which there
were no tests that started to fail...
Turns out .clang-format lacked "ReflowComments: false" to not break the special
"// expected-error {{...}}" etc. comments in compilerplugins/clang/test/.
Also, use a better location to report loplugin:unnecessaryoverride, to keep
clang-format and loplugin:unnecessaryoverride from fighting over how to split
lines and where to put the comment in
compilerplugins/clang/test/unnecessaryoverride.cxx.
Change-Id: I3b24df24369db12f8ec1080d6c9f7b70ff561a16
Reviewed-on: https://gerrit.libreoffice.org/44418
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|
|
...that should have been removed in 2446d2b2fb8b091eaae015fd5bb26bd8e0f596f7
"Avoid expensive calls to containsPreprocessingConditionalInclusion"
Change-Id: I2ffe0ec7b6f1ec0b418979f2864bd5de79ab2c9a
|
|
Change-Id: I42981a23f75298591b2c3b073aea66426220f3e2
|
|
Change-Id: Id4b68ca0509111396ed354f4cda43d663083cad0
Reviewed-on: https://gerrit.libreoffice.org/44388
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
Change-Id: I26734c13515394162d88351a1cbe2b20abdac865
|
|
...which, according to callgrind, reduces instruction fetch count spent on
compiling sw/source/core/layout/paintfrm.cxx (randomly selected because it is
rather large) by 5% from 41,992,064,226 to 39,861,989,855 (function main() in
clang-6.0).
This is best done by forwarding ignoreLocation calls from Plugin to the
PluginHandler signleton, but due to the tight mutual coupling between plugin.hxx
and pluginhandler.hxx that unfortunately required some reorganization (and two
outstanding TODO clean-ups of temporarily introduced using declarations in
plugin.hxx).
Change-Id: Ia4270517d194def7db7ed80cb6894e9c473e9499
|
|
lots of little fixes to make the logic less pessimistic
Change-Id: If368822984250b11b98c56f5890177a1402e8660
Reviewed-on: https://gerrit.libreoffice.org/44168
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
|
|
...at least in com_GCC_class.mk (com_MSC_class.mk will be addressed in a follow-
up commit), after the recent loplugin:includeform clean-up.
Two static libraries built from external sources needed adjustment, two
compilerplugin tests needed adjustment (which wasn't found by
loplugin:includeform, by design), and one more adjustment in
sal/textenc/generate/.
Change-Id: Idad5ae355a02ae130369a9a45b5f5925ab48ffef
Reviewed-on: https://gerrit.libreoffice.org/44174
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
|