Adapt pathname checks to mixed usage of \ and / on Windows
Change-Id: I91bc89a9076c6642e06b238f65f2d31a1d20c6b5
This commit is contained in:
@@ -320,7 +320,9 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) {
|
||||
// u.equalsIngoreAsciiCase("foo"):
|
||||
auto file = compiler.getSourceManager().getFilename(
|
||||
compiler.getSourceManager().getSpellingLoc(expr->getLocStart()));
|
||||
if (file == SRCDIR "/sal/qa/rtl/strings/test_oustring_compare.cxx") {
|
||||
if (loplugin::isSamePathname(
|
||||
file, SRCDIR "/sal/qa/rtl/strings/test_oustring_compare.cxx"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
handleChar(
|
||||
@@ -336,7 +338,9 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) {
|
||||
// u.equalsIngoreAsciiCase("foo"):
|
||||
auto file = compiler.getSourceManager().getFilename(
|
||||
compiler.getSourceManager().getSpellingLoc(expr->getLocStart()));
|
||||
if (file == SRCDIR "/sal/qa/rtl/strings/test_oustring_compare.cxx") {
|
||||
if (loplugin::isSamePathname(
|
||||
file, SRCDIR "/sal/qa/rtl/strings/test_oustring_compare.cxx"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
handleCharLen(
|
||||
@@ -702,8 +706,9 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) {
|
||||
auto file = compiler.getSourceManager().getFilename(
|
||||
compiler.getSourceManager().getSpellingLoc(
|
||||
expr->getLocStart()));
|
||||
if (file
|
||||
== SRCDIR "/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx")
|
||||
if (loplugin::isSamePathname(
|
||||
file,
|
||||
SRCDIR "/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx"))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
@@ -990,12 +995,14 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
|
||||
compiler.getSourceManager()
|
||||
.getSpellingLoc(
|
||||
expr->getLocStart()));
|
||||
if (file
|
||||
== (SRCDIR
|
||||
"/sal/qa/rtl/strings/test_ostring_concat.cxx")
|
||||
|| (file
|
||||
== (SRCDIR
|
||||
"/sal/qa/rtl/strings/test_oustring_concat.cxx")))
|
||||
if (loplugin::isSamePathname(
|
||||
file,
|
||||
(SRCDIR
|
||||
"/sal/qa/rtl/strings/test_ostring_concat.cxx"))
|
||||
|| loplugin::isSamePathname(
|
||||
file,
|
||||
(SRCDIR
|
||||
"/sal/qa/rtl/strings/test_oustring_concat.cxx")))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
Reference in New Issue
Block a user