summaryrefslogtreecommitdiffstats
path: root/compilerplugins
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2020-09-03 14:51:10 +0200
committerStephan Bergmann <sbergman@redhat.com>2020-09-03 16:57:06 +0200
commitea061cbe1bfb912c692473bb5e2755b3e15ac375 (patch)
treef4329ee327a9ca711fbefc978a042291f30e84da /compilerplugins
parentsw: insert plain tab char at a numbered para start if indent wouldn't change (diff)
downloadcore-ea061cbe1bfb912c692473bb5e2755b3e15ac375.tar.gz
core-ea061cbe1bfb912c692473bb5e2755b3e15ac375.zip
Fix check for member Decl's name
...as some members like OUString::operator std::u16string_view() don't have a name Change-Id: I3ac9bbc43cdf899d4ab0483a95f00097f4b6f20a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/102001 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins')
-rw-r--r--compilerplugins/clang/stringstatic.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/compilerplugins/clang/stringstatic.cxx b/compilerplugins/clang/stringstatic.cxx
index c5753445fc34..fcc984b0515b 100644
--- a/compilerplugins/clang/stringstatic.cxx
+++ b/compilerplugins/clang/stringstatic.cxx
@@ -187,7 +187,8 @@ bool StringStatic::VisitMemberExpr(MemberExpr const * expr)
return true;
if (potentialVars.count(varDecl) == 0)
return true;
- if (expr->getMemberDecl()->getName() != "pData") {
+ auto const id = expr->getMemberDecl()->getIdentifier();
+ if (id == nullptr || id->getName() != "pData") {
return true;
}
excludeVars.insert(varDecl);