summaryrefslogtreecommitdiff
path: root/compilerplugins
AgeCommit message (Collapse)Author
2016-03-23constantparam loplugin improvementsNoel Grandin
clean up the python code, filter out setter methods Change-Id: I8294dd305a30708cf0e81c5328935ec8f6cdc8d4 Reviewed-on: https://gerrit.libreoffice.org/23466 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-20Ambiguity between clang:: and llvm::PointerTypeStephan Bergmann
Change-Id: I2727ef17b9ab780c608878aaca9ce0fda01b9c22
2016-03-16loplugin:constantparams in vcl/Noel Grandin
also some improvements to the plugin Change-Id: I0e3a519d70756e577fcb1bd47dd66864b5b4c871 Reviewed-on: https://gerrit.libreoffice.org/23289 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-15loplugin:constantparamNoel Grandin
Change-Id: I270e068b3c83e966e741b0a072fecce9d92d53f5
2016-03-11tdf#97966: Remove 'static' keywordsWastack
Change-Id: Id991cead4f01830eafd9cf8dd63b519ef07c9451 Reviewed-on: https://gerrit.libreoffice.org/23134 Reviewed-by: Stephan Bergmann <sbergman@redhat.com> Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-03-10MenuDispatcher::m_pMenuManager is always nullptrMaxim Monastirsky
... as shown by 7da15debe39b50255cc08b3fef7ae38185a9174f. Which means that MenuManager is unused, and MenuDispatcher does nothing useful. Change-Id: Ic85619531054a573d971d38b52609e1cbcaf780c Reviewed-on: https://gerrit.libreoffice.org/23117 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
2016-03-08Extract checking code to its own check.cxxStephan Bergmann
Change-Id: I9d5b14c374ce62ac7b970faa30c38a5a76568ed4
2016-03-08TODO: Work around loplugin:salbool in cppu/source/uno/data.cxx for nowStephan Bergmann
Change-Id: I1730c09669426e049aba941ef27341581ce31887
2016-03-08new loplugin:constantparamNoel Grandin
finds parameters that are only ever being called with a single value Change-Id: Ibd0c9b6e6dbc1d1b5d5a005eaa19959560a6e50f
2016-03-07loplugin:unuseddefaultparamsNoel Grandin
Change-Id: Ia414f7845425ef73859ed04853378e96cc738795 Reviewed-on: https://gerrit.libreoffice.org/22971 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-07improve defaultparams lopluginNoel Grandin
to catch calling params with defaults like "= OUSString()" Change-Id: Iad060e318ed492c22f8be44e326174fe6d28fff9 Reviewed-on: https://gerrit.libreoffice.org/22932 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-07loplugin:unuseddefaultparam in variousNoel Grandin
Change-Id: I03d7381aad055cbe9bd905e4082586073f4112e0 Reviewed-on: https://gerrit.libreoffice.org/22900 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-05fix crash in cppunitassertequals pluginMarkus Mohrhard
Change-Id: I0427c70aa3a7f55aba4bbe0fe571aab08596541a Reviewed-on: https://gerrit.libreoffice.org/22922 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
2016-03-04loplugin:unuseddefaultparam in oox/reportdesign/sdNoel Grandin
Change-Id: Ia26cf182ddc7c903d86bf74a8175858adb88121c
2016-03-04loplugin:unuseddefaultparam in toolsNoel Grandin
Change-Id: I027f4d53e3aa793bd61bf110899e464a9b6430ec Reviewed-on: https://gerrit.libreoffice.org/22891 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-04loplugin:unuseddefaultparam in sfx2Noel Grandin
and fix an issue with calls to templated methods in the plugin Change-Id: I9c9537a0690ff671286c007846d5f4cfb7d2982b
2016-03-04loplugin:unuseddefaultparams in vcl and xmloffNoel Grandin
and teach the plugin about code that takes the address of a function Change-Id: Ia9d5afef44520aca236659e8176f1e27135ef4fc Reviewed-on: https://gerrit.libreoffice.org/22861 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-03-01OSingletonRegistration is dead nowMatúš Kukan
Change-Id: I64a5ffa8790496bd39ba26e0c789db9eedc51071 Reviewed-on: https://gerrit.libreoffice.org/22788 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Matúš Kukan <matus@libreoffice.org>
2016-02-29compilerplugins: fix clang-3.7 buildMiklos Vajna
Change-Id: I2d845d3e008cec085ce2b355c9a058363bd021cb
2016-02-28Kill sfx2 menu supportMaxim Monastirsky
Change-Id: I340a066881b1962a4bcd5a2b7d9a0425d8b9557c
2016-02-26Missed CLANG_VERSION for compilerplugins/clang/store/rtlconstasciimacro.cxxStephan Bergmann
Change-Id: I24d2dc570070a55f39dcd708eb7c47cd71dc0d02
2016-02-26New COMPILER_PLUGINS_CXX to specify compiler to build Clang plugins withStephan Bergmann
...instead of trying to second-guess what to strip off $(CXX) to make it fit. Keep the old way for existing build scripts that rely on it. Change-Id: I145bdcba6d02002a9b653b4deb6e7f5a9c76cc8f
2016-02-26-Werror=return-typeStephan Bergmann
Change-Id: I44e627fa9de9c48a534cbc9ade6cc9d567553709
2016-02-26-Werror=return-typeStephan Bergmann
Change-Id: I7691fa50d827b688cab299c85c933adabb29994c
2016-02-26-Werror=maybe-uninitializedStephan Bergmann
Change-Id: Ib456e717b65c3dce3aaca73b2d55872a53d30828
2016-02-26Silence -Werror=comment about a "multi-line comment"Stephan Bergmann
Change-Id: I19f09c7d253bb86bbe3b10083f762a5791e2f370
2016-02-26These version checks are about the Clang the plugins are built /against/Stephan Bergmann
...not the (Clang) compiler they are being built /with/. (Also simplifies the checking #if code.) Change-Id: I416321be4ef4478785be40571f81500fd3b6feb8
2016-02-26Revert "compilerplugins: Build them in parallel."Stephan Bergmann
This reverts commit 4101fa184150663ddee6688c19eb4a44e341e8d4. Just configure --without-parallelism and always use an explicit make -jN, and be done with it. I just can't stand that "make[1]: Entering/Leaving directory" noise around each "[build CXX] compilerplugins/clang/*.cxx" line any more.
2016-02-26That #if for Clang < 3.2 is probably good to go by nowStephan Bergmann
Change-Id: I019405884dec5767de733e3fa0114b3b461e777d
2016-02-25turn unuseddefaultparams plugin off by defaultNoel Grandin
add fix the method override logic Change-Id: Ia75bc70aa1b8d26a65a4082956dc88a0fd17be9e
2016-02-25new loplugin:unuseddefaultparamsNoel Grandin
Change-Id: I2c3e7d66be9e3883ea2801ff394948cc580d1e44
2016-02-24new loplugin:cppunitassertequalsNoel Grandin
look for places we should be calling CPPUNIT_ASSERT_EQUALS instead of CPPUNIT_ASSERT Change-Id: Ia836555d569069c6d0dce592f1c9a78bf8d8adb8
2016-02-23new loplugin: commaoperatorNoel Grandin
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
2016-02-19new loplugin: find write-only fieldsNoel Grandin
Change-Id: I0f83939babacf92485420ee63f290a297d7cb717 Reviewed-on: https://gerrit.libreoffice.org/22498 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-12loplugin:unusedmethodsNoel Grandin
Change-Id: I0fb06079ff8a9d0b2f5a2929f31846f91391f5c4 Reviewed-on: https://gerrit.libreoffice.org/22229 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-09Use rtl::Reference<CppType> instead of HardCppRef<UnoType,CppType>Stephan Bergmann
Change-Id: I089b5caca5e05726105f78aeb00db1869d0a17f4
2016-02-09Remove excess newlinesChris Sherlock
A ridiculously fast way of doing this is: for i in $(pcregrep -l -M -r --include='.*[hc]xx$' \ --exclude-dir=workdir --exclude-dir=instdir '^ {3,}' .) do perl -0777 -i -pe 's/^ {3,}/ /gm' $i done Change-Id: Iebb93eccbee9e4fc5c4380474ba595858a27ac2c Reviewed-on: https://gerrit.libreoffice.org/22224 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-02-05Fix typosAndrea Gelmini
Change-Id: Ice72f8d9971e15dd6ef365e64cd567b8581a92d3 Reviewed-on: https://gerrit.libreoffice.org/21797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
2016-02-04loplugin:fpcomparison: Fix check for floating-point zeroStephan Bergmann
...so that isZeroConstant doesn't trigger an assert inside Clang's isCXX11ConstantExpr when expr is sizeof(x) with x being dependent on a template argument. Change-Id: I6bab46e64cc085d597db25994d8bfdc66417fe83
2016-02-04new loplugin fpcomparisonNoel Grandin
Find code that compares floating point values with == or != It should rather use rtl::math::approxEqual Change-Id: I9026e08823340fa1d6a042c430515344c93215bd Reviewed-on: https://gerrit.libreoffice.org/21997 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-02-01new loplugin to find public methods that can be privateNoel Grandin
based on the unusedmethods plugin, which I should probably rename at some point Change-Id: If197423c59d4350ea1fdc69e99d24b631d9751b9
2016-01-25compilerplugins: rejoice, for pStaticThesSubMenu is deadMichael Stahl
Change-Id: I6c7f250af4c1f09feb836aef3c468d97e8266e4b
2016-01-22new loplugin sfxpoolitemNoel Grandin
generates a warning about subclasses that add members but do not override operator==() Change-Id: If6df1a2cbd115f17bcca22f9b7995181dcf55c03 Reviewed-on: https://gerrit.libreoffice.org/20468 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Michael Stahl <mstahl@redhat.com>
2016-01-21loplugin: unused return valuesNoel Grandin
Change-Id: I4eb1f0c9245c04058fd5e47046f043f8840a79c7 Reviewed-on: https://gerrit.libreoffice.org/21628 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-20drop basebmp entirely nowCaolán McNamara
Change-Id: I534848c4be8eadf86b7f31ac742a80982405f56f
2016-01-19loplugin:unusedmethods in sw/Noel Grandin
Change-Id: Id452bfac5c83f130a138e06984a0c79c37af70ac
2016-01-18loplugin: unused return valuesNoel Grandin
Change-Id: I9c61a46c57894bc63a57740206c0bcb4a16553af Reviewed-on: https://gerrit.libreoffice.org/21571 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-12New loplugin:faileddyncastStephan Bergmann
Offline discussion about tdf#96067 "Crash on undo row inserts" brought up the idea to warn about cases where uses of dynamic_cast are statically knwon to always fail. Clang's clang::AST::CXXDynamicCastExpr::isAlwaysNull already implements such a check, reporting true if the casted-from class is final, but has two issues: For one, it does not work for template code, when one of the involved types is a template parameter type (so e.g., DestType->castAs<PointerType>() can crash). For another, it misses the opportunity to report true if the casted-to type is final and only derives from the casted-from type non-publicly. My hope was that this, after the "final" decorations in 548c43238d02b34cf73e7c2ca1a912ee4fe82544 "Mark some classes as final," might turn up the culprit of tdf#96067 (with a scenario similar to the failed dynamic_cast on private derivation in 63b67ab5cab8cf7576a68cabe5fb1a42c6ad800c "Use public derivation, and remove then-unnecessary downcasts")---but not so. Change-Id: I962ee19820758f9c601f4a292da7f37fa9dff5ce
2016-01-12loplugin:unusedmethods unused return value in include/editengNoel Grandin
Change-Id: I1314480950b0d3a3e5ed066d71c175604dd41970 Reviewed-on: https://gerrit.libreoffice.org/21361 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
2016-01-11New loplugin:privatebaseStephan Bergmann
...to flag places that implicitly derive a class privately instead of publicly, where accidental private derivation can cause unexpected failure of dynamic_cast, cf. 63b67ab5cab8cf7576a68cabe5fb1a42c6ad800c "Use public derivation, and remove then-unnecessary downcasts." Change-Id: I4bcd5c79c7e27380c820e2dd072fa4c4e8980078