summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/refcounting.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2017-12-01 11:24:04 +0100
committerStephan Bergmann <sbergman@redhat.com>2017-12-01 16:31:48 +0100
commit5066377bbeab1000f31e3fa689bad2ff8bf35295 (patch)
treeeb854b186ceaf3ca38a3c2270e5dad5a7c7f8876 /compilerplugins/clang/refcounting.cxx
parent01283fe86cc523f1bed38bdfc5fbcb1694972169 (diff)
Don't prevent ODatabaseDocument refcount from dropping to zero
...preventing the dtor from ever being called. (DocumentEvents forwards its acquire/release calls to its m_pData->rParent, i.e., the ODatabaseDocument, for better or worse.) This caused ODatabaseDocument instances to be leaked during e.g. JunitTest_dbaccess_complex. Regression introduced with de2ac128da025502c533f8cede5862e054dd9c44 "loplugin:useuniqueptr in dbaccess". Change-Id: Ida073c7e576b88e0d1d1a90253445e946e6eac99 Reviewed-on: https://gerrit.libreoffice.org/45652 Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/refcounting.cxx')
-rw-r--r--compilerplugins/clang/refcounting.cxx3
1 files changed, 3 insertions, 0 deletions
diff --git a/compilerplugins/clang/refcounting.cxx b/compilerplugins/clang/refcounting.cxx
index 8091fb3ee0cd..58a9884ede0d 100644
--- a/compilerplugins/clang/refcounting.cxx
+++ b/compilerplugins/clang/refcounting.cxx
@@ -479,6 +479,8 @@ bool RefCounting::VisitFieldDecl(const FieldDecl * fieldDecl) {
<< fieldDecl->getSourceRange();
}
+// Not in general (dbaccess::DocumentEvents, dbaccess/source/core/dataaccess/databasedocument.hxx):
+#if 0
if (!firstTemplateParamType.isNull() && containsXInterfaceSubclass(firstTemplateParamType))
{
report(
@@ -490,6 +492,7 @@ bool RefCounting::VisitFieldDecl(const FieldDecl * fieldDecl) {
<< fieldDecl->getParent()
<< fieldDecl->getSourceRange();
}
+#endif
checkUnoReference(
fieldDecl->getType(), fieldDecl,