2426 Commits

Author SHA1 Message Date
Stephan Bergmann
3d62146241 Silence loplugin:cppunitassertequals when comparing pointer against nullptr
I need that for another upcoming commit.

Change-Id: If7e567c731e454070bf8ad9efb5c2f28ff9049e6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93031
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-28 13:39:01 +02:00
Noel Grandin
6069408823 convert excel filter in calc from shared_ptr to rtl::Reference
ref-counting traffic here accounts for 10% of the profile on some of my
calc imports.

Change-Id: I1b32e0e61d7bf5eb65780ec0e7fcb99f6576050a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92694
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-25 13:22:33 +02:00
Noel Grandin
facd0fc931 loplugin:constantparam
Change-Id: Id6197d72ae136da04dfb22c847623004b797d75d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92840
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-25 13:09:59 +02:00
Noel Grandin
bf02636abc loplugin:unusedmethods
Change-Id: I7ba901c7d6e1e88d9d2821df4a37ebbea3b63084
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92874
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-25 08:29:46 +02:00
Noel Grandin
d34b6243d6 loplugin:unnecessaryvirtual
Change-Id: Iec5de34f908ac370302ab51a33f17dfc23ea2446
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92834
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-24 12:27:15 +02:00
Noel Grandin
6a22fc81e2 loplugin:unusedmethods
Change-Id: Ieec5099a8ce9fa3f07e36be244071efc1b101cf7
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92803
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-24 08:12:31 +02:00
Gabor Kelemen
63e43c1db9 Drop Macromedia Flash export filter
Flash technology is going to be retired by the end of 2020 by Adobe:

https://theblog.adobe.com/adobe-flash-update/

With this ahead doesn't make much sense for LO 7.0 to support exporting
presentations and drawings to swf anymore.

Change-Id: Ic2c6e95db2f56bcd4eb25abdd0a6748aee9b0e4c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92507
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
Reviewed-by: Thorsten Behrens <Thorsten.Behrens@CIB.de>
2020-04-23 16:16:12 +02:00
Andrea Gelmini
09849784f1 Fix typo
Change-Id: I07f828e8a17de03cf15639df8afa0adf5dcaebba
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92246
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-04-23 13:38:51 +02:00
Caolán McNamara
2e0a32b516 weld FontNameBox
with custom row rendering

Change-Id: Ia909b5b9ad56b6ea4611e9ea0a1e2cb0064a8cd4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91841
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-21 10:19:41 +02:00
Miklos Vajna
95a0ac6841 compilerplugins: fix building against baseline clang (5.0.2)
Where the Optional ctor is explicit.

Change-Id: I577661c022f25502260977a6ef6744e4e178acc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92519
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
Tested-by: Jenkins
2020-04-20 10:12:45 +02:00
Noel Grandin
935259d817 improve failure mode in flatten loplugin
rather than asserting, write out a warning so that section of code can
be handled manually

Change-Id: I1356012f4e480cff9508dad6c2d70cbbba1a5dc1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92424
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-17 15:58:29 +02:00
Heiko Tietze
9b1c9ac6ed Related tdf#130778: New About dialog
More flexible dialog
logo & about images as SVGs

Change-Id: Icefa035893e241a7dee6aa28236e6b89b38477de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91908
Tested-by: Jenkins
Reviewed-by: Heiko Tietze <heiko.tietze@documentfoundation.org>
2020-04-15 17:35:44 +02:00
Noel Grandin
1178521759 loplugin:buriedassign in c*
Change-Id: Id14fed7e5c0f588ad3c927f12251432d12c1a7c8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92190
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-14 16:35:38 +02:00
Stephan Bergmann
88629b5504 Adapt loplugin:unnecessaryparen to C++20 CXXRewrittenBinaryOperator
...as is used by GCC trunk libstdc++ std::unique_ptr since <https://gcc.gnu.org/
git/?p=gcc.git;a=commitdiff;h=5b074864f8c593fd4bccee788a023a37b446b2ed>
"libstdc++: Add comparison operators to std::unique_ptr", which caused
unexpected warnings like

> sfx2/source/dialog/tabdlg.cxx:1057:17: error: parentheses immediately inside vardecl statement [loplugin:unnecessaryparen]
>     bool bSet = ( m_pSet != nullptr );
>                 ^~~~~~~~~~~~~~~~~~~~~

(CXXRewrittenBinaryOperator was introduced with <https://github.com/llvm/
llvm-project/commit/778dc0f1d49230f53401ae0c190fe460bda4ffd1> "[c++20] Add
CXXRewrittenBinaryOperator to represent a comparison", which first appeared in
LLVM 10.)

Change-Id: I68024d975dc4accbfa9da855baa37bf9f990b99c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92061
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-04-11 17:44:54 +02:00
Noel Grandin
32343bcbb7 loplugin:flatten in i18npool
and workaround a clang crash

Change-Id: Ida94c8abb4b2e997d38a7f430e59f73aadf8fcc8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91844
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-08 11:01:14 +02:00
Noel Grandin
f59d9e7ea0 new loplugin:unusedvariableplus
a particularly aggressive checker, which is why it is off by default

Change-Id: Id5a0faa50b3ecc75e01f4aedc6579c5209e585da
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91643
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-07 11:42:37 +02:00
Caolán McNamara
a4f747e9cd remove newly unused stuff
Change-Id: Idce9955294372817c0dd1f40ebd38f16fc90eab5
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91007
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-04-06 21:24:55 +02:00
Noel Grandin
d9e4783302 loplugin:finalclasses in xmlsecurity..UnoControls
Change-Id: I8e942bf37c9173a01bef6e1403ca21f579e7f608
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91612
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-03 11:37:53 +02:00
Noel Grandin
101a9b4a3f loplugin:constantparam
Change-Id: I9cdd15185cfa8347a08402da956eab7cbdd63de6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91609
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-03 10:29:57 +02:00
Noel Grandin
301133e0a8 loplugin:singlevalfields
Change-Id: I69c5b28636806e45d7ba5d8c4678caeda09caa50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91607
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-03 09:02:21 +02:00
Noel Grandin
4c4a1caf0d loplugin:unusedfields
Change-Id: I4abf2df75c54936e02a8a3d8fa26f2b249e69780
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91606
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-03 09:01:21 +02:00
Noel Grandin
33852fc82b loplugin:unnecessaryvirtual
Change-Id: If50fcacc6710f582281d8030c97c39a5d2201390
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91572
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-03 08:04:22 +02:00
Noel Grandin
6df92df74b loplugin:virtualdead
Change-Id: I5698862e5890d3208bc7012b0ce5b60520797c2d
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91571
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-02 21:23:23 +02:00
Noel Grandin
51143bbb32 loplugin:unusedmethods
Change-Id: I906234a38b96c6ba6eaadf7693abd33e98debf50
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91567
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-02 20:03:33 +02:00
Julien Nabet
b382274143 Fix is_typed_flags for BrowseMode (compilerplugins)
Change-Id: Ia6fecc08b2ee66b3e831f2c6289575ca98976783
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91281
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-28 20:29:45 +01:00
Stephan Bergmann
1ebeacb20a Extend loplugin:cstylecast to certain function-style casts
...that are equivalent to const_cast or reinterpret_cast, and should arguably
better be written that way for clarity.  Drawing inspiration from
<https://reviews.llvm.org/D76572> "Replace `T(x)` with `reinterpret_cast<T>(x)`
everywhere it means reinterpret_cast. No functional change".

Change-Id: I27b8f70d324d32ecba658db4d1c2db03e10d5d3e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91086
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-26 09:13:55 +01:00
Andrea Gelmini
77a8b48508 Fix typos
Change-Id: Iba46fbe8559211403118a23cd198a2217b333a81
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90900
Tested-by: Jenkins
Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
Reviewed-by: Adolfo Jayme Barrientos <fitojb@ubuntu.com>
2020-03-23 21:52:24 +01:00
Noel Grandin
e354b3fb80 loplugin:redundantpointerops add some more smart pointer types
Change-Id: Ia7f3441404d8d2e5de501e70da496b6fdc6c9a4a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90728
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-19 09:04:21 +01:00
Stephan Bergmann
11a78fde3b Deref of DynTypedNode* must not outlive owning DynTypedNodeList
Change-Id: I8ac4a2f1e442446384b88f38bdef21644409f8a2
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90303
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-10 20:37:04 +01:00
Miklos Vajna
cfc2a227b4 compilerplugins: remove unused getDeclContext()
Change-Id: I523cc2195be5f200b3e416d1ec3b282e3245ebbb
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90214
Tested-by: Jenkins
Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-09 14:22:50 +01:00
Stephan Bergmann
5ab0f79748 Add --disable-compiler-plugins-analyzer-pch for Jenkins/linux_clang_dbgutil_64
<https://ci.libreoffice.org/job/gerrit_linux_clang_dbgutil/54883/> had been a
case I noticed of a "Gerrit Linux clang/dbgutil" build failing due to stale PCH
information:

[...]
> [build GEN] compilerplugins/clang/sharedvisitor/makeshared.plugininfo
> fatal error: file '/usr/include/asm-generic/errno.h' has been modified since the precompiled header '/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/compilerplugins/clang/sharedvisitor/clang.pch' was built
> note: please rebuild precompiled header '/home/tdf/lode/jenkins/workspace/lo_gerrit/Config/linux_clang_dbgutil_64/compilerplugins/clang/sharedvisitor/clang.pch'
[...]

and this issue had apparently caused all those Gerrit Jenkins builds to fail for
at least a day.  For unmaintained builds like those, I think it is better to
have a more robust setup, where stale PCH information cannot break the build.
Also, as those builds do not make compilerplugins.clean and rather share it
across builds, there should not be much of a performance impact when disabling
PCH in the analyzer.

(It turns out that compilerplugins/clang/sharedvisitor/analyzer.cxx would always
have enabled PCH, as compilerplugins/Makefile-clang.mk always passes in some
definition of LO_CLANG_USE_ANALYZER_PCH.  Fixed that now.)

Change-Id: I7b8b24c1049c501634bd59c5fb482bec72427cf6
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90211
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Jenkins
2020-03-09 13:48:35 +01:00
Noel Grandin
abe39f7781 improve loplugin:unusedfields
noticed something that wasn't being picked up, wrote some tests,
and found an unhandled case in Plugin::getParentFunctionDecl

Change-Id: I52b4ea273be6614e197392dfc4d6053bbc1704de
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90141
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-09 11:33:43 +01:00
Noel Grandin
d32289d715 loplugin:unusedmethods
Change-Id: I698981490eb1391930cdd06821a80a5f770e000e
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90109
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-03-06 17:50:41 +01:00
Stephan Bergmann
4ba1088d68 Adapt compilerplugins to Clang trunk change
<https://github.com/llvm/llvm-project/commit/
93184a8eda272c65308906836b47cbf209de779e> "Remove unused parameter from
CXXRecordDecl::forallBases [NFC]"

Change-Id: I8efdda2a37fd0df3b964401e8851a0f95f8d0ab4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89781
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-02 07:51:34 +01:00
Noel Grandin
b623684c66 loplugin:constantparam
Change-Id: I62a0b760e49e38a4565eebf272492159047dda5b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89613
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-27 10:55:18 +01:00
Noel Grandin
b83b4f967f loplugin:unusedfields
Change-Id: I0d3941ed2a6f0caadbe080ac8a6273c5ec21462c
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89616
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-27 09:52:09 +01:00
Noel Grandin
95234b33bb loplugin:singlevalfields
Change-Id: I3aa19805fab937cd9516ce8127753a0f599c73c1
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89611
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-27 08:29:00 +01:00
Noel Grandin
9b18f4b2b0 new loplugin:xmlimport
to help me maintain the invariants when updating code to use the
FastParser APIs. One weird invariant is that you need to override
startFastElement or the createFastChildContext will not get called.

Not all of these changes are probably necessary - some of the classes
are never constructured themselves, only their subclasses are
constructed, and their subclasses maintain the invariants, but it is
just easier to scatter a few more startFastElement around

Change-Id: I3f70fb5a1e44c311cf4926fa7b0fcda605709eac
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89473
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-26 07:06:32 +01:00
Noel Grandin
fed87058ac Revert "loplugin:sequenceloop improve rvalue detection"
This reverts commit 3aca35f1505fa552eaa316a2d47a60ef52646525.

Reason for revert: see commentary at
   https://gerrit.libreoffice.org/c/core/+/89184
   I misunderstood - even though this is a local copy, we will still call non-const begin()/end() and cause further allocations internal to the Sequence

Change-Id: Ia9ecacc6312afc2c9c80ca72afe6182d9b70241b
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89137
Tested-by: Jenkins
Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-23 11:10:18 +01:00
Stephan Bergmann
9ad252b2e7 Drop o3tl::optional wrapper
...now that macOS builds are guaranteed to have std::optional since
358146bbbd1b9775c12770fb5e497b6ec5adfc51 "Bump macOS build baseline to
Xcode 11.3 and macOS 10.14.4".

The change is done mostly mechanically with

> for i in $(git grep -Fl optional); do
>  sed -i -e 's:<o3tl/optional\.hxx>\|\"o3tl/optional\.hxx\":<optional>:' \
>   -e 's/\<o3tl::optional\>/std::optional/g' \
>   -e 's/\<o3tl::make_optional\>/std::make_optional/g' "$i"
> done
> for i in $(git grep -Flw o3tl::nullopt); do
>  sed -i -e 's/\<o3tl::nullopt\>/std::nullopt/g' "$i"
> done

(though that causes some of the resulting

  #include <optional>

to appear at different places relative to other includes than if they had been
added manually), plus a few manual modifications:

* adapt bin/find-unneeded-includes
* adapt desktop/IwyuFilter_desktop.yaml
* remove include/o3tl/optional.hxx
* quote resulting "<"/">" as "&lt;"/"&gt;" in officecfg/registry/cppheader.xsl
* and then solenv/clang-format/reformat-formatted-files

Change-Id: I68833d9f7945e57aa2bc703349cbc5a56b342273
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89165
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-21 14:50:28 +01:00
Noel Grandin
3aca35f150 loplugin:sequenceloop improve rvalue detection
to avoid false positives

Change-Id: Id20eb0837fa6764139af3fc4481c768700ec2dad
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89184
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-21 14:48:10 +01:00
Noel Grandin
4a08d20ee5 loplugin:unusedmethods
Change-Id: I2194158d555958f0192d8d6c18e4c093608b8fb8
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89119
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-21 07:16:46 +01:00
Stephan Bergmann
4c11b51b34 Adapt structurallyIdentical to current needs
...since aad94d48b19135a2e46ac7b2c0f41f3bb29bb5a7 "Silence warnings in
salvtables.hxx", where --enable-compiler-plugins=debug had started to fail with

> In file included from vcl/source/app/salvtables.cxx:75:
> vcl/inc/salvtables.hxx:128:69: fatal error: TODO: Unexpected 'IdenticalDefaultArgumentsResult::Maybe' [loplugin:overrideparam]
>     weld_drawing_area(const OString& id, const a11yref& rA11yImpl = nullptr,
>                                                                     ^~~~~~~
> include/vcl/weld.hxx:2138:69: note: TODO: second argument is here [loplugin:overrideparam]
>     weld_drawing_area(const OString& id, const a11yref& rA11yImpl = nullptr,
>                                                                     ^~~~~~~
> MaterializeTemporaryExpr 0x7fdff3111360 'const a11yref':'const class com::sun::uno::Reference<class com::sun::accessibility::XAccessible>' lvalue
> `-CXXBindTemporaryExpr 0x7fdff3111340 'const a11yref':'const class com::sun::uno::Reference<class com::sun::accessibility::XAccessible>' (CXXTemporary 0x7fdff3111340)
>   `-CXXConstructExpr 0x7fdff3111308 'const a11yref':'const class com::sun::uno::Reference<class com::sun::accessibility::XAccessible>' 'void (class com::sun::accessibility::XAccessible *)'
>     `-ImplicitCastExpr 0x7fdff31112f0 'class com::sun::accessibility::XAccessible *' <NullToPointer>
>       `-CXXNullPtrLiteralExpr 0x7fdff31112b0 'nullptr_t'
> MaterializeTemporaryExpr 0x7fdff39275d8 'const a11yref':'const class com::sun::uno::Reference<class com::sun::accessibility::XAccessible>' lvalue
> `-CXXBindTemporaryExpr 0x7fdff39275b8 'const a11yref':'const class com::sun::uno::Reference<class com::sun::accessibility::XAccessible>' (CXXTemporary 0x7fdff39275b8)
>   `-CXXConstructExpr 0x7fdff3927580 'const a11yref':'const class com::sun::uno::Reference<class com::sun::accessibility::XAccessible>' 'void (class com::sun::accessibility::XAccessible *)'
>     `-ImplicitCastExpr 0x7fdff3927568 'class com::sun::accessibility::XAccessible *' <NullToPointer>
>       `-CXXNullPtrLiteralExpr 0x7fdff3927528 'nullptr_t'

Change-Id: I2603180571df2248d4697ba63e1a8391d0dfc596
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89157
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-20 22:42:38 +01:00
Noel Grandin
b0aae2e6b6 loplugin:unusedfields
Change-Id: Ic036265f4e0b41108c5b72f0142b0aaf88d10713
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89118
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-20 20:27:24 +01:00
Noel Grandin
6ed374acf4 loplugin:unnecessaryvirtual
Change-Id: I47f0bfe8b1968ea33b0c20b06ef7d3eea3f29a61
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89116
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-20 18:31:41 +01:00
Noel Grandin
e6da8c07dd loplugin:singlevalfields
Change-Id: I9ff752b06facfbb04c10c8f9b46b650143b02ca4
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89117
Tested-by: Jenkins
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-02-20 18:31:05 +01:00
Caolán McNamara
867b5bb769 drop newly unused methods
Change-Id: I390134b3cd0187f0adcced3625ad0a3a26f8fe28
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/89008
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-19 13:24:50 +01:00
Caolán McNamara
d031002b32 weld LimitBox Item Window
also merge dbaui::LimitBox with dbaui::LimitBoxImpl

Change-Id: Idd01e71d6afe817971223b46611c622a82883304
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88870
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-02-17 21:34:53 +01:00
Stephan Bergmann
4c13e89d8e Fix compilerplugins/clang/test/consttobool.cxx
...after <https://github.com/llvm/llvm-project/commit/
9ce6dc9872be4081fb98f6161c28581e1cbbe7dc> "CWG1423: don't permit implicit
conversion of nullptr_t to bool."  (Direct-initialization from std::nullptr_t to
bool is allowed in C++17, but it appears that will be dropped from C++20, see
<https://github.com/cplusplus/draft/commit/
df3e38121431afd9adcf7dce725a670a235463ea> "CWG1781 Converting from nullptr_t to
bool in overload resolution", at which point the new check for initialization of
S::b and the res.isNullPointer() branch in ConstToBool::VisitImplicitCastExpr,
compilerplugins/clang/consttobool.cxx, will probably become moot.)

Change-Id: I99773d13d514d5ba5296843592b740ea949b2b1f
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88784
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-16 16:29:41 +01:00
Stephan Bergmann
6476745ac9 Fix loplugin:conststringvar
...after abc0344a234567aee0edcb4523036758d966481d "convert conststringvar plugin
to shared infrastructre", causing errors like

> [C  ] cppuhelper/source/findsofficepath.c
> Assertion failed: (Ctx.getLangOpts().CPlusPlus), function isCXX11ConstantExpr, file llvm/llvm-project/clang/lib/AST/ExprConstant.cpp, line 14567.
> Stack dump:
[...]
> 6  libsystem_c.dylib        0x00007fff7266ca1c abort + 120
> 7  libsystem_c.dylib        0x00007fff7266bcd6 err + 0
> 8  clang                    0x000000010b857ca3 clang::Expr::isCXX11ConstantExpr(clang::ASTContext const&, clang::APValue*, clang::SourceLocation*) const (.cold.2) + 35
> 9  clang                    0x0000000109f7497e clang::Expr::isCXX11ConstantExpr(clang::ASTContext const&, clang::APValue*, clang::SourceLocation*) const + 1022
> 10 plugin.so                0x00000001182741ab loplugin::SharedRecursiveASTVisitorBasic::VisitVarDecl(clang::VarDecl*) + 1051
[...]
> clang-11: error: clang frontend command failed due to signal (use -v to see invocation)

Change-Id: I18c37dba294b0effd85bead8aa6e5679f77502d9
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/88777
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-02-16 14:17:12 +01:00