diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2018-08-10 12:35:21 +0200 |
---|---|---|
committer | Stephan Bergmann <sbergman@redhat.com> | 2018-08-10 15:14:03 +0200 |
commit | 3cc5149a84c7b8cfaf0deb2e2f6c88c72343ee28 (patch) | |
tree | 07bfda734ee36d2ca1dc83e2ac4a1c6ef3222691 /compilerplugins/clang/stringconstant.cxx | |
parent | d1a19ef614fd1bf115af15d3cb16e24150d4ceb7 (diff) |
Avoid -Werror=deprecated-declarations with recent Clang trunk
...which first added alternative names to and then deprecated getLocBegin/End
Change-Id: Iaefb8ce259057abfa6cd20f0b63c0ef2949a96b2
Reviewed-on: https://gerrit.libreoffice.org/58820
Tested-by: Jenkins
Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/stringconstant.cxx')
-rw-r--r-- | compilerplugins/clang/stringconstant.cxx | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/compilerplugins/clang/stringconstant.cxx b/compilerplugins/clang/stringconstant.cxx index 8c01c9e5c017..a8914ff5385f 100644 --- a/compilerplugins/clang/stringconstant.cxx +++ b/compilerplugins/clang/stringconstant.cxx @@ -327,7 +327,7 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) { // u.equalsIngoreAsciiCase("foo"): auto file = getFileNameOfSpellingLoc( - compiler.getSourceManager().getSpellingLoc(expr->getLocStart())); + compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(expr))); if (loplugin::isSamePathname( file, SRCDIR "/sal/qa/rtl/strings/test_oustring_compare.cxx")) { @@ -345,7 +345,7 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) { // u.equalsIgnoreAsciiCaseAsciiL("foo", 3) -> // u.equalsIngoreAsciiCase("foo"): auto file = getFileNameOfSpellingLoc( - compiler.getSourceManager().getSpellingLoc(expr->getLocStart())); + compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(expr))); if (loplugin::isSamePathname( file, SRCDIR "/sal/qa/rtl/strings/test_oustring_compare.cxx")) { @@ -713,7 +713,7 @@ bool StringConstant::VisitCallExpr(CallExpr const * expr) { // b.append("foo", 3) -> b.append("foo"): auto file = getFileNameOfSpellingLoc( compiler.getSourceManager().getSpellingLoc( - expr->getLocStart())); + compat::getBeginLoc(expr))); if (loplugin::isSamePathname( file, SRCDIR "/sal/qa/OStringBuffer/rtl_OStringBuffer.cxx")) @@ -800,7 +800,7 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) { } // OSL_THIS_FUNC may be defined as "" or as something other // than a string literal in include/osl/diagnose.h: - auto loc = arg->getLocStart(); + auto loc = compat::getBeginLoc(arg); if (compiler.getSourceManager().isMacroBodyExpansion(loc) && (Lexer::getImmediateMacroName( loc, compiler.getSourceManager(), @@ -1081,7 +1081,7 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) { auto file = getFileNameOfSpellingLoc( compiler.getSourceManager() .getSpellingLoc( - expr->getLocStart())); + compat::getBeginLoc(expr))); if (loplugin::isSamePathname( file, (SRCDIR @@ -1094,7 +1094,7 @@ bool StringConstant::VisitCXXConstructExpr(CXXConstructExpr const * expr) { return true; } } - auto loc = expr->getArg(0)->getLocStart(); + auto loc = compat::getBeginLoc(expr->getArg(0)); while (compiler.getSourceManager() .isMacroArgExpansion(loc)) { @@ -1855,7 +1855,7 @@ void StringConstant::handleOUStringCtor( } //TODO: cont, emb, trm if (rewriter != nullptr) { - auto loc1 = e3->getLocStart(); + auto loc1 = compat::getBeginLoc(e3); auto range = e3->getParenOrBraceRange(); if (loc1.isFileID() && range.getBegin().isFileID() && range.getEnd().isFileID()) |