SourceManager::getFilename returns StringRef
Change-Id: I77db8565efe2e0d366afc8470308d7801a2a7337
This commit is contained in:
@@ -318,10 +318,8 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) {
|
|||||||
{
|
{
|
||||||
// u.equalsIgnoreAsciiCaseAscii("foo") ->
|
// u.equalsIgnoreAsciiCaseAscii("foo") ->
|
||||||
// u.equalsIngoreAsciiCase("foo"):
|
// u.equalsIngoreAsciiCase("foo"):
|
||||||
std::string file(
|
auto file = compiler.getSourceManager().getFilename(
|
||||||
compiler.getSourceManager().getFilename(
|
compiler.getSourceManager().getSpellingLoc(expr->getLocStart()));
|
||||||
compiler.getSourceManager().getSpellingLoc(
|
|
||||||
expr->getLocStart())));
|
|
||||||
if (file == SRCDIR "/sal/qa/rtl/strings/test_oustring_compare.cxx") {
|
if (file == SRCDIR "/sal/qa/rtl/strings/test_oustring_compare.cxx") {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -336,10 +334,8 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) {
|
|||||||
{
|
{
|
||||||
// u.equalsIgnoreAsciiCaseAsciiL("foo", 3) ->
|
// u.equalsIgnoreAsciiCaseAsciiL("foo", 3) ->
|
||||||
// u.equalsIngoreAsciiCase("foo"):
|
// u.equalsIngoreAsciiCase("foo"):
|
||||||
std::string file(
|
auto file = compiler.getSourceManager().getFilename(
|
||||||
compiler.getSourceManager().getFilename(
|
compiler.getSourceManager().getSpellingLoc(expr->getLocStart()));
|
||||||
compiler.getSourceManager().getSpellingLoc(
|
|
||||||
expr->getLocStart())));
|
|
||||||
if (file == SRCDIR "/sal/qa/rtl/strings/test_oustring_compare.cxx") {
|
if (file == SRCDIR "/sal/qa/rtl/strings/test_oustring_compare.cxx") {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -703,10 +699,9 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) {
|
|||||||
case 2:
|
case 2:
|
||||||
{
|
{
|
||||||
// b.append("foo", 3) -> b.append("foo"):
|
// b.append("foo", 3) -> b.append("foo"):
|
||||||
std::string file(
|
auto file = compiler.getSourceManager().getFilename(
|
||||||
compiler.getSourceManager().getFilename(
|
compiler.getSourceManager().getSpellingLoc(
|
||||||
compiler.getSourceManager().getSpellingLoc(
|
expr->getLocStart()));
|
||||||
expr->getLocStart())));
|
|
||||||
if (file
|
if (file
|
||||||
== SRCDIR "/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx")
|
== SRCDIR "/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx")
|
||||||
{
|
{
|
||||||
@@ -990,11 +985,11 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) {
|
|||||||
if (dc.Operator(OO_Plus).Namespace("rtl")
|
if (dc.Operator(OO_Plus).Namespace("rtl")
|
||||||
.GlobalNamespace())
|
.GlobalNamespace())
|
||||||
{
|
{
|
||||||
std::string file(
|
auto file =
|
||||||
compiler.getSourceManager().getFilename(
|
compiler.getSourceManager().getFilename(
|
||||||
compiler.getSourceManager()
|
compiler.getSourceManager()
|
||||||
.getSpellingLoc(
|
.getSpellingLoc(
|
||||||
expr->getLocStart())));
|
expr->getLocStart()));
|
||||||
if (file
|
if (file
|
||||||
== (SRCDIR
|
== (SRCDIR
|
||||||
"/sal/qa/rtl/strings/test_ostring_concat.cxx")
|
"/sal/qa/rtl/strings/test_ostring_concat.cxx")
|
||||||
|
Reference in New Issue
Block a user