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/cstylecast.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/cstylecast.cxx')
-rw-r--r-- | compilerplugins/clang/cstylecast.cxx | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/compilerplugins/clang/cstylecast.cxx b/compilerplugins/clang/cstylecast.cxx index 4bf3aaf6460f..07f59d8858e5 100644 --- a/compilerplugins/clang/cstylecast.cxx +++ b/compilerplugins/clang/cstylecast.cxx @@ -234,7 +234,7 @@ bool CStyleCast::VisitCStyleCastExpr(const CStyleCastExpr * expr) { if( expr->getCastKind() == CK_ToVoid ) { return true; } - if (isSharedCAndCppCode(expr->getLocStart())) { + if (isSharedCAndCppCode(compat::getBeginLoc(expr))) { return true; } char const * perf = nullptr; @@ -407,8 +407,8 @@ bool CStyleCast::rewriteArithmeticCast(CStyleCastExpr const * expr, char const * firstBegin = compiler.getSourceManager().getSpellingLoc(firstBegin); secondBegin = compiler.getSourceManager().getSpellingLoc(secondBegin); } - auto third = sub->getLocStart(); - auto fourth = sub->getLocEnd(); + auto third = compat::getBeginLoc(sub); + auto fourth = compat::getEndLoc(sub); bool macro = false; // Ensure that // |