summaryrefslogtreecommitdiffstats
path: root/compilerplugins
Commit message (Collapse)AuthorAgeFilesLines
* new loplugin: find write-only fieldsNoel Grandin2016-02-193-10/+140
| | | | | | | Change-Id: I0f83939babacf92485420ee63f290a297d7cb717 Reviewed-on: https://gerrit.libreoffice.org/22498 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* loplugin:unusedmethodsNoel Grandin2016-02-121-12/+12
| | | | | | | Change-Id: I0fb06079ff8a9d0b2f5a2929f31846f91391f5c4 Reviewed-on: https://gerrit.libreoffice.org/22229 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* Use rtl::Reference<CppType> instead of HardCppRef<UnoType,CppType>Stephan Bergmann2016-02-091-1/+0
| | | | Change-Id: I089b5caca5e05726105f78aeb00db1869d0a17f4
* Remove excess newlinesChris Sherlock2016-02-095-5/+0
| | | | | | | | | | | | | | | | | | | 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>
* Fix typosAndrea Gelmini2016-02-053-5/+5
| | | | | | | Change-Id: Ice72f8d9971e15dd6ef365e64cd567b8581a92d3 Reviewed-on: https://gerrit.libreoffice.org/21797 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
* loplugin:fpcomparison: Fix check for floating-point zeroStephan Bergmann2016-02-041-7/+5
| | | | | | | | ...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
* new loplugin fpcomparisonNoel Grandin2016-02-041-0/+146
| | | | | | | | | | 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>
* new loplugin to find public methods that can be privateNoel Grandin2016-02-012-28/+131
| | | | | | | based on the unusedmethods plugin, which I should probably rename at some point Change-Id: If197423c59d4350ea1fdc69e99d24b631d9751b9
* compilerplugins: rejoice, for pStaticThesSubMenu is deadMichael Stahl2016-01-251-1/+0
| | | | Change-Id: I6c7f250af4c1f09feb836aef3c468d97e8266e4b
* new loplugin sfxpoolitemNoel Grandin2016-01-221-0/+147
| | | | | | | | | | 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>
* loplugin: unused return valuesNoel Grandin2016-01-211-4/+7
| | | | | | | Change-Id: I4eb1f0c9245c04058fd5e47046f043f8840a79c7 Reviewed-on: https://gerrit.libreoffice.org/21628 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* drop basebmp entirely nowCaolán McNamara2016-01-201-1/+0
| | | | Change-Id: I534848c4be8eadf86b7f31ac742a80982405f56f
* loplugin:unusedmethods in sw/Noel Grandin2016-01-191-15/+13
| | | | Change-Id: Id452bfac5c83f130a138e06984a0c79c37af70ac
* loplugin: unused return valuesNoel Grandin2016-01-181-0/+2
| | | | | | | Change-Id: I9c61a46c57894bc63a57740206c0bcb4a16553af Reviewed-on: https://gerrit.libreoffice.org/21571 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* New loplugin:faileddyncastStephan Bergmann2016-01-121-0/+122
| | | | | | | | | | | | | | | | | | | | | 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
* loplugin:unusedmethods unused return value in include/editengNoel Grandin2016-01-121-21/+36
| | | | | | | Change-Id: I1314480950b0d3a3e5ed066d71c175604dd41970 Reviewed-on: https://gerrit.libreoffice.org/21361 Reviewed-by: Noel Grandin <noelgrandin@gmail.com> Tested-by: Noel Grandin <noelgrandin@gmail.com>
* New loplugin:privatebaseStephan Bergmann2016-01-111-0/+54
| | | | | | | | | ...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
* loplugin: unused return values in desktopNoel Grandin2016-01-111-1/+1
| | | | Change-Id: Iec7a150c6bdb3b25fe24d711e3e453e1d8a5d26e
* update unusedmethods loplugin to update unused return valuesNoel Grandin2016-01-113-12/+79
| | | | Change-Id: I825d022d09282bc9b6cffd9178e40e4090d335da
* Fix typosAndrea Gelmini2016-01-101-1/+1
| | | | | | | Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86 Reviewed-on: https://gerrit.libreoffice.org/21209 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Ashod Nakashian <ashnakash@gmail.com>
* Fix typosAndrea Gelmini2016-01-074-4/+4
| | | | | | | Change-Id: I90b04b8eda6fc3d530c9db72052720cbe9de0343 Reviewed-on: https://gerrit.libreoffice.org/21197 Reviewed-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de> Tested-by: Samuel Mehrbrodt <Samuel.Mehrbrodt@cib.de>
* Enable loplugin:nullptrStephan Bergmann2016-01-061-0/+0
| | | | | | | I had it locally enabled for like a month now, and it did not produce any more noise than any of the other plugins. Change-Id: I94dab702c537969cf32922f6e88b4f5b503cd3f5
* Re-enable loplugin:sallogareasStephan Bergmann2016-01-062-0/+0
| | | | | | | | I had it locally enabled for like a month now, and it did not produce any more noise than any of the other plugins, but quite some amount of malformed area designators had been introduced over time. Change-Id: I642591496bb9338246ba43a3d988481930c087fb
* new loplugin rangedforcopy - use reference in range based forAndrzej Hunt2016-01-051-0/+66
| | | | | | | | | Inspired by 6e6ae9803796b120e95f6e89575e03c5fd0ed3c2 Change-Id: Ia0f264d3a6bbf076aa5080e3398683e50bc6ef01 Reviewed-on: https://gerrit.libreoffice.org/20190 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
* Adapt loplugin:implicitboolconversion to changes in Clang trunk towards 3.8Stephan Bergmann2016-01-051-8/+9
| | | | Change-Id: I7841eee5b66a118c52258c0226d73a1139a0df9a
* compilerplugins: avoid std::regex_replaceMiklos Vajna2015-12-211-2/+15
| | | | | | | My clang 3.7 built against libstdc++ 5.2.1 doesn't seem to have it. We can get away with a non-regex replace all here, though. Change-Id: Iea36311d89acb434c4e4f7c1f9ce876a6ee84f42
* loplugin:unusedmethodsNoel Grandin2015-12-211-1/+1
| | | | Change-Id: Ifafdaf6da0225f244853a0042a6458643b570623
* update constantfunction lopluginNoel Grandin2015-12-151-1/+27
| | | | Change-Id: I7917e5e17e88868a5e315bce11099d32a07ca39e
* sc: Merge ScMultiTextWnd into ScTextWnd.Jan Holesovsky2015-12-111-1/+0
| | | | Change-Id: I21ed0e37feec0e7c078c2e284b7f4169f0cff432
* More loplugin:nullptr automatic rewrite (within templates)Stephan Bergmann2015-12-101-0/+68
| | | | Change-Id: I9bc06cfb5eeb38fd7ae7fb25f876ea9f96e4a65a
* loplugin:nullptr: More NULL -> nullptr automatic rewriteStephan Bergmann2015-12-101-67/+100
| | | | Change-Id: Ie83819e2bcdc5fa160b39296b005ca9a5ff74b1d
* Missing new fileStephan Bergmann2015-12-091-0/+63
| | | | Change-Id: Ie47ffb36f17882da8a78036f7797b2e2bac78eb6
* More loplugin::TypeCheck useStephan Bergmann2015-12-085-116/+80
| | | | Change-Id: I2f4a26a918134568f541cd45bdcf5a12b1f1d2ee
* tdf#96042: 'std::string::find("something") == 0' means "startsWith()".Jan Holesovsky2015-12-081-1/+1
| | | | | | | This should fix a regression from 3bdd176731c351638f541a37b94094124f3c9f52, apparently the cppcheck's advice is misleading. Change-Id: I427ecaa1eb3c9841cb6112997b9b51feda4583d0
* Remove apparently unnecessary checksStephan Bergmann2015-12-081-20/+1
| | | | | | | ...they don't cause any change in behavior, likely they predated Noel's figuring out the template part of containsWindowSubclass Change-Id: I0d5b6bd7f228acef9a0ce1c85fe98fbab89bd7a8
* No, "rtl::Reference<VclStatusListener<Button>> mpStatusListener;" is fineStephan Bergmann2015-12-071-1/+5
| | | | | | | | | | | ...as a member of ImplCommandButtonData (vcl/source/control/button.cxx), no need to falsly warn "OutputDevice subclass 'rtl::Reference<VclStatusListener<Button>>' declared as a pointer member, should be wrapped in VclPtr [loplugin:vclwidgets]" Probably loplugin:vclwidgets should enable shouldVisitTemplateInstantiations() and not try to second-guess whether an OutputDevice can be a template argument. Change-Id: Ia8feb1b1d7504941c35dfbf0aa02dc6a7dd818a0
* loplugin:mergeclasses OOXMLPropertyImpl into OOXMLPropertyNoel Grandin2015-12-071-1/+0
| | | | Change-Id: I1447cfc76c529332450c90a21b6525d3103fe852
* loplugin:mergeclasses, merge OOXMLPropertyImpl into OOXMLPropertyNoel Grandin2015-12-071-1/+0
| | | | Change-Id: I73eb7e664c0a53f135c06c3d8ea450bd9493c780
* loplugin:stringconcat: Also look through O[U]String ctorsStephan Bergmann2015-12-021-3/+32
| | | | Change-Id: I4f07c7c61d324a85f9f5dee0f25a7358facebd41
* loplugin:stringconcat: Handle base case of recursion into left argStephan Bergmann2015-12-021-18/+23
| | | | Change-Id: I9ed8586e8b77b009d55e411fdaa863eefc38b1c2
* loplugin:unusedfieldsNoel Grandin2015-11-301-2/+2
| | | | Change-Id: Icac4ac1a2614e72bc9ff070819533e09eeb1a864
* loplugin:mergeclasses, OOXMLTableImpl into OOXMLTableNoel Grandin2015-11-301-1/+0
| | | | Change-Id: I28f6d317ca02cf23341358f9520de273af603bd7
* loplugin:unusedfields variousNoel Grandin2015-11-261-3/+18
| | | | Change-Id: I18f94269a1172cf195ee402384f7144610e1e82d
* compilerplugins: adapt commentMiklos Vajna2015-11-261-1/+1
| | | | | | | ...after 49c2b9808df8a6b197dec666dfc0cda6321a4306 "bin/rename-sw-abbreviations.sh" Change-Id: Ibd74246403bead8100d181b335f9145013f31e5e
* Adapt whitelisted namesStephan Bergmann2015-11-261-4/+4
| | | | | | | ...after 49c2b9808df8a6b197dec666dfc0cda6321a4306 "bin/rename-sw-abbreviations.sh" Change-Id: I90cec551bdc52ea4d76dd9e32b45692e8a3be70f
* loplugin:unusedfields variousNoel Grandin2015-11-251-1/+2
| | | | Change-Id: I59d9f7f73677358b4ae57efda965d43718bdf0d5
* loplugin:unusedfields in include/sot,include/svl,include/svtoolsNoel Grandin2015-11-251-1/+2
| | | | Change-Id: Ia2dd13c2c48b127ab85311a668fa1f37608d360a
* update unusedfields plugin to use new clang warn_unused attribute supportNoel Grandin2015-11-242-24/+11
| | | | Change-Id: I7b84de29b672e40cbf3c3d340d235f334d2be8cb
* loplugin:unusedfields in vcl/Noel Grandin2015-11-241-1/+5
| | | | | | | | | and remove the unused SALEVENT_MOUSEACTIVATE stuff Change-Id: Ieb85872eca68621c6a7be47ff5dbea12f7690507 Reviewed-on: https://gerrit.libreoffice.org/20140 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
* loplugin:unusedfields in tools/Noel Grandin2015-11-241-1/+2
| | | | Change-Id: Ic460bf42cbcf356cdcebbd5060a0dad3d3caa4ef