summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2019-03-04do not call GetFormatTable() from GetNonThreadedContext() (tdf#121949)Luboš Luňák
ScDocument dtor calls ClearLookupCaches(), which calls GetNonThreadedContext(). But ScDocument instances used for copy&paste GetFormatTable() fails on null mxPoolHelper, because ScDocument ctor doesn't set it in such a case. So set up the pointer in ScInterpreterContext on demand only if actually needed. Change-Id: If3811da5bb00a2d7d404c089ee1bf46037a2cddb Reviewed-on: https://gerrit.libreoffice.org/68350 Tested-by: Jenkins Reviewed-by: Michael Meeks <michael.meeks@collabora.com> (cherry picked from commit b5c3f38cb8d4121e3303be362e0757d3d3431059) Reviewed-on: https://gerrit.libreoffice.org/68539
2019-01-08Bump copyright year to 2019Adolfo Jayme Barrientos
Change-Id: I0d49ec7db57a0f7d18489dad61e86cbfdf4418cd (cherry picked from commit 588dc2808c79da714cc107548631a65a7ddfe5d0) Reviewed-on: https://gerrit.libreoffice.org/65957 Tested-by: Jenkins Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
2018-12-12weld SwCaptionOptPageCaolán McNamara
Change-Id: I3373a39d6d8b39717b7aec69544a9d2957db15d8 Reviewed-on: https://gerrit.libreoffice.org/65043 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-22weld SwCondCollPageCaolán McNamara
and put back original SvTreeListBox a11y factory use Change-Id: I4ad8ce29d8fed6ec5d44e9a1d641919a89226b79 Reviewed-on: https://gerrit.libreoffice.org/63501 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com> (cherry picked from commit 47897fdd936d9b6e9ac8cb6110c79352ab080df7) Reviewed-on: https://gerrit.libreoffice.org/63770
2018-11-20Fix loplugin:staticconstfieldStephan Bergmann
...(ExprWithCleanups around the CXXConstructExpr in initializers for members of O[U]String type, with older Clang, as used in compilerplugins/clang/test/staticconstfield.cxx), and thus revert e3e8d52625c2dc7a277a955d4ae2ad10c60c5f1b "Temporarily disable compilerplugins/clang/test/staticconstfield" again. Change-Id: Ic5fcdd1a26e4a6810369e4f9d909200d25feb12e Reviewed-on: https://gerrit.libreoffice.org/63628 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com> (cherry picked from commit b0e819bbc0b3ff20de04f31b593f7d5213659045) Reviewed-on: https://gerrit.libreoffice.org/63657 Tested-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-17remove unused IS_TRAVELSELECTNoel Grandin
Change-Id: I2651b28ec52a001b67cdb3b2d88e8bca0eeb7790 Reviewed-on: https://gerrit.libreoffice.org/63493 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-11-17Adapt to C++2a char_tStephan Bergmann
u8 literals incompatibly change their type (as implemented by recent Clang trunk) Change-Id: Ia4f7b91f5d86656a056303d2754981ab2093a739 Reviewed-on: https://gerrit.libreoffice.org/63494 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-17drop unused SvTreeListBoxFlags::IS_EXPANDINGCaolán McNamara
Change-Id: I60ecf3b157cad3ebc58b6349690eccc0fedbd26a Reviewed-on: https://gerrit.libreoffice.org/63482 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-17loplugin:unusedmethodsNoel Grandin
most of the removal is ripple effect from removing SvxIconChoiceCtrl_Impl::EditEntry which became dead after commit 630b5db9a10cd49d24d5e563374bd68f1fe670f5 Date: Tue Nov 13 08:40:07 2018 +0200 loplugin:singlevalfields in svtools Change-Id: Ibfaa7c925cc5549a4858cc62c59d848aab72f460 Reviewed-on: https://gerrit.libreoffice.org/63481 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-16new loplugin buriedassignNoel Grandin
Change-Id: If6dd8033daf2103a81c3a7c3a44cf1e38d0a3744 Reviewed-on: https://gerrit.libreoffice.org/63466 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-16loplugin:staticmethods improvementNoel Grandin
Change-Id: I8889ce8a7d2309b54454cfe4c6421282e1c6e755 Reviewed-on: https://gerrit.libreoffice.org/63434 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-14make ScInterpreterContext also accessible without passing it aroundLuboš Luňák
E.g. ScModelObj::GetFormatter() can be rather deep in the call chain and it just doesn't make sense to pass ScInterpreterContext* to all the relevant places (and it's a question if it makes sense to pass it around at all, googling shows that thread_local is not really _that_ slow). Change-Id: I9114ef8a10d82a10968391718099edccde7a2663 Reviewed-on: https://gerrit.libreoffice.org/63184 Tested-by: Jenkins Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
2018-11-14"oh dear, what can the matter be?"Stephan Bergmann
Lets assume that e3290499009492e39e5ddd870d314bb5df494199 "loplugin singlevalfields improvement" enabled loplugin:singlevalfields by accident. (It fails miserably for me.) Change-Id: Id308a17469babae195fa8261d937036b0cc39ff0
2018-11-13loplugin singlevalfields improvementNoel Grandin
checking for casting to void* turns out to mask useful stuff, so remove that and just deal with a few extra false+ Change-Id: Id9700d7ceda90ba8fdb38aa870f13a7ca3acb668 Reviewed-on: https://gerrit.libreoffice.org/63145 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-12Adapt to new ConstantExpr in Clang trunk towards Clang 8Stephan Bergmann
After <https://reviews.llvm.org/D53921> "Compound literals, enums, et al require const expr" (making use of ConstantExpr recently introduced with <https://reviews.llvm.org/D53475> "Create ConstantExpr class", CompilerTest_compilerplugins_clang started to fail with > [CPT] compilerplugins/clang/test/unnecessaryparen.cxx > error: 'error' diagnostics expected but not seen: > File /data/sbergman/lo-clang2/core/compilerplugins/clang/test/unnecessaryparen.cxx Line 35: parentheses immediately inside case statement [loplugin:unnecessaryparen] > error: 'error' diagnostics seen but not expected: > File /data/sbergman/lo-clang2/core/compilerplugins/clang/test/unnecessaryparen.cxx Line 35: unnecessary parentheses around identifier [loplugin:unnecessaryparen] > 2 errors generated. Change-Id: Iebcfcd9af30e26df02819fbffb105599fa6a1701 Reviewed-on: https://gerrit.libreoffice.org/63285 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-09loplugin:useuniqueptr extend to checking more local var deletesNoel Grandin
Change-Id: I5da0f6ecd2577e92e679ed26dd42629dbac4afd4 Reviewed-on: https://gerrit.libreoffice.org/63132 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-08loplugin:unusedfieldsNoel Grandin
Change-Id: Id16846c19c57ec437a64146d0fa771c1bfc05135 Reviewed-on: https://gerrit.libreoffice.org/63028 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-08loplugin:unusedmethodsNoel Grandin
Change-Id: Id5cddc6d85e227f18d10d7af6a8d4b25c40ab9f3 Reviewed-on: https://gerrit.libreoffice.org/63026 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-08loplugin:constantparamNoel Grandin
Change-Id: I593ccc2fb43321caf3ff64d0c348b1bac742ad18 Reviewed-on: https://gerrit.libreoffice.org/63025 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-07new loplugin readability-redundant-ppNoel Grandin
code originally from vmiklos, copied from dev-tools repo Change-Id: Iadc2388fec888dde38cb4d59c78691dc1ea94c09 Reviewed-on: https://gerrit.libreoffice.org/62983 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-06new loplugin collapseifNoel Grandin
Look for nested if statements with relatively small conditions, where they can be collapsed into one if statement. Change-Id: I7d5d4e418d0ce928991a3308fc88969c00c0d0f2 Reviewed-on: https://gerrit.libreoffice.org/62898 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-27loplugin:unusedmethodsNoel Grandin
Change-Id: I66ef078794ed1eb44dbfa854c589545e5f9ba78e Reviewed-on: https://gerrit.libreoffice.org/62407 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2018-10-26loplugin:singlevalfields improvementNoel Grandin
look for any kind of types, not just POD types, helps to find smart pointer fields that are only assigned nullptr Change-Id: I2d887e98db012f03b646e1023985bcc196285abc Reviewed-on: https://gerrit.libreoffice.org/62382 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-26loplugin:unusedfieldsNoel Grandin
Change-Id: I36d3e874aac2d57d4e6f24a0e89c9836704bb7a6 Reviewed-on: https://gerrit.libreoffice.org/62383 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-23loplugin:useuniqueptr more exclusionsNoel Grandin
Change-Id: I70c6d4af999965497e23ec8180eb08aa6dc648c5 Reviewed-on: https://gerrit.libreoffice.org/62221 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-22loplugin:staticvar ignore rtfkeywd.cxx for nowNoel Grandin
Change-Id: I2bd26bcad94aa905f0c87d92b43561855409e330
2018-10-22Disable loplugin:staticvar for nowStephan Bergmann
produces false positive > [CXX] svtools/source/svrtf/rtfkeywd.cxx > /home/sbergman/lo/core/svtools/source/svrtf/rtfkeywd.cxx:38:23: error: var should be const, or whitelisted [loplugin:staticvar] > static RTF_TokenEntry aRTFTokenTab[] = { > ~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ Change-Id: I7cd96988218d1192ced2fadff911c7ec89088012
2018-10-22loplugin:staticvar ignore this case for nowNoel Grandin
Change-Id: Ic0e5e113ff16dbb3fb246c52f5a2fee8d9f52304
2018-10-22loplugin:unusedfields improvemementsNoel Grandin
treat fields touched in operator== as not being important, which finds some more stuff (but also adds some false+) Change-Id: I3f5d504d7dec7945a917afbcd58c92df74f03645 Reviewed-on: https://gerrit.libreoffice.org/62020 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-22loplugin:staticvar in variousNoel Grandin
looks for variables that can be declared const and static i.e. they can be stored in the read-only linker segment and shared between different processes Change-Id: I8ddc6e5fa0f6b10d80c75d5952df8ddd311cf892 Reviewed-on: https://gerrit.libreoffice.org/61591 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-22loplugin:singlevalfields look for fields that can be boolNoel Grandin
Change-Id: Ief773b661a8378a10db56943b32127c7a2c86d11 Reviewed-on: https://gerrit.libreoffice.org/62037 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17new loplugin staticvarNoel Grandin
looks for variables that can be declared const and static i.e. they can be stored in the read-only linker segment and shared between different processes Change-Id: I577fb2070604003e56fb44f8a02c9684070311cf Reviewed-on: https://gerrit.libreoffice.org/61817 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-17loplugin:singlevalfieldsNoel Grandin
tighten up the handling of binary operators Change-Id: I262ec57bf7142fa094d240738150a94d83fd15ee Reviewed-on: https://gerrit.libreoffice.org/61777 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15loplugin:staticconstfield improvementsNoel Grandin
And fix ScXMLCachedRowAttrAccess::Cache which was never setting its mnTab field, and hence would never be hit. And fix oox::xls::CellBlockBuffer, which was never setting mnCurrRow. Change-Id: I2c46aa050b9ebe3c2dc2e52579555f97945dd61c Reviewed-on: https://gerrit.libreoffice.org/61772 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15Relicense LoopVarTooSmall plugin to use LLVM licenseTamás Zolnai
Change-Id: I9e8cf6d7c2474f8c4c624dd9040890997c43f788 Reviewed-on: https://gerrit.libreoffice.org/61789 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-10-15Add the already referenced LICENSE.TXT with the LLVM licenseTamás Zolnai
From: https://opensource.org/licenses/UoI-NCSA.php Change-Id: I81dc98ec532e3cd6787abc491d81346fae87c087 Reviewed-on: https://gerrit.libreoffice.org/61793 Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com> Tested-by: Tamás Zolnai <tamas.zolnai@collabora.com>
2018-10-15loplugin:constantparamNoel Grandin
Change-Id: I895ceffa468d84d22e4a81b7a6b06eaed0bd839d Reviewed-on: https://gerrit.libreoffice.org/61776 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15loplugin:unusedfieldsNoel Grandin
Change-Id: I4ebd1e89daf7ba5e6ab709f56c0fec5b49f50dd0 Reviewed-on: https://gerrit.libreoffice.org/61774 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15loplugin:unusedmethodsNoel Grandin
Change-Id: I0226d33cbe224519cf2ed9ea5143ffe68fdbc884 Reviewed-on: https://gerrit.libreoffice.org/61775 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-15loplugin:constfields in ooxNoel Grandin
Change-Id: I1e110d193ebfa30ab1ab0d85bfb6dc409e341439 Reviewed-on: https://gerrit.libreoffice.org/61728 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-12loplugin:constfields in reportdesign,sal,saxNoel Grandin
and improve the rewriter so I spend less time fixing formatting Change-Id: Ic2a6e5e31a5a202d2d02a47d77c484a57a5ec514 Reviewed-on: https://gerrit.libreoffice.org/61676 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-10Fix failure of loplugin:useuniqueptr with older compilersStephan Bergmann
...where CompilerTest_compilerplugins_clang failed in compilerplugins/clang/test/useuniqueptr.cxx due to Foo24's HTMLAttrs::const_iterator it = m_aSetAttrTab.begin(); and either the old compiler lacked Clang's recent <https://reviews.llvm.org/D50666> "Fix Stmt::ignoreImplicit" (and the above initialization expression happens to include a CXXBindTemporaryExpr, at least with libstdc++), or an even older compiler was used in pre-C++17 mode, so the above initialization expression happens to include an elidable CXXConstructExpr copy constructor call. Change-Id: I757a9ad76829e399b4fe2da1c82863909b8c9657 Reviewed-on: https://gerrit.libreoffice.org/61531 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-09Extend loplugin:redundantinline to catch inline functions w/o external linkageStephan Bergmann
...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>
2018-10-09loplugin:unusedmethodsNoel Grandin
Change-Id: Icd7a0f9909f36363b307b4fe7ee920183881afbb Reviewed-on: https://gerrit.libreoffice.org/61576 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-09loplugin:unusedfieldsNoel Grandin
Change-Id: Iacce8e12a85f857192dc0520b795e1990a3612db Reviewed-on: https://gerrit.libreoffice.org/61575 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-08Fix loplugin:useuniqueptr for libc++ (macOS)Stephan Bergmann
...after 05a337e297eb0cfe88c99503d760bd9eaf495b7d "loplugin:useuniqueptr look for deleting in loops with iterators", where it didn't emit the warning for Foo24 in compilerplugins/clang/test/useuniqueptr.cxx during CompilerTest_compilerplugins_clang, because in the initialization of HTMLAttrs::const_iterator it = m_aSetAttrTab.begin(); the HTMLAttrs::const_iterator CXXConstructExpr happens to have a second, defaulted argument. Change-Id: I882a6dfb5cab1b147f790072f2545b13172c0f9a Reviewed-on: https://gerrit.libreoffice.org/61530 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-10-08compilerplugins: the useuniqueptr clang plugin test fails on 5.0.1Miklos Vajna
I'm not sure what is the first version that passes it, let's go with 6.0 for now. Change-Id: I7a150fbc2a722a6a47d91de4b00893303add5cc8
2018-10-06Fix typoAndrea Gelmini
Change-Id: I822fa325d37955583a21e4d7ce2e79a4d5b02fc5 Reviewed-on: https://gerrit.libreoffice.org/61462 Reviewed-by: Julien Nabet <serval2412@yahoo.fr> Tested-by: Julien Nabet <serval2412@yahoo.fr>
2018-10-05loplugin:useuniqueptr look for deleting in loops with iteratorsNoel Grandin
Change-Id: I0e5bf671ee11265c0afa8770430ec9e064e05fe3 Reviewed-on: https://gerrit.libreoffice.org/61402 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-10-03loplugin:unusedmethodsNoel Grandin
Change-Id: I9e583df920657ab401162db79decb192c4f69f90 Reviewed-on: https://gerrit.libreoffice.org/61283 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>