summaryrefslogtreecommitdiffstats
path: root/compilerplugins/clang/useuniqueptr.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-06-26 14:07:28 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-06-27 08:34:48 +0200
commitbf82016b20b9d5da1c3ce06258f77cfc2c66afac (patch)
tree3767c2d2f4b073ee2e0b6c1d4d01f6d73b96eee2 /compilerplugins/clang/useuniqueptr.cxx
parentloplugin:useuniqueptr in PortionObj (diff)
downloadcore-bf82016b20b9d5da1c3ce06258f77cfc2c66afac.tar.gz
core-bf82016b20b9d5da1c3ce06258f77cfc2c66afac.zip
loplugin:useuniqueptr in SwDoc
Change-Id: Ic895c7b79a25a0766cc6d352c5ed75873004fddb Reviewed-on: https://gerrit.libreoffice.org/56496 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins/clang/useuniqueptr.cxx')
-rw-r--r--compilerplugins/clang/useuniqueptr.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/compilerplugins/clang/useuniqueptr.cxx b/compilerplugins/clang/useuniqueptr.cxx
index 131727f0f44f..df6343f61578 100644
--- a/compilerplugins/clang/useuniqueptr.cxx
+++ b/compilerplugins/clang/useuniqueptr.cxx
@@ -278,6 +278,11 @@ void UseUniquePtr::CheckDeleteExpr(const CXXMethodDecl* methodDecl, const CXXDel
auto tc = loplugin::TypeCheck(fieldDecl->getType());
if (tc.Class("map").StdNamespace() || tc.Class("unordered_map").StdNamespace())
return;
+ // these sw::Ring based classes do not lend themselves to std::unique_ptr management
+ if (tc.Pointer().Class("SwNodeIndex").GlobalNamespace() || tc.Pointer().Class("SwShellTableCursor").GlobalNamespace()
+ || tc.Pointer().Class("SwBlockCursor").GlobalNamespace() || tc.Pointer().Class("SwVisibleCursor").GlobalNamespace()
+ || tc.Pointer().Class("SwShellCursor").GlobalNamespace())
+ return;
// there is a loop in ~ImplPrnQueueList deleting stuff on a global data structure
if (loplugin::isSamePathname(aFileName, SRCDIR "/vcl/inc/print.h"))
return;