Stephan Bergmann
3d081a3f4d
Just don't bother with Clang <= 3.6
...
...where Preprocessor::macros and Preprocessor::getLocalMacroDirectiveHistory
would need to be done slightly differently
Change-Id: Id46b05ac42012597c91a556b17ed008b6c7c5912
2016-04-25 17:27:13 +02:00
Stephan Bergmann
3ae1e17401
loplugin:reservedid
...
Change-Id: Ifa75d3f228db87f7a899612964bf08e9573fb5be
2016-04-22 16:36:50 +02:00
Stephan Bergmann
a57049915d
Avoid reserved identifiers
...
Change-Id: I263603fb81d368ebc8450b2d8cc01752fcd3f29d
2016-04-22 10:13:56 +02:00
Stephan Bergmann
85825e0fd5
Avoid reserved identifiers
...
Change-Id: I27ff0f4f0eb395d7e0a60dd604758c220a3134c4
2016-04-22 10:08:07 +02:00
Stephan Bergmann
783419657c
loplugin:salbool: sal_Bool[] -> bool[]
...
Change-Id: I3c5bf7a53c9ae173f8fce885ecf022f092aa43a9
2016-04-21 17:29:40 +02:00
Stephan Bergmann
8c423eeb49
Use Sequence ctor taking initializer_list
...
needed adapting loplugin:implicitboolconversion to not warn about
Sequence<sal_Bool> arBool({true, false, true});
Change-Id: I971918aab7c958ef8f1e4e0548a84314e95f8325
2016-04-21 17:27:43 +02:00
Stephan Bergmann
cad49138da
typo
...
Change-Id: I67721e86073bd2f67bee3ffbbb81fd5d143997d8
2016-04-21 13:52:23 +02:00
Stephan Bergmann
8d934b73cc
Better fix for 13758a3d154e8e450fdfe8bcdeb6b3a03996c53a
...
"SourceManager::isMacroArgExpansion has only one param in older Clang", which
caused false positives like warning about sal_False in
CPPUNIT_ASSERT_EQUAL(guard.p->m1, sal_False);
in cppu/qa/cppumaker/test_cppumaker.cxx
Change-Id: I1c5a67527aef381e336d71cb8fefbb87961bbf96
2016-04-21 12:05:48 +02:00
Noel Grandin
7b65087eab
move stylepolice plugin into store/
...
seems std::regex is not too well supported yet, at least in
libstdc++-4.8
Change-Id: Ib9feb33d2f197d40fc67dc93468aa2f7dae05bac
2016-04-21 10:05:54 +02:00
Stephan Bergmann
13758a3d15
SourceManager::isMacroArgExpansion has only one param in older Clang
...
Change-Id: I5aa4f7cca70b8196263613b92c018323152411a1
2016-04-21 08:51:40 +02:00
Noel Grandin
5abc669599
new plugin stylepolice
...
check for local variables which follow our member field naming
convention, which is highly confusing
Change-Id: Idacedf7145d09843e96a584237b385f7662eea10
2016-04-21 08:32:47 +02:00
Stephan Bergmann
e8425c4810
loplugin:salbool: Warn about uses of sal_False/True
...
...that can generally be rewritten as false/true, and sometimes could hide
errors, see e.g. <5be5f00fe16b0e255b31fbaba5f119773d1cd071> "So this is
apparently about right-to-left levels, not a boolean flag".
Change-Id: Ib39a936a632c2aab206f24c346252e31dcbb98f3
2016-04-20 17:27:33 +02:00
Stephan Bergmann
a3858ed3a7
Use cast to bool to normalize sal_Bool values
...
Change-Id: I8a886f752d2a16ec4c10656bcd0b3631647971b2
2016-04-20 17:25:31 +02:00
Stephan Bergmann
d9adda92cc
Ignore external code
...
Change-Id: Ie527703e9687a42bfc39439952b9d1a83d7cad24
2016-04-18 15:30:06 +02:00
Noel Grandin
67d333c608
tdf#99352 - Some VclPtrs leak past DeInitVCL
...
Change-Id: I74b27b1d8b662a644df580ae128643b8495355f8
Reviewed-on: https://gerrit.libreoffice.org/24204
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-04-18 10:51:54 +00:00
Noel Grandin
4ff087565b
update badstatics plugin to look for VclPtr<> statics
...
maybe we should create a "StaticVclPtr<>" class that checks if VCL is
still "alive" before destructing the object?
Change-Id: If8619f689c29294efa19c37ec782fa07acec728d
Reviewed-on: https://gerrit.libreoffice.org/24085
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Michael Meeks <michael.meeks@collabora.com>
Reviewed-by: Björn Michaelsen <bjoern.michaelsen@canonical.com>
2016-04-15 12:09:05 +00:00
Noel Grandin
b0c435f88b
turn on the passstuffbyref plugin again
...
now that I have committed all of the changes to return types it
found
Change-Id: Iaee121037ce83e94001e4591d232b075dfeade7c
2016-04-14 12:00:10 +02:00
Noel Grandin
7573abfdef
update loplugin passstuffbyref to check return types
...
of methods like
Foo getFoo() const { return m_foo; }
where we can rather do
const Foo& getFoo() const { return m_foo; }
and let the client code decide if it wants copy Foo.
Inspired by a performance problem where we were unwittingly
copy constructing a large struct repeatedly just so client code
could interrogate the members of the struct.
When all of the changes this plugin finds are applied, I find
that 'perf stat make check' shows on average a 1.7% reduction
in CPU cycles.
Change-Id: Ic27b4f817aa98f2a2a009f2d4e4a962cbe9c613e
2016-04-13 13:27:50 +02:00
Stephan Bergmann
9c38c84c48
Avoid reserved identifiers
...
Change-Id: I438a7f28ba6bc68ec4e6244a4343e4040ab1b997
2016-04-07 07:57:12 +02:00
Wastack
e097e419ee
tdf#97966 Compiler plugin
...
Warns about redundant 'static' keywords in unnamed namespace.
Change-Id: Iecab69161e24d73e39a8dd5baaba6929e12d4f29
Reviewed-on: https://gerrit.libreoffice.org/23679
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-04-01 06:47:07 +00:00
Stephan Bergmann
2d74cbe769
loplugin:nullptr: Check for more pointer types
...
(but did not turn up further matches)
Change-Id: I7e4843d00a2e3b46edec46c5b56b6ba1b2e098fd
2016-03-31 15:49:28 +02:00
Stephan Bergmann
d2f9f27774
loplugin:nullptr: Find some more cases in templates
...
Change-Id: I1f127d56e40b04f2b4df85c0afbcfd424d68a8cc
2016-03-30 18:59:54 +02:00
Stephan Bergmann
dde79dd504
Rename OfficeIPCThread to RequestHandler
...
Change-Id: I2076d903e83a0b8eb3aa0ce2413630e2c5415b15
2016-03-29 14:54:20 +02:00
Noel Grandin
ef3ca022d9
constantparam loplugin improvements
...
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-23 12:05:37 +00:00
Stephan Bergmann
779f06f9a8
Ambiguity between clang:: and llvm::PointerType
...
Change-Id: I2727ef17b9ab780c608878aaca9ce0fda01b9c22
2016-03-20 13:29:50 +01:00
Noel Grandin
f0f973da85
loplugin:constantparams in vcl/
...
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-16 08:42:37 +00:00
Noel Grandin
b47cb646ff
loplugin:constantparam
...
Change-Id: I270e068b3c83e966e741b0a072fecce9d92d53f5
2016-03-15 08:27:25 +02:00
Wastack
9a13cff647
tdf#97966: Remove 'static' keywords
...
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-11 08:57:51 +00:00
Maxim Monastirsky
21b92f386c
MenuDispatcher::m_pMenuManager is always nullptr
...
... 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-10 15:23:31 +00:00
Stephan Bergmann
7024c86b17
Extract checking code to its own check.cxx
...
Change-Id: I9d5b14c374ce62ac7b970faa30c38a5a76568ed4
2016-03-08 21:37:42 +01:00
Stephan Bergmann
1316543eb8
TODO: Work around loplugin:salbool in cppu/source/uno/data.cxx for now
...
Change-Id: I1730c09669426e049aba941ef27341581ce31887
2016-03-08 18:16:58 +01:00
Noel Grandin
b4fda7b3f9
new loplugin:constantparam
...
finds parameters that are only ever being called with a single value
Change-Id: Ibd0c9b6e6dbc1d1b5d5a005eaa19959560a6e50f
2016-03-08 09:04:47 +02:00
Noel Grandin
359e0b47a0
loplugin:unuseddefaultparams
...
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-07 09:16:00 +00:00
Noel Grandin
70f87284c6
improve defaultparams loplugin
...
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-07 05:57:17 +00:00
Noel Grandin
37a6bafea8
loplugin:unuseddefaultparam in various
...
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-07 05:56:59 +00:00
Markus Mohrhard
a3d8833bd8
fix crash in cppunitassertequals plugin
...
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-05 11:44:27 +00:00
Noel Grandin
1fd781e7cd
loplugin:unuseddefaultparam in oox/reportdesign/sd
...
Change-Id: Ia26cf182ddc7c903d86bf74a8175858adb88121c
2016-03-04 14:01:19 +02:00
Noel Grandin
46c67c4323
loplugin:unuseddefaultparam in tools
...
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-04 11:20:09 +00:00
Noel Grandin
9a1e6d916e
loplugin:unuseddefaultparam in sfx2
...
and fix an issue with calls to templated methods in the plugin
Change-Id: I9c9537a0690ff671286c007846d5f4cfb7d2982b
2016-03-04 11:48:04 +02:00
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
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
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