21 Commits

Author SHA1 Message Date
Noel Grandin
978ff8f55c inline InitGuard
since it is only used in one place

Change-Id: Ie541a255ddbe71105f6b58f02f372f4f45667d7a
2017-01-13 11:59:01 +02:00
Stephan Bergmann
da95ad47af typo
Change-Id: Iea55eee0e5e777e46bb02435f10bca03e554a15c
2016-10-12 08:49:35 +02:00
Noel Grandin
ed89525967 improve error message in refcounting plugin
Change-Id: I02b483c1d696913b33112b9248747f9c3d28dc55
2016-10-12 08:44:50 +02:00
Stephan Bergmann
31dc693029 loplugin:refcounting: No more special-handling of SvXMLImportContext
...after 32ccb4ea863651c22bf33cc15012971d2a2d2810 "resolve the snafu with 2
separate refcounted bases"

Change-Id: Iaf13deb0b83b6dfe1a2cf3863e07cf042c8e4f47
2016-09-09 09:46:39 +02:00
Stephan Bergmann
28cb2c1764 loplugin:refcounting: also cover temporaries being directly stack managed
Change-Id: Ib0f7c60df1d2fba0d4d9d3fa6faf3bb97867ebc0
2016-08-26 12:40:43 +02:00
Stephan Bergmann
6a1bebcc89 Remove wrong check through template args from containsXInterfaceSubclass
...that was probably only there as a workaround for cases (equally wrongly)
covered by the check for !hasAnyDependentBase in isDerivedFrom.  And the latter
appears to no longer be necessary, probably because the cases it happened to
cover intentionally are now covered correctly through some other logic that got
added to this plugin meanwhile.

Change-Id: Ife6370b4f966198fc731813afe62d765450382e6
2016-08-26 12:36:12 +02:00
Stephan Bergmann
a292402565 Further clean-up
Change-Id: I2b867a93fd8c5cf3c1e4f53863c441478d9201e1
2016-06-29 15:13:25 +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
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
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
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
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
5a5dbb31d5 Use rtl::Reference<CppType> instead of HardCppRef<UnoType,CppType>
Change-Id: I089b5caca5e05726105f78aeb00db1869d0a17f4
2016-02-09 18:30:54 +01: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
Daniel Robertson
ef779d339e tdf#94389 compilerplugins: clang 3.7.0
Fix errors that occur in build with clang 3.7.0

Change-Id: I0e8743f2b6a288d10b4e78e884ce34cfca4dd77c
Reviewed-on: https://gerrit.libreoffice.org/18738
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Tested-by: Stephan Bergmann <sbergman@redhat.com>
2015-09-21 13:53:47 +00:00
Noel Grandin
9c1f700aff improve refcounting loplugin to check SvRef-based classes
Change-Id: I2b3c8eedabeaecd8dcae9fe69c951353a5686883
Reviewed-on: https://gerrit.libreoffice.org/17521
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-05 11:26:04 +00:00
Noel Grandin
3d5dc80b07 fix crash in refcounting plugin
introduced by commit c15b4cf39a74176cee64795129d76f411d2c0a69
"Adapt to current Clang trunk towards 3.7"

Change-Id: I00f58d3bc79e641df9bba4e9b1d5c8463b87dc42
2015-08-04 10:25:48 +02:00
Stephan Bergmann
b9d0fe1cec Workaround for libc++
Change-Id: Iee5243231d695299609ca31741f6da2d517f524f
2015-08-04 09:39:36 +02:00
Stephan Bergmann
a2052db259 Workaround for ObjCIvarDecl problem
Change-Id: I7eb0fccce4b8268e5d9559b2eb12778d0d288c6b
2015-08-04 09:38:44 +02:00
Stephan Bergmann
c15b4cf39a Adapt to current Clang trunk towards 3.7
Change-Id: Ibb2c641d49a1773be789c9259f53a040db6f605f
2015-08-04 09:36:32 +02:00
Noel Grandin
2660d24a07 new loplugin: refcounting
This was a feature requested by mmeeks, as a result of
tdf#92611.

It validates that things that extend XInterface are not
directly heap/stack-allocated, but have their lifecycle managed
via css::uno::Reference or rtl::Reference.

Change-Id: I28e3b8b236f6a4a56d0a6d6f26ad54e44b36e692
Reviewed-on: https://gerrit.libreoffice.org/16924
Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
Tested-by: Noel Grandin <noelgrandin@gmail.com>
2015-08-03 06:37:16 +00:00