diff options
author | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-26 14:07:28 +0200 |
---|---|---|
committer | Noel Grandin <noel.grandin@collabora.co.uk> | 2018-06-27 08:34:48 +0200 |
commit | bf82016b20b9d5da1c3ce06258f77cfc2c66afac (patch) | |
tree | 3767c2d2f4b073ee2e0b6c1d4d01f6d73b96eee2 /compilerplugins | |
parent | 20dfe973a8c1ef0d873aca735711e288734c5cba (diff) |
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')
-rw-r--r-- | compilerplugins/clang/useuniqueptr.cxx | 5 |
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; |