[Libreoffice-commits] core.git: compilerplugins/clang
Stephan Bergmann
sbergman at redhat.com
Fri Jun 30 12:05:18 UTC 2017
compilerplugins/clang/refcounting.cxx | 8 +++++---
1 file changed, 5 insertions(+), 3 deletions(-)
New commits:
commit ce1613ae0d738c6e4148a106c66a33b2f3223c3b
Author: Stephan Bergmann <sbergman at redhat.com>
Date: Fri Jun 30 14:04:42 2017 +0200
Actually print parent name
Change-Id: Iba9bacc0ecaf5288f5c53f6fa73340504c646b4f
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();
}
}
More information about the Libreoffice-commits
mailing list