summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/redundantinline.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2018-08-10 12:35:21 +0200
committerStephan Bergmann <sbergman@redhat.com>2018-08-10 15:14:03 +0200
commit3cc5149a84c7b8cfaf0deb2e2f6c88c72343ee28 (patch)
tree07bfda734ee36d2ca1dc83e2ac4a1c6ef3222691 /compilerplugins/clang/redundantinline.cxx
parentd1a19ef614fd1bf115af15d3cb16e24150d4ceb7 (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/redundantinline.cxx')
-rw-r--r--compilerplugins/clang/redundantinline.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/compilerplugins/clang/redundantinline.cxx b/compilerplugins/clang/redundantinline.cxx
index 67347febb443..70cdbd6fdce6 100644
--- a/compilerplugins/clang/redundantinline.cxx
+++ b/compilerplugins/clang/redundantinline.cxx
@@ -35,18 +35,18 @@ public:
{
return true;
}
- auto l1 = unwindToQObject(decl->getLocStart());
- if (l1.isValid() && l1 == unwindToQObject(decl->getLocEnd())) {
+ auto l1 = unwindToQObject(compat::getBeginLoc(decl));
+ if (l1.isValid() && l1 == unwindToQObject(compat::getEndLoc(decl))) {
return true;
}
SourceLocation inlineLoc;
unsigned n;
auto end = Lexer::getLocForEndOfToken(
- compiler.getSourceManager().getExpansionLoc(decl->getLocEnd()), 0,
+ compiler.getSourceManager().getExpansionLoc(compat::getEndLoc(decl)), 0,
compiler.getSourceManager(), compiler.getLangOpts());
assert(end.isValid());
for (auto loc = compiler.getSourceManager().getExpansionLoc(
- decl->getLocStart());
+ compat::getBeginLoc(decl));
loc != end; loc = loc.getLocWithOffset(std::max<unsigned>(n, 1)))
{
n = Lexer::MeasureTokenLength(
@@ -102,7 +102,7 @@ public:
report(
DiagnosticsEngine::Warning,
"function definition redundantly declared 'inline'",
- inlineLoc.isValid() ? inlineLoc : decl->getLocStart())
+ inlineLoc.isValid() ? inlineLoc : compat::getBeginLoc(decl))
<< decl->getSourceRange();
return true;
}