693 Commits

Author SHA1 Message Date
Stephan Bergmann
1294013bf5 sc/source/core/tool/scmatrix.cxx no longer triggers this?
Change-Id: Ie8d18d66e89621f0cb4762ed5abfe2ec39788f72
2016-06-29 09:25:52 +02:00
Stephan Bergmann
733198de1b Remove support for Clang < 3.4
Change-Id: I81e97c5f720535b33dd3ce72d01151765e4e93a0
2016-06-29 09:15:25 +02:00
Stephan Bergmann
1ce7176ba1 Remove support for Clang < 3.3
Change-Id: I185852a738bac10dc6d331afccfcbc7ae1225cb1
2016-06-29 08:55:27 +02:00
Stephan Bergmann
6439d93cbe typo
Change-Id: I31053ae472f74eaf3a86159a273424174329d0bd
2016-06-29 08:54:33 +02:00
Stephan Bergmann
94cba04b33 Further clean-up
Change-Id: Id07b37629eb2a0b6d33297bffcf86d41c5d6fbe2
2016-06-29 07:31:26 +02:00
Stephan Bergmann
0d3f9667bb AllocatorTraits::size can be static after all
Change-Id: If9ce8a094af878497e980cdcfaf11604d613e5b8
2016-06-28 22:38:57 +02:00
Stephan Bergmann
0d3738a258 More Clang 3.4 "(anonymous namespace)" fixes
Change-Id: I7cb43f915565dadd611b90ee30373e472f97efb5
Reviewed-on: https://gerrit.libreoffice.org/26748
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-06-28 20:33:58 +00:00
Stephan Bergmann
c1ab6613ae More adaption to Clang 3.4
...where NmaedDecl::getQualifiedNameAsString (which is expensive and bad,
anyway) apparently returns something other than "(anonymous namespace)"

Change-Id: I05ef96665c48f8f596dd0d317388e91a75b8307b
2016-06-28 17:48:22 +02:00
Stephan Bergmann
9308f35318 Adapt to Clang 3.4 (in preparation of a buildbot on CentOS 7)
Change-Id: Ie2859f03b31c57deb7fd0deba3285f782e33b239
2016-06-28 16:26:33 +02:00
Noel Grandin
1aafc64b4d loplugin compat with clang 3.4
Change-Id: I264fe688519b8b2173d5cccd8a453847a7fb89d9
2016-06-28 15:29:07 +02:00
Noel Grandin
442dd6a153 loplugin: move parentFunctionDecl() into common code
Change-Id: Ia10a76a98a63c6ea3b516d9146281f672b213ab3
2016-06-28 14:53:17 +02:00
Noel Grandin
48a8d6d843 loplugin:singlevalfields in various
Change-Id: Ia0d8f463a4dba9ec63aa0159441e3e607dd3bf5e
Reviewed-on: https://gerrit.libreoffice.org/26738
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-28 11:21:17 +00:00
Stephan Bergmann
1a6f599e98 loplugin:stringconstant: Don't warn about "OUString(OSL_THIS_FUNC)"
Change-Id: Id5f021bd798cb94b7246faed539304dae04b4700
2016-06-28 09:07:12 +02:00
Noel Grandin
f9889a69b9 check for field being returned by non-const ref
Change-Id: I660c98dcbfa6052628ff667886981d075f34b2b7
2016-06-27 08:43:54 +02:00
Noel Grandin
cd01a470e4 dont ignore destructors
generate more false+ than it helps to find interesting stuff

Change-Id: I752f08a28e629bce00264108399b2a4c8afd388f
2016-06-26 11:51:34 +02:00
Stephan Bergmann
e6daf6bfb0 Fix check for calls to OWeakObject::release
Change-Id: I90030dee12676eb356ebe2244358052cfcd725de
2016-06-24 17:27:18 +02:00
Stephan Bergmann
f8a18a464e Adpat to <https://llvm.org/svn/llvm-project/cfe/trunk@273647>
"Use more ArrayRefs"

Change-Id: Ied0ab11dd9366b3f499100b2627f4919cca52c9c
2016-06-24 16:46:55 +02:00
Michael Stahl
136a2fd6c0 compilerplugins: add OWeakObject::release() override check
Change-Id: I767857545d7c91615cf162790c04f0016de9fdf6
Reviewed-on: https://gerrit.libreoffice.org/26555
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2016-06-24 12:05:09 +00:00
Noel Grandin
358bb8eed4 teach singlevalfields loplugin about function pointers
Change-Id: I81f77e2b3f94c208866fa8d124b0b00ea5387563
2016-06-24 11:17:43 +02:00
Stephan Bergmann
ed49818ab0 Clean up OContainerListenerAdapter
* elide OContainerListenerAdapter_BASE
* no need for protected members

Change-Id: I70095dadc4b1f42f04c8ea76b2236bf99a226da9
2016-06-24 10:29:48 +02:00
Noel Grandin
2fe32490f0 loplugin singlevalfields, need to check default constructor code too
Change-Id: Idcc8de6f1d403a57c59e84774bd7a97e2f3fc224
2016-06-23 15:14:13 +02:00
Stephan Bergmann
b498cf6262 -Werror=unused-function
Change-Id: Ib579e8896a751383d31c1dbf7e6ebf5c0774a976
2016-06-23 15:03:04 +02:00
Stephan Bergmann
20f58e7904 -Werror=unused-but-set-variable
Change-Id: I0b3586bb3acca4075b26790a8dfe3f97d6921feb
2016-06-23 15:02:01 +02:00
Noel Grandin
8d861bd702 new loplugin: singlevalfields
look for fields that only have a single constant value assigned to them

Change-Id: Iafcd37fdb8a8119bbc00f92981a1a01badf9c5a2
2016-06-23 13:13:57 +02:00
Miklos Vajna
7ab4f31b6e compilerplugins: move oncevar into store
As suggested by Stephan and agreed by Noel -- as its warnings are not
useful in all cases.

Change-Id: I3c6034ae9d3c74aeb089a67dc48c1f91a3ea3a21
2016-06-23 09:44:19 +02:00
Michael Stahl
bd8c029301 compilerplugins: ignore GCC bridges more generically
Change-Id: Ib76b14d37bbe3c32aa0637037d73d0d5dce01b25
2016-06-21 18:20:26 +02:00
Michael Stahl
633e6cf96e compilerplugins: don't warn about __lxstat64
Change-Id: I71e21d6aff55caa1bc3e8e25f0b4c60386120d00
2016-06-21 18:20:25 +02:00
Stephan Bergmann
82da3d95c1 loplugin:salbool: Implicit conversions from non-Boolean fundamental types
Change-Id: I67eac95686678e6f5a2d60798535b2c65a9ba5d7
2016-06-19 21:29:43 +02:00
Stephan Bergmann
793fd7e548 loplugin:override: No more need to request dtor be marked 'virtual'
...rather than 'override', cf. <https://gerrit.libreoffice.org/#/c/26347/>
"loplugin:override: No more need for the "MSVC dtor override" workaround".

Change-Id: Ib528938ed4be248117bb7114f34d4e9421bc3275
2016-06-17 13:56:58 +02:00
Stephan Bergmann
a94a0b148c Could swear I'd seen this produce a bogus compiler error
...but now it apparently works

Change-Id: Iac1b4e49788ac620ed55dec7a52c839ba2937f5b
2016-06-14 08:43:03 +02:00
Stephan Bergmann
8110dd24d1 Fix loplugin:passstuffbyref to not warn when ref param is bound to ref
cf. d150eab88ee26d5c05a6d662a2c13c6adea8ad78 "loplugin:passstuffbyref: For now
disable 'pass parm by value' warnings".  At least all the other changes in
4d49c9601c9b3e26a336e08e057d299895683480 "Let loplugin:passstuffbyref also look
at fn defn not preceded by any decl" were OK but the one reverted with
b3e939971f56d53e60448a954a616ec295544098 "coverity#1362680 Pointer to local
outside scope".

Change-Id: I022125fbcb592e7da3c288c0fd09079dd2e87928
2016-06-13 19:26:56 +02:00
Stephan Bergmann
136301b3db Remove unused member var
Change-Id: I0f4143cb2a34cf18e6c926432d707d84ef0ea579
2016-06-13 13:43:12 +02:00
Stephan Bergmann
d150eab88e loplugin:passstuffbyref: For now disable "pass parm by value" warnings
That needs fixing, to check that the parm is not bound to a reference, cf.
<https://gerrit.libreoffice.org/#/c/26189/> "coverity#1362680 Pointer to local
outside scope".

Change-Id: I3656354ccd10affafa006c9e46cf1db608b5b2a7
2016-06-13 09:22:13 +02:00
Andrea Gelmini
d3c96c9f82 Fix typos
Change-Id: Ic3efae53430fbb2c1eb7962c3cf69bf99315e55b
Reviewed-on: https://gerrit.libreoffice.org/26202
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
2016-06-13 06:04:07 +00:00
Noel Grandin
febeefc6c7 loplugin:mergeclasses SfxMacroTabPage
Change-Id: I74790c665fbd191914291365ce711fea9f1cf320
Reviewed-on: https://gerrit.libreoffice.org/26147
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-10 08:28:36 +00:00
Noel Grandin
fc7e6d8445 loplugin:mergeclasses SdrItemBrowser
Change-Id: I90c6006be05f182fd442ce8d3641f4f17cdb6793
2016-06-10 09:13:36 +02:00
Noel Grandin
c6d0a104aa update mergeclasses results
and do one trivial merge

Change-Id: Iff30553f73de946c74fa6b082928e7d47adadd04
2016-06-10 09:13:36 +02:00
Stephan Bergmann
4d49c9601c Let loplugin:passstuffbyref also look at fn defn not preceded by any decl
Change-Id: I752bc96d2d521d790e919283cabb14b6526626f4
2016-06-08 17:14:34 +02:00
Bryan Quigley
71cf1aefca Remove unneeded Pane code in Presenter Console
This code hasn't been touched (on purpose) in years, it appears
to have been used to resize part of the console. (It's prefed off)

Change-Id: Iaaeaa8a95c71ae91299bbeeea24869bf2a237b6b
Reviewed-on: https://gerrit.libreoffice.org/24663
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
Tested-by: jan iversen <jani@documentfoundation.org>
2016-06-06 05:55:03 +00:00
Stephan Bergmann
643b70006f Teach loplugin:stringconstant about RTL_CONSTASCII_STRINGPARAM
Change-Id: I8ff0e104aad045f3835dc8facc760a8339b1d088
2016-06-03 10:58:26 +02:00
Stephan Bergmann
2712fc0869 I assume these special plugins were not intended to be enabled unconditionally
...with fa135fd0e05fc4ba784b4349d65f2e5ed26c0f55 "remove unused SID constants
and associated code"

Change-Id: I51b2a9e3c8ce13401818bca0c40167a4364212f1
2016-06-02 23:46:46 +02:00
Noel Grandin
fa135fd0e0 remove unused SID constants and associated code
found with a python script that looks like:

process = subprocess.Popen(
  "git ls-files *.hrc | xargs grep -hE '#define +SID_' | cut -d ' ' -f 2 | sort -u",
  shell=True, stdout=subprocess.PIPE)
for line in iter(process.stdout.readline, b''):
  line = line.strip()
  if line.startswith("//"): continue
  if line.startswith("sfx"): continue
  if len(line) < 10: continue
  i = subprocess.check_output("git grep -nP \"#define +" + line + " \"",
                              shell=True)
  if i.count("#define") < 2: continue
  print line + "
" + i

Change-Id: I40eac2569c2b5b129d9459cb723a9d6f26d09264
Reviewed-on: https://gerrit.libreoffice.org/25715
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-01 06:48:13 +00:00
Noel Grandin
e48a13af9f fix KDE4 build
after 3d7325898547c94826cfdd "loplugin:unusedmethods"

Change-Id: I32303948c5046b2880cd4e64cada32ea776a0861
2016-05-31 08:48:34 +02:00
Noel Grandin
3d73258985 loplugin:unusedmethods
Change-Id: Ifeb818227a960cab8fd2e8e7352468efbfe1232c
Reviewed-on: https://gerrit.libreoffice.org/25668
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-31 06:28:41 +00:00
Noel Grandin
0b23eec200 teach refcounting clang plugin about uno::Reference
uno::Reference is only allowed to used with classes that have a
::static_type member.
So convert all those places to rtl::Reference.

Maybe we need some LIBO_INTERNAL_ONLY constructors on rtl::Reference and
uno::Reference to make this a little smoother?

Change-Id: Icdcb35d71ca40a87b1dc474096776412adbfc7e3
Reviewed-on: https://gerrit.libreoffice.org/25516
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-31 06:25:45 +00:00
Noel Grandin
509f0c6a8a loplugin:unusedreturntypes
and clean up the python script

Change-Id: I0a7068153290fbbb60bfeb4c8bda1c24d514500f
Reviewed-on: https://gerrit.libreoffice.org/25439
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-26 07:26:47 +00:00
Noel Grandin
d59125638b update unusedmethods plugin to ignore externC and copy constructors
Change-Id: Idf7a9403d313ba6a0e031c59601e20c880b6118b
2016-05-18 16:38:23 +02:00
Noel Grandin
27fd3c4e66 update vclwidgets loplugin to handle VclReferenceBase
Change-Id: I447cdb8c65d880b3c5ff28b35cefdc56ff784852
2016-05-18 12:26:24 +02:00
Noel Grandin
2c8fe2e737 update unusedmethods plugin to deal with constructors
and fix the operator< implementations in some of the other
plugins too.

Change-Id: Ie5631e0cdc8d2a994ad2af2533cdb558a6cfc035
Reviewed-on: https://gerrit.libreoffice.org/25057
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-05-18 10:03:44 +00:00
Noel Grandin
42801672f0 fix null pointer crash in loplugin:commaoperator
Change-Id: Ie077ed9a8f200b39da25938b35a3622e52cc5110
2016-05-16 11:25:34 +02:00