diff options
author | Luboš Luňák <l.lunak@collabora.com> | 2019-10-07 15:29:30 +0200 |
---|---|---|
committer | Luboš Luňák <l.lunak@collabora.com> | 2019-10-08 20:46:36 +0200 |
commit | bef96f7a7b4d1dc7bcb01c949e0ae296c969dcee (patch) | |
tree | 77462295af716f5afb2645fadcc4034855ee4ee6 /compilerplugins/clang/vclwidgets.cxx | |
parent | 412c6c1ca9a9ed5c585935e8b6cfc70f1a7152c4 (diff) |
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>
Diffstat (limited to 'compilerplugins/clang/vclwidgets.cxx')
-rw-r--r-- | compilerplugins/clang/vclwidgets.cxx | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/compilerplugins/clang/vclwidgets.cxx b/compilerplugins/clang/vclwidgets.cxx index 45dbe450ec87..46933a5087c5 100644 --- a/compilerplugins/clang/vclwidgets.cxx +++ b/compilerplugins/clang/vclwidgets.cxx @@ -241,7 +241,7 @@ bool VCLWidgets::VisitCXXDestructorDecl(const CXXDestructorDecl* pCXXDestructorD if (!bOk) { SourceLocation spellingLocation = compiler.getSourceManager().getSpellingLoc( compat::getBeginLoc(pCXXDestructorDecl)); - StringRef filename = getFileNameOfSpellingLoc(spellingLocation); + StringRef filename = getFilenameOfLocation(spellingLocation); if ( !(loplugin::isSamePathname(filename, SRCDIR "/vcl/source/window/window.cxx")) && !(loplugin::isSamePathname(filename, SRCDIR "/vcl/source/gdi/virdev.cxx")) && !(loplugin::isSamePathname(filename, SRCDIR "/vcl/qa/cppunit/lifecycle.cxx")) @@ -281,7 +281,7 @@ void VCLWidgets::checkAssignmentForVclPtrToRawConversion(const SourceLocation& s if (!rhs) { return; } - StringRef filename = getFileNameOfSpellingLoc(spellingLocation); + StringRef filename = getFilenameOfLocation(spellingLocation); if (loplugin::isSamePathname(filename, SRCDIR "/include/rtl/ref.hxx")) { return; } @@ -363,7 +363,7 @@ bool VCLWidgets::VisitVarDecl(const VarDecl * pVarDecl) { if (pVarDecl->getInit()) { checkAssignmentForVclPtrToRawConversion(spellingLocation, pVarDecl->getType().getTypePtr(), pVarDecl->getInit()); } - StringRef aFileName = getFileNameOfSpellingLoc(spellingLocation); + StringRef aFileName = getFilenameOfLocation(spellingLocation); if (loplugin::isSamePathname(aFileName, SRCDIR "/include/vcl/vclptr.hxx")) return true; if (loplugin::isSamePathname(aFileName, SRCDIR "/vcl/source/window/layout.cxx")) @@ -415,7 +415,7 @@ bool VCLWidgets::VisitFieldDecl(const FieldDecl * fieldDecl) { if (ignoreLocation(fieldDecl)) { return true; } - StringRef aFileName = getFileNameOfSpellingLoc( + StringRef aFileName = getFilenameOfLocation( compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(fieldDecl))); if (loplugin::isSamePathname(aFileName, SRCDIR "/include/vcl/vclptr.hxx")) return true; @@ -673,7 +673,7 @@ bool VCLWidgets::VisitCXXDeleteExpr(const CXXDeleteExpr *pCXXDeleteExpr) if (pPointee && isDerivedFromVclReferenceBase(pPointee)) { SourceLocation spellingLocation = compiler.getSourceManager().getSpellingLoc( compat::getBeginLoc(pCXXDeleteExpr)); - StringRef filename = getFileNameOfSpellingLoc(spellingLocation); + StringRef filename = getFilenameOfLocation(spellingLocation); if ( !(loplugin::isSamePathname(filename, SRCDIR "/include/vcl/vclreferencebase.hxx"))) { report( @@ -849,7 +849,7 @@ bool VCLWidgets::VisitCXXConstructExpr( const CXXConstructExpr* constructExpr ) const CXXConstructorDecl* pConstructorDecl = constructExpr->getConstructor(); const CXXRecordDecl* recordDecl = pConstructorDecl->getParent(); if (isDerivedFromVclReferenceBase(recordDecl)) { - StringRef aFileName = getFileNameOfSpellingLoc( + StringRef aFileName = getFilenameOfLocation( compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(constructExpr))); if (!loplugin::isSamePathname(aFileName, SRCDIR "/include/vcl/vclptr.hxx")) { report( |