summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2018-11-22remove unused broadcast_type enumNoel Grandin
Change-Id: I2939928e393ef2e306e840488053ca50957c10ce Reviewed-on: https://gerrit.libreoffice.org/63742 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-22convert INetURLObject::PrefixInfo::Kind to scoped enumNoel Grandin
and drop unused ALIAS Change-Id: Ifc0c6aba681bb166c515380ebb1b0f45d232d2d2 Reviewed-on: https://gerrit.libreoffice.org/63741 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-22convert LineType to scoped enumNoel Grandin
and remove unused LINE_HORIZONTAL Change-Id: I39ee05b444b4da46758ff30176e041a02bee54e8 Reviewed-on: https://gerrit.libreoffice.org/63740 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-22convert SalRGB to scoped enumNoel Grandin
and remove unused values Change-Id: Id10c18e832d54a6e530c3fe197b230d2d511d79c Reviewed-on: https://gerrit.libreoffice.org/63739 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-22loplugin:unusedenumconstants in EEControlBitsNoel Grandin
(*) remove effectivly unused enum constants (*) tweak the plugins heuristics some more to remove false+ in this enum (*) twweak the python post-processing step to avoid a KeyError Change-Id: I2943ec94c00f71dcd049f5c9ef33db259c005ba3 Reviewed-on: https://gerrit.libreoffice.org/63709 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-21weld 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>
2018-11-21Linkage::ModuleLinkage was only introduced in Clang 5Stephan Bergmann
Change-Id: Ib27908cba00ca120b3bd2ea1dc291c29120a27a4 Reviewed-on: https://gerrit.libreoffice.org/63705 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-21loplugin:redundantfcast improvementsNoel Grandin
check for calls to constructors, and extend the list of types we check for unnecessary temporary creation Change-Id: Ia2c1f202b41ed6866779fff5343c821128033eec Reviewed-on: https://gerrit.libreoffice.org/63472 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-21loplugin, remove unnecessary filtering in post-processingNoel Grandin
removing things that point to the same source location is only really necessary for the method-based analyses, the other's dont need it, and it can hide stuff we are interested in Change-Id: Ib5c3b4c2ed4011c158a199fcd08096285976b831
2018-11-20loplugin:unusedenumconstants improvementsNoel Grandin
add some unit tests, and improve the heuristics Change-Id: I95aa97a87e178ce8d506bd245710d0ae66ad08a4 Reviewed-on: https://gerrit.libreoffice.org/63647 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
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>
2018-11-19Take array-to-pointer decay into account in loplugin:redundantcastStephan Bergmann
Change-Id: I3c5bace180605d1a72a74feb1bf9f9b184a16d83 Reviewed-on: https://gerrit.libreoffice.org/63545 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2018-11-19loplugin:constantparamNoel Grandin
Change-Id: Ifc2a8db82bd8bb508bce7f226e2cb499d1e6f6f8 Reviewed-on: https://gerrit.libreoffice.org/63492 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2018-11-19loplugin:singlevalfieldsNoel Grandin
Change-Id: If21bdaa8431a4d40bbf70a6e9a119d77a3596012 Reviewed-on: https://gerrit.libreoffice.org/63487 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
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>