summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compilerplugins/clang/refcounting.cxx8
1 files changed, 5 insertions, 3 deletions
diff --git a/compilerplugins/clang/refcounting.cxx b/compilerplugins/clang/refcounting.cxx
index 55eba9bc6217..7585858db85f 100644
--- a/compilerplugins/clang/refcounting.cxx
+++ b/compilerplugins/clang/refcounting.cxx
@@ -69,7 +69,7 @@ public:
}
private:
void checkUnoReference(QualType qt, const Decl* decl,
- const DeclContext* parent, const std::string& rDeclName);
+ const RecordDecl* parent, const std::string& rDeclName);
bool visitTemporaryObjectExpr(Expr const * expr);
};
@@ -333,7 +333,7 @@ static bool containsStaticTypeMethod(const CXXRecordDecl* x)
return false;
}
-void RefCounting::checkUnoReference(QualType qt, const Decl* decl, const DeclContext* parent, const std::string& rDeclName)
+void RefCounting::checkUnoReference(QualType qt, const Decl* decl, const RecordDecl* parent, const std::string& rDeclName)
{
if (loplugin::TypeCheck(qt).Class("Reference").Namespace("uno").Namespace("star").Namespace("sun").Namespace("com").GlobalNamespace()) {
const CXXRecordDecl* pRecordDecl = qt->getAsCXXRecordDecl();
@@ -347,7 +347,9 @@ void RefCounting::checkUnoReference(QualType qt, const Decl* decl, const DeclCon
" contain ::static_type() %1%select{|, parent is %3,}2 should"
" probably be using rtl::Reference instead"),
decl->getLocation())
- << rDeclName << qt << (parent != nullptr) << parent
+ << rDeclName << qt << (parent != nullptr)
+ << (parent != nullptr
+ ? parent->getQualifiedNameAsString() : std::string())
<< decl->getSourceRange();
}
}