better name for a function in compilerplugins

The function is not just about a spelling location.

Change-Id: I96e9e9ef7e27a9763397b4b86473c1c30d0e3eeb
Reviewed-on: https://gerrit.libreoffice.org/80381
Tested-by: Jenkins
Reviewed-by: Luboš Luňák <l.lunak@collabora.com>
This commit is contained in:
Luboš Luňák
2019-10-07 15:29:30 +02:00
parent 412c6c1ca9
commit bef96f7a7b
52 changed files with 74 additions and 71 deletions

View File

@@ -67,7 +67,7 @@ static bool isDerivedFrom(const CXXRecordDecl* subtypeRecord, const CXXRecordDec
bool ReferenceCasting::VisitCXXConstructExpr(const CXXConstructExpr* cce)
{
// don't bother processing anything in the Reference.h file. Makes my life easier when debugging this.
StringRef aFileName = getFileNameOfSpellingLoc(
StringRef aFileName = getFilenameOfLocation(
compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(cce)));
if (loplugin::isSamePathname(aFileName, SRCDIR "/include/com/sun/star/uno/Reference.h"))
return true;
@@ -178,7 +178,7 @@ bool ReferenceCasting::VisitCXXConstructExpr(const CXXConstructExpr* cce)
bool ReferenceCasting::VisitCXXMemberCallExpr(const CXXMemberCallExpr* mce)
{
// don't bother processing anything in the Reference.h file. Makes my life easier when debugging this.
StringRef aFileName = getFileNameOfSpellingLoc(
StringRef aFileName = getFilenameOfLocation(
compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(mce)));
if (loplugin::isSamePathname(aFileName, SRCDIR "/include/com/sun/star/uno/Reference.h"))
return true;
@@ -308,7 +308,7 @@ bool ReferenceCasting::CheckForUnnecessaryGet(const Expr* expr)
if (!loplugin::DeclCheck(methodDecl->getParent()).Class("Reference").Namespace("uno"))
return false;
StringRef aFileName = getFileNameOfSpellingLoc(
StringRef aFileName = getFilenameOfLocation(
compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(expr)));
if (loplugin::isSamePathname(aFileName, SRCDIR "/cppu/qa/test_reference.cxx"))
return false;