clang plugins: do "dotdot" normalisation

which fixes some false positives

Change-Id: I555349180b5ca819f29695789f1545ba2177bd09
Reviewed-on: https://gerrit.libreoffice.org/29320
Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Tested-by: Noel Grandin <noel.grandin@collabora.co.uk>
This commit is contained in:
Noel Grandin
2016-09-27 10:00:03 +02:00
parent 7c3cb23136
commit 3468dab9ff
9 changed files with 42 additions and 28 deletions

View File

@@ -166,6 +166,7 @@ MyFuncInfo UnusedMethods::niceName(const FunctionDecl* functionDecl)
SourceLocation expansionLoc = compiler.getSourceManager().getExpansionLoc( functionDecl->getLocation() );
StringRef name = compiler.getSourceManager().getFilename(expansionLoc);
aInfo.sourceLocation = std::string(name.substr(strlen(SRCDIR)+1)) + ":" + std::to_string(compiler.getSourceManager().getSpellingLineNumber(expansionLoc));
normalizeDotDotInFilePath(aInfo.sourceLocation);
return aInfo;
}