summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/vclwidgets.cxx
AgeCommit message (Collapse)Author
2017-06-26Fix loplugin:vclwidgets' disposeOnce checkStephan Bergmann
Found when trying to temporarily add a SAL_DEBUG to (otherwise empty) ~NotebookbarTabControl (sfx2/source/notebookbar/NotebookbarTabControl).
2017-06-26extensions: remove COMPMOD preprocessor definesJochen Nitschke
COMPMOD_RESPREFIX=abp was unused ever since initial commit in 2001. COMPMOD_NAMESPACE was used to set the namespace name qualifier of the helper in componentmodule.hxx to the extension's namespace name. I don't see why this is necessary as the helper is always compiled in a separate extension library. Change-Id: I287607008db3dc0ebc32731536747a921c91807d Reviewed-on: https://gerrit.libreoffice.org/39184 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2017-06-06getBody() can be null for a defaulted dtorStephan Bergmann
Not sure why that started to pop up only now, maybe something changed with recent Clang trunk. Change-Id: Ib6587b66afbf3e43d92c78432c0bfd61c74ba6c5
2017-05-18Adapt pathname checks to mixed usage of \ and / on WindowsStephan Bergmann
Change-Id: I91bc89a9076c6642e06b238f65f2d31a1d20c6b5
2017-04-27Fix build after 7d71451e8e0226d3f3f523611f55132eda6ec10fStephan Bergmann
"vcl: change pImpl class names to fit with existing convention" Change-Id: Ic02ca5b71a96b852951ac1b14b966b1ba2f006e9
2017-04-25tools: svstream.hxx needs only errcode.hxx & not errinf.hxxChris Sherlock
Change-Id: Ia28e35ae5af4f601e9a586a3deffbcd61702b0ca Reviewed-on: https://gerrit.libreoffice.org/36896 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Chris Sherlock <chris.sherlock79@gmail.com>
2016-12-18loplugin:vclwidgets: Adapt check for 'assert' for MSVCRTStephan Bergmann
Change-Id: I12a77b5b53e3a674c1ff1554b560a71605e141a6
2016-12-14Check that VclPtr is only instantiated with appropriate typesStephan Bergmann
...deriving from VclReferenceBase. Complicated by the fact that the argument type may be incomplete at the time of template instantiation. So this approach may be less precise than the change to loplugin:vclwidgets from cbf5b21f2a65bbb342295200f6ad93a00f90733e "Catch some misuses of VclPtr construction" when the argument type becomes complete later in the comilation unit. However, this approach would also catch the two misuses in UnoControls found by cbf5b21f2a65bbb342295200f6ad93a00f90733e, so go with this approach for now and revert the change to loplugin:vclwdigets. Change-Id: I7888f23d2b9e2db81ae2ce4bf4c8277912317685 Reviewed-on: https://gerrit.libreoffice.org/31966 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-12-09Catch some misuses of VclPtr constructionStephan Bergmann
...that go unnoticed due to the non-explicit VclPtr::oeprator reference_type * Change-Id: Ia63edf8425d3ecb7c7f98eb56a710ac0cceccb67
2016-12-07Replace calls to get(Qualified)NameAsString with stuff from check.hxxStephan Bergmann
Change-Id: I14e48ea5c59bdd12ad6484222b3e8733664e78c4 Reviewed-on: https://gerrit.libreoffice.org/31712 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
2016-11-29loplugin:vclwidgets check for assigning from VclPt<T> to T*Noel Grandin
Inspired by a recent bug report where we were assigning the result of VclPtr<T>::Create to a raw pointer. As a consequence, we also need to change various methods that were returning newly created Window subclasses via raw pointer, to instead return those via VclPtr Change-Id: I8118e0195a5b2b4780e646cfb0e151692e54ae2b Reviewed-on: https://gerrit.libreoffice.org/31318 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-11-11update vclwidget loplugin to find ref-dropping assigmentNoel Grandin
Look for places where we are accidentally assigning a returned-by-value VclPtr<T> to a T*, which generally ends up in a use-after-free. Change-Id: I4f361eaca88820cdb7aa3b8340212db61580fdd9 Reviewed-on: https://gerrit.libreoffice.org/30749 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-10-31loplugin:vclwidgets: Adapt iterator hack to libc++Stephan Bergmann
Change-Id: I1e4fbb06578b2b1d6de4b57507693b014d36cd3a
2016-10-31update vclwidgets plugin to check local variablesNoel Grandin
Change-Id: I91f7fc6b8419c0ed82194726eeb4c4657e998f22 Reviewed-on: https://gerrit.libreoffice.org/30428 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
2016-07-11Adapt to Clang 3.4 againStephan Bergmann
Change-Id: I33c1cee01593b06efca6e1aae283ce80d5cd77be
2016-07-06restore loplugin:vclwidget checking for calling clear() on VclPtr fieldsNoel Grandin
Change-Id: I85eda1c33016c1461d897fc0a3b70457209a7405 Reviewed-on: https://gerrit.libreoffice.org/26806 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noelgrandin@gmail.com>
2016-06-28Adapt to Clang 3.4 (in preparation of a buildbot on CentOS 7)Stephan Bergmann
Change-Id: Ie2859f03b31c57deb7fd0deba3285f782e33b239
2016-05-18update vclwidgets loplugin to handle VclReferenceBaseNoel Grandin
Change-Id: I447cdb8c65d880b3c5ff28b35cefdc56ff784852
2016-02-26These version checks are about the Clang the plugins are built /against/Stephan Bergmann
...not the (Clang) compiler they are being built /with/. (Also simplifies the checking #if code.) Change-Id: I416321be4ef4478785be40571f81500fd3b6feb8
2015-12-08Remove apparently unnecessary checksStephan Bergmann
...they don't cause any change in behavior, likely they predated Noel's figuring out the template part of containsWindowSubclass Change-Id: I0d5b6bd7f228acef9a0ce1c85fe98fbab89bd7a8
2015-12-07No, "rtl::Reference<VclStatusListener<Button>> mpStatusListener;" is fineStephan Bergmann
...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
2015-11-13sc: loplugin:badstatics: remove pActiveEdWnd global variableMichael Stahl
Just use a Link, or rather std::function to set a member in the tab page. Unfortunately loplugin:vclwidgets complains about the new member. Change-Id: Ie2f9cb73c38292d02057d43b12694c6609fa0db8
2015-11-05Improve warning messagesStephan Bergmann
Change-Id: I75eb9f17a3dcc688314355fa957e3f34086b161a
2015-11-02tdf#94269: Replace "n" prefix for bool variables with "b"Benjamin Ni
Change-Id: I178545792c7354a362658ac7ef8b1d4cf0865797 Signed-off-by: Michael Stahl <mstahl@redhat.com>
2015-09-21tdf#94389 compilerplugins: clang 3.7.0Daniel Robertson
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-08-04fix crash in refcounting pluginNoel Grandin
introduced by commit c15b4cf39a74176cee64795129d76f411d2c0a69 "Adapt to current Clang trunk towards 3.7" Change-Id: I00f58d3bc79e641df9bba4e9b1d5c8463b87dc42
2015-08-04Adapt to current Clang trunk towards 3.7Stephan Bergmann
Change-Id: Ibb2c641d49a1773be789c9259f53a040db6f605f
2015-06-15fix vclwidget plugin warning messageNoel Grandin
Change-Id: Iac6450ed3a7742022d97b0121165f992b483eea0
2015-06-12New VclPtr clang plugin to catch potential problems.Noel Grandin
Change-Id: I2571c4384e4c2dbe411e171325e10d57a0afe5a0 Reviewed-on: https://gerrit.libreoffice.org/16235 Reviewed-by: Michael Meeks <michael.meeks@collabora.com> Tested-by: Michael Meeks <michael.meeks@collabora.com>
2015-05-19vclwidget plugin: check for memcpy of VclPtrNoel Grandin
Change-Id: I873d3efbb7b78d0efe5d586b378d024ee22ac77e
2015-05-13check for static fields that needs to be wrapped in VclPtrNoel Grandin
Change-Id: I6135cfd9aa70f90d58150733b6b48525e5c347c8
2015-05-07workaround for clang3.2 in vclwidgets clang pluginNoel Grandin
Change-Id: I7ac67dd14d14a93fe163febe0f18df56dd613376
2015-05-07fix commentNoel Grandin
Change-Id: Ifa59bdc4bfd80fe3100ba5f1ac8119ad990e3936
2015-05-07More of the sameTor Lillqvist
Change-Id: I2e735a3534a7f374a550d5072359aca70494a547
2015-05-07It's its, not it'sTor Lillqvist
Change-Id: Ic108625cdc8376095dfd19184ecad39bfeccd160
2015-05-05Downgrade for old ClangStephan Bergmann
Change-Id: Ia4c241040c52631df86c5bb7a95bca6af234251f
2015-04-30Do not warn about Link<Window *>Stephan Bergmann
Change-Id: Id26adce17a2479eead935958556012f13f2821b7
2015-04-30streamline containsWindowSubclassStephan Bergmann
Change-Id: I56d61b577df00855a49dd618e9dafcdb86cd7ca4
2015-04-28Work around FieldDecl::getParent raising assertionStephan Bergmann
...when inside an ObjCInterfaceDecl, cf. thread starting at <http://lists.cs.uiuc.edu/pipermail/cfe-dev/2015-April/042629.html> "FieldDecl::getParent() not working in Objective C code?" Change-Id: Ifa9b4925979123c6b6fee1b46a1f57803207d3c8
2015-04-17workaround ErrorContextImpl in vclwidget clang pluginNoel Grandin
Change-Id: I6c0265f33a88169708d0812639169b665a95fc1f
2015-04-10wrap more stuff in VclPtrNoel Grandin
Change-Id: I2f0d8a4fe426d8ee1ac55a05ae8dd0b44f9aab2b
2015-04-10wrap more stuff in VclPtrNoel Grandin
Change-Id: Ia742c47399231bc5914b6586132ad3daf694fdb0
2015-04-10vclptr: calling disposeAndClear on all the fields is not greatNoel Grandin
sometimes we need to call clear() instead, and there is no automatic way of figuring this out Conflicts: compilerplugins/clang/vclwidgets.cxx Change-Id: Iad96342ce3fdb3fa2f548270392aa00e19fec599
2015-04-10make vclwidget clang plugin find OutputDeviceNoel Grandin
fields which need to be wrapped in VclPtr Change-Id: I6e465c66c51018b3beffadb6c99d8a08f071331e
2015-04-10vclwidget: check for calling delete on subclasses of vcl::WindowNoel Grandin
Change-Id: I7fb7cf919e3f46dd03a18b1cb95fa881915f9642
2015-04-10vclwidget: fix more places that should be wrapping in VclPtrNoel Grandin
Change-Id: I31c9115662da2f81e1b22be91ee58e2862076b8e
2015-04-10vclwidget: make sure we have an explicit destructorNoel Grandin
Change-Id: I50490ad8957e8069e72e855f0f5a3b694218fd6b
2015-04-10vclwidget: convert lots more sites to use VclPtrNoel Grandin
seems there was a lot of shared_ptr usage floating around... Change-Id: Icd05243170eb8493709275fc36bf986fc194b781
2015-04-10vclwidget: improve detection of vcl::Window fieldsNoel Grandin
that need to be wrapped in VclPtr, and convert several sites Change-Id: I1fb1ed164a99642a0c1ccbf433eb14df688fa476
2015-04-10vclwidget: only call dispose() onceNoel Grandin
by using a new utility method in vcl::Window This means that we don't have to make all our dispose methods safe to call more than once. Change-Id: I2110c7de4a86c70fdc97dd8fd318c86b56865374