summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2020-05-20loplugin:unusedfieldsNoel Grandin
Change-Id: If179d0a13f3c9f7a49e3efe9027a64368ed600a0 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94544 Tested-by: Jenkins Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-19loplugin:constantparamNoel Grandin
Change-Id: Ifa90e9721edeacd4fd78fde968b81aab873e2061 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94497 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-18Adapt compilerplugins/clang/test/writeonlyvars.cxxStephan Bergmann
...to 1d0bc2139759f087d50432f8a2116060676f34e1 "use std::experimental::source_location in uno::Exception" Change-Id: I2b18dbae89c6f219edacba5d147ea265ca83725e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94422 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-18loplugin:unusedfieldsNoel Grandin
Change-Id: I8796c0937fe4b046d9a13e2e50368e45e0e45611 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94404 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-18loplugin:unusedmethodsNoel Grandin
Change-Id: I95391ef6ed5154efc2c7705dde22afa59da24a70 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94403 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-16loplugin:unusedmethodsNoel Grandin
Change-Id: I52187eccf6170f64d38c673a86dc80818813efa6 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94328 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-16loplugin:unusedfieldsNoel Grandin
Change-Id: If0e362cf5b403be63439ec694f3a0e440dfd9bc8 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94327 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-15ReleaseHbFont is unusedCaolán McNamara
LogicalFontInstance dtor does call hb_font_destroy though Change-Id: I59d9711f1934966cddd73c5e62c8929f08b1359a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94335 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com>
2020-05-15loplugin:unnecessaryvirtualNoel Grandin
Change-Id: Ibb37c7e840a32453b1d52854d5f958c0285cd26a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94326 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-14loplugin:unusedfieldsNoel Grandin
Change-Id: I0ec89b56b339f26bb236887c904e6b5d14ceecea Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94136 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-13loplugin:unusedmethodsNoel Grandin
Change-Id: Id813d95a90fdbb360dfc8670c0b55b635f633965 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94125 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-10new loplugin:simplifypointertoboolNoel Grandin
Change-Id: Iff68e8f379614a6ab6a6e0d1bad18e70bc76d76a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/91907 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-08improve loplugin:referencecastingNoel Grandin
to catch a few more cases Change-Id: I0323fba51bb2b4ba255e1db5aa0d890c5c6a2e1b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93726 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-05-06Adapt compilerplugins/clang/test/makeshared.cxx to libc++Stephan Bergmann
...where the relevant types' actual names are std::__1::unique_ptr and std::__1::default_delete Change-Id: I2c364535061691415703d6ff0f58269cdd192a6b Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93576 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-04Adapt test code to Clang 11 trunk changeStephan Bergmann
...<https://github.com/llvm/llvm-project/commit/ 159a9f7e76307734bcdcae3357640e42e0733194> "[AST] Print a<b<c>> without extra spaces in C++11 or later." Change-Id: Ic8a2ab1ee9082e150cf0ebe1f6538a1a1deb7853 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93409 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-05-01improve loplugin:makesharedNoel Grandin
to find places where we are converting stuff to unique_ptr instead of using std::make_shared. As a bonus, this tends to find places where we are using shared_ptr where we can instead be using unique_ptr avoiding the locking overhead. Change-Id: I1b57bbc4a6c766b48bba8e25a55161800e149f62 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93207 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2020-04-30Fix typosAndrea Gelmini
Change-Id: I8d0e10b08393b7752d55298e0e1ba64e5fd6c422 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/93083 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Jenkins
2020-04-28Silence loplugin:cppunitassertequals when comparing pointer against nullptrStephan Bergmann
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-25convert excel filter in calc from shared_ptr to rtl::ReferenceNoel Grandin
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-25loplugin:constantparamNoel Grandin
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-25loplugin:unusedmethodsNoel Grandin
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-24loplugin:unnecessaryvirtualNoel Grandin
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-24loplugin:unusedmethodsNoel Grandin
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-23Drop Macromedia Flash export filterGabor Kelemen
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-23Fix typoAndrea Gelmini
Change-Id: I07f828e8a17de03cf15639df8afa0adf5dcaebba Reviewed-on: https://gerrit.libreoffice.org/c/core/+/92246 Tested-by: Jenkins Reviewed-by: Julien Nabet <serval2412@yahoo.fr>
2020-04-21weld FontNameBoxCaolán McNamara
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-20compilerplugins: fix building against baseline clang (5.0.2)Miklos Vajna
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-17improve failure mode in flatten lopluginNoel Grandin
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-15Related tdf#130778: New About dialogHeiko Tietze
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-14loplugin:buriedassign in c*Noel Grandin
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-11Adapt loplugin:unnecessaryparen to C++20 CXXRewrittenBinaryOperatorStephan Bergmann
...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-08loplugin:flatten in i18npoolNoel Grandin
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-07new loplugin:unusedvariableplusNoel Grandin
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-06remove newly unused stuffCaolán McNamara
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-03loplugin:finalclasses in xmlsecurity..UnoControlsNoel Grandin
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-03loplugin:constantparamNoel Grandin
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-03loplugin:singlevalfieldsNoel Grandin
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-03loplugin:unusedfieldsNoel Grandin
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-03loplugin:unnecessaryvirtualNoel Grandin
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-02loplugin:virtualdeadNoel Grandin
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-02loplugin:unusedmethodsNoel Grandin
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-03-28Fix is_typed_flags for BrowseMode (compilerplugins)Julien Nabet
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-26Extend loplugin:cstylecast to certain function-style castsStephan Bergmann
...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-23Fix typosAndrea Gelmini
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-19loplugin:redundantpointerops add some more smart pointer typesNoel Grandin
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-10Deref of DynTypedNode* must not outlive owning DynTypedNodeListStephan Bergmann
Change-Id: I8ac4a2f1e442446384b88f38bdef21644409f8a2 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90303 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2020-03-09compilerplugins: remove unused getDeclContext()Miklos Vajna
Change-Id: I523cc2195be5f200b3e416d1ec3b282e3245ebbb Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90214 Tested-by: Jenkins Reviewed-by: Miklos Vajna <vmiklos@collabora.com>
2020-03-09Add --disable-compiler-plugins-analyzer-pch for Jenkins/linux_clang_dbgutil_64Stephan Bergmann
<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-09improve loplugin:unusedfieldsNoel Grandin
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-06loplugin:unusedmethodsNoel Grandin
Change-Id: I698981490eb1391930cdd06821a80a5f770e000e Reviewed-on: https://gerrit.libreoffice.org/c/core/+/90109 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>