Noel Grandin
f5e131b2bc
loplugin:unuseddefaultparams in vcl and xmloff
...
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-04 06:13:25 +00:00
Matúš Kukan
5a1cd2f30d
OSingletonRegistration is dead now
...
Change-Id: I64a5ffa8790496bd39ba26e0c789db9eedc51071
Reviewed-on: https://gerrit.libreoffice.org/22788
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Matúš Kukan <matus@libreoffice.org >
2016-03-01 19:36:58 +00:00
Miklos Vajna
4fe23a7972
compilerplugins: fix clang-3.7 build
...
Change-Id: I2d845d3e008cec085ce2b355c9a058363bd021cb
2016-02-29 09:37:33 +01:00
Maxim Monastirsky
7affe26a12
Kill sfx2 menu support
...
Change-Id: I340a066881b1962a4bcd5a2b7d9a0425d8b9557c
2016-02-28 09:10:19 +02:00
Stephan Bergmann
75e24386af
Missed CLANG_VERSION for compilerplugins/clang/store/rtlconstasciimacro.cxx
...
Change-Id: I24d2dc570070a55f39dcd708eb7c47cd71dc0d02
2016-02-26 14:46:23 +01:00
Stephan Bergmann
a2dcac011a
New COMPILER_PLUGINS_CXX to specify compiler to build Clang plugins with
...
...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 14:34:31 +01:00
Stephan Bergmann
af89738d22
-Werror=return-type
...
Change-Id: I44e627fa9de9c48a534cbc9ade6cc9d567553709
2016-02-26 14:34:30 +01:00
Stephan Bergmann
2db16f4bdc
-Werror=return-type
...
Change-Id: I7691fa50d827b688cab299c85c933adabb29994c
2016-02-26 14:34:30 +01:00
Stephan Bergmann
8631cecb86
-Werror=maybe-uninitialized
...
Change-Id: Ib456e717b65c3dce3aaca73b2d55872a53d30828
2016-02-26 14:34:30 +01:00
Stephan Bergmann
34082fa5a8
Silence -Werror=comment about a "multi-line comment"
...
Change-Id: I19f09c7d253bb86bbe3b10083f762a5791e2f370
2016-02-26 14:34:30 +01:00
Stephan Bergmann
01f3b95884
These version checks are about the Clang the plugins are built /against/
...
...not the (Clang) compiler they are being built /with/. (Also simplifies the
checking #if code.)
Change-Id: I416321be4ef4478785be40571f81500fd3b6feb8
2016-02-26 14:34:29 +01:00
Stephan Bergmann
cd2725de90
Revert "compilerplugins: Build them in parallel."
...
This reverts commit 4101fa1841
.
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-26 14:34:29 +01:00
Stephan Bergmann
f467269e1a
That #if for Clang < 3.2 is probably good to go by now
...
Change-Id: I019405884dec5767de733e3fa0114b3b461e777d
2016-02-26 12:05:34 +01:00
Noel Grandin
9c6b6c6c07
turn unuseddefaultparams plugin off by default
...
add fix the method override logic
Change-Id: Ia75bc70aa1b8d26a65a4082956dc88a0fd17be9e
2016-02-25 11:57:47 +02:00
Noel Grandin
4fbf95deba
new loplugin:unuseddefaultparams
...
Change-Id: I2c3e7d66be9e3883ea2801ff394948cc580d1e44
2016-02-25 11:42:35 +02:00
Noel Grandin
e236cc1676
new loplugin:cppunitassertequals
...
look for places we should be calling CPPUNIT_ASSERT_EQUALS instead of
CPPUNIT_ASSERT
Change-Id: Ia836555d569069c6d0dce592f1c9a78bf8d8adb8
2016-02-24 13:35:05 +02:00
Noel Grandin
c45d3badc9
new loplugin: commaoperator
...
Change-Id: I03f24e61f696b7619855e3c7010aa0d874e5a4ff
2016-02-23 08:08:56 +02:00
Noel Grandin
778e9a65bf
new loplugin: find write-only fields
...
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-19 11:23:57 +00:00
Noel Grandin
198f3ec116
loplugin:unusedmethods
...
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-12 06:14:02 +00:00
Stephan Bergmann
5a5dbb31d5
Use rtl::Reference<CppType> instead of HardCppRef<UnoType,CppType>
...
Change-Id: I089b5caca5e05726105f78aeb00db1869d0a17f4
2016-02-09 18:30:54 +01:00
Chris Sherlock
a238b1f8d3
Remove excess newlines
...
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-09 08:18:05 +00:00
Andrea Gelmini
534b2a4b58
Fix typos
...
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-05 06:48:38 +00:00
Stephan Bergmann
39accf65cd
loplugin:fpcomparison: Fix check for floating-point zero
...
...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-04 11:04:04 +01:00
Noel Grandin
4e9b528dcc
new loplugin fpcomparison
...
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-04 06:41:35 +00:00
Noel Grandin
d34d792230
new loplugin to find public methods that can be private
...
based on the unusedmethods plugin, which I should probably rename at
some point
Change-Id: If197423c59d4350ea1fdc69e99d24b631d9751b9
2016-02-01 14:53:19 +02:00
Michael Stahl
f3f305b6a5
compilerplugins: rejoice, for pStaticThesSubMenu is dead
...
Change-Id: I6c7f250af4c1f09feb836aef3c468d97e8266e4b
2016-01-25 12:31:39 +01:00
Noel Grandin
370294f6d1
new loplugin sfxpoolitem
...
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-22 12:14:56 +00:00
Noel Grandin
90d892664a
loplugin: unused return values
...
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-21 07:18:38 +00:00
Caolán McNamara
4ebe249104
drop basebmp entirely now
...
Change-Id: I534848c4be8eadf86b7f31ac742a80982405f56f
2016-01-20 09:43:28 +00:00
Noel Grandin
5fe99ea3ee
loplugin:unusedmethods in sw/
...
Change-Id: Id452bfac5c83f130a138e06984a0c79c37af70ac
2016-01-19 11:01:56 +02:00
Noel Grandin
a7f6efc68b
loplugin: unused return values
...
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-18 12:50:09 +00:00
Stephan Bergmann
75f0f9d553
New loplugin:faileddyncast
...
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 548c43238d
"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
63b67ab5ca
"Use public derivation, and remove
then-unnecessary downcasts")---but not so.
Change-Id: I962ee19820758f9c601f4a292da7f37fa9dff5ce
2016-01-12 15:00:33 +01:00
Noel Grandin
1f9a610de1
loplugin:unusedmethods unused return value in include/editeng
...
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-12 07:39:42 +00:00
Stephan Bergmann
67ec72a381
New loplugin:privatebase
...
...to flag places that implicitly derive a class privately instead of publicly,
where accidental private derivation can cause unexpected failure of
dynamic_cast, cf. 63b67ab5ca
"Use public
derivation, and remove then-unnecessary downcasts."
Change-Id: I4bcd5c79c7e27380c820e2dd072fa4c4e8980078
2016-01-11 13:17:10 +01:00
Noel Grandin
a3f3cead5d
loplugin: unused return values in desktop
...
Change-Id: Iec7a150c6bdb3b25fe24d711e3e453e1d8a5d26e
2016-01-11 11:59:18 +02:00
Noel Grandin
86bb6fdf9c
update unusedmethods loplugin to update unused return values
...
Change-Id: I825d022d09282bc9b6cffd9178e40e4090d335da
2016-01-11 10:49:24 +02:00
Andrea Gelmini
64d624b651
Fix typos
...
Change-Id: I9a5940027423ff0791fa7da0b79b617412ce6b86
Reviewed-on: https://gerrit.libreoffice.org/21209
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Ashod Nakashian <ashnakash@gmail.com >
2016-01-10 14:17:20 +00:00
Andrea Gelmini
597e694e7e
Fix typos
...
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 >
2016-01-07 12:29:04 +00:00
Stephan Bergmann
6bffbf100e
Enable loplugin:nullptr
...
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
2016-01-06 16:48:15 +01:00
Stephan Bergmann
593f3b703c
Re-enable loplugin:sallogareas
...
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
2016-01-06 16:48:15 +01:00
Andrzej Hunt
9d0b06e9f7
new loplugin rangedforcopy - use reference in range based for
...
Inspired by 6e6ae98037
Change-Id: Ia0f264d3a6bbf076aa5080e3398683e50bc6ef01
Reviewed-on: https://gerrit.libreoffice.org/20190
Tested-by: Jenkins <ci@libreoffice.org >
Reviewed-by: Stephan Bergmann <sbergman@redhat.com >
2016-01-05 11:06:52 +00:00
Stephan Bergmann
f44bd6b054
Adapt loplugin:implicitboolconversion to changes in Clang trunk towards 3.8
...
Change-Id: I7841eee5b66a118c52258c0226d73a1139a0df9a
2016-01-05 09:51:29 +01:00
Miklos Vajna
29aec38789
compilerplugins: avoid std::regex_replace
...
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
2015-12-21 17:31:01 +01:00
Noel Grandin
e18b08363a
loplugin:unusedmethods
...
Change-Id: Ifafdaf6da0225f244853a0042a6458643b570623
2015-12-21 10:20:31 +02:00
Noel Grandin
00ea9e5e4e
update constantfunction loplugin
...
Change-Id: I7917e5e17e88868a5e315bce11099d32a07ca39e
2015-12-15 10:40:50 +02:00
Jan Holesovsky
007543f967
sc: Merge ScMultiTextWnd into ScTextWnd.
...
Change-Id: I21ed0e37feec0e7c078c2e284b7f4169f0cff432
2015-12-11 10:43:00 +01:00
Stephan Bergmann
4a1edf626a
More loplugin:nullptr automatic rewrite (within templates)
...
Change-Id: I9bc06cfb5eeb38fd7ae7fb25f876ea9f96e4a65a
2015-12-10 17:34:31 +01:00
Stephan Bergmann
fb8a3fac5d
loplugin:nullptr: More NULL -> nullptr automatic rewrite
...
Change-Id: Ie83819e2bcdc5fa160b39296b005ca9a5ff74b1d
2015-12-10 08:06:06 +01:00
Stephan Bergmann
6fd3f3caad
Missing new file
...
Change-Id: Ie47ffb36f17882da8a78036f7797b2e2bac78eb6
2015-12-09 00:01:47 +01:00
Stephan Bergmann
bb24492c76
More loplugin::TypeCheck use
...
Change-Id: I2f4a26a918134568f541cd45bdcf5a12b1f1d2ee
2015-12-08 22:56:02 +01:00