diff options
Diffstat (limited to 'compilerplugins/clang/stringconstant.cxx')
-rw-r--r-- | compilerplugins/clang/stringconstant.cxx | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/compilerplugins/clang/stringconstant.cxx b/compilerplugins/clang/stringconstant.cxx index 0555b20af24a..8c01c9e5c017 100644 --- a/compilerplugins/clang/stringconstant.cxx +++ b/compilerplugins/clang/stringconstant.cxx @@ -325,7 +325,8 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) { { // u.equalsIgnoreAsciiCaseAscii("foo") -> // u.equalsIngoreAsciiCase("foo"): - auto file = compiler.getSourceManager().getFilename( + + auto file = getFileNameOfSpellingLoc( compiler.getSourceManager().getSpellingLoc(expr->getLocStart())); if (loplugin::isSamePathname( file, SRCDIR "/sal/qa/rtl/strings/test_oustring_compare.cxx")) @@ -343,7 +344,7 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) { { // u.equalsIgnoreAsciiCaseAsciiL("foo", 3) -> // u.equalsIngoreAsciiCase("foo"): - auto file = compiler.getSourceManager().getFilename( + auto file = getFileNameOfSpellingLoc( compiler.getSourceManager().getSpellingLoc(expr->getLocStart())); if (loplugin::isSamePathname( file, SRCDIR "/sal/qa/rtl/strings/test_oustring_compare.cxx")) @@ -710,7 +711,7 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) { case 2: { // b.append("foo", 3) -> b.append("foo"): - auto file = compiler.getSourceManager().getFilename( + auto file = getFileNameOfSpellingLoc( compiler.getSourceManager().getSpellingLoc( expr->getLocStart())); if (loplugin::isSamePathname( @@ -1077,8 +1078,7 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) { if (dc.Operator(OO_Plus).Namespace("rtl") .GlobalNamespace()) { - auto file = - compiler.getSourceManager().getFilename( + auto file = getFileNameOfSpellingLoc( compiler.getSourceManager() .getSpellingLoc( expr->getLocStart())); |