diff options
Diffstat (limited to 'compilerplugins/clang/unusedmethods.cxx')
-rw-r--r-- | compilerplugins/clang/unusedmethods.cxx | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/compilerplugins/clang/unusedmethods.cxx b/compilerplugins/clang/unusedmethods.cxx index a84b7e8d237d..5f998712d3ef 100644 --- a/compilerplugins/clang/unusedmethods.cxx +++ b/compilerplugins/clang/unusedmethods.cxx @@ -153,14 +153,19 @@ MyFuncInfo UnusedMethods::niceName(const FunctionDecl* functionDecl) aInfo.returnType = ""; } - if (const CXXMethodDecl* methodDecl = dyn_cast<CXXMethodDecl>(functionDecl)) { + if (auto methodDecl = dyn_cast<CXXMethodDecl>(functionDecl)) { const CXXRecordDecl* recordDecl = methodDecl->getParent(); - aInfo.nameAndParams += recordDecl->getQualifiedNameAsString(); - aInfo.nameAndParams += "::"; + aInfo.nameAndParams = recordDecl->getQualifiedNameAsString() + + "::" + + functionDecl->getNameAsString() + + "("; if (methodDecl->isVirtual()) aInfo.virtualness = "virtual"; } - aInfo.nameAndParams += functionDecl->getNameAsString() + "("; + else + { + aInfo.nameAndParams = functionDecl->getQualifiedNameAsString() + "("; + } bool bFirst = true; for (const ParmVarDecl *pParmVarDecl : compat::parameters(*functionDecl)) { if (bFirst) |