summaryrefslogtreecommitdiff
path: root/compilerplugins
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-12-10 11:28:59 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-12-11 06:26:48 +0100
commit1cd32bcf1b92bd53320717626601135623dadd55 (patch)
tree5f33c3b070ac297bdba6bacb904d4ecd9644bef8 /compilerplugins
parent34d5e910adba4094bba1303284f9552028d0b019 (diff)
loplugin:useuniqueptr in vcl
Change-Id: I24eca813321fd3919bba9d37c285484f865ea2ea Reviewed-on: https://gerrit.libreoffice.org/64877 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/useuniqueptr.cxx11
1 files changed, 9 insertions, 2 deletions
diff --git a/compilerplugins/clang/useuniqueptr.cxx b/compilerplugins/clang/useuniqueptr.cxx
index 1f0f9d649317..71f842bde07e 100644
--- a/compilerplugins/clang/useuniqueptr.cxx
+++ b/compilerplugins/clang/useuniqueptr.cxx
@@ -477,14 +477,15 @@ void UseUniquePtr::CheckDeleteLocalVar(const FunctionDecl* functionDecl, const C
// linked list
if (parentName == "ScFunctionList" || parentName == "SwNodes"
|| parentName == "SwUnoCursor" || parentName == "SortedResultSet"
- || parentName == "Atom")
+ || parentName == "Atom" || parentName == "RegionBand" || parentName == "WMFWriter"
+ || parentName == "Scheduler" || parentName == "OpenGLContext")
return;
// manual ref counting
if (parentName == "ScBroadcastAreaSlot")
return;
// complicated
if (parentName == "SwFormatField" || parentName == "FontPropertyBox" || parentName == "SdFontPropertyBox"
- || parentName == "SwHTMLParser")
+ || parentName == "SwHTMLParser" || parentName == "PDFWriterImpl")
return;
if (functionDecl->getIdentifier())
@@ -516,6 +517,12 @@ void UseUniquePtr::CheckDeleteLocalVar(const FunctionDecl* functionDecl, const C
// very dodgy
if (name == "UCBStorage::OpenStorage_Impl")
return;
+ // complicated ownership
+ if (name == "ParseCMAP" || name == "OpenGLSalBitmap::CreateTexture" || name == "X11SalGraphicsImpl::drawAlphaBitmap")
+ return;
+ // complicated delete
+ if (name == "X11SalObject::CreateObject")
+ return;
}
report(