diff options
Diffstat (limited to 'compilerplugins')
-rw-r--r-- | compilerplugins/clang/stringstatic.cxx | 3 |
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); |