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/automem.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/automem.cxx')
-rw-r--r-- | compilerplugins/clang/automem.cxx | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/compilerplugins/clang/automem.cxx b/compilerplugins/clang/automem.cxx index 4675c02325be..5c3d740bb9d0 100644 --- a/compilerplugins/clang/automem.cxx +++ b/compilerplugins/clang/automem.cxx @@ -51,7 +51,7 @@ bool AutoMem::VisitCXXDeleteExpr(const CXXDeleteExpr* expr) { if (ignoreLocation( expr )) return true; - StringRef aFileName = getFileNameOfSpellingLoc(compiler.getSourceManager().getSpellingLoc(expr->getLocStart())); + StringRef aFileName = getFileNameOfSpellingLoc(compiler.getSourceManager().getSpellingLoc(compat::getBeginLoc(expr))); if (loplugin::hasPathnamePrefix(aFileName, SRCDIR "/include/salhelper/") || loplugin::hasPathnamePrefix(aFileName, SRCDIR "/include/osl/") || loplugin::hasPathnamePrefix(aFileName, SRCDIR "/salhelper/") @@ -79,7 +79,7 @@ bool AutoMem::VisitCXXDeleteExpr(const CXXDeleteExpr* expr) report( DiagnosticsEngine::Warning, "calling delete on object field, rather use std::unique_ptr or std::scoped_ptr", - expr->getLocStart()) + compat::getBeginLoc(expr)) << expr->getSourceRange(); return true; } |