summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/shouldreturnbool.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/shouldreturnbool.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/shouldreturnbool.cxx')
-rw-r--r--compilerplugins/clang/shouldreturnbool.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/compilerplugins/clang/shouldreturnbool.cxx b/compilerplugins/clang/shouldreturnbool.cxx
index ea9e696674de..937dba126da0 100644
--- a/compilerplugins/clang/shouldreturnbool.cxx
+++ b/compilerplugins/clang/shouldreturnbool.cxx
@@ -111,12 +111,12 @@ public:
continue;
report(DiagnosticsEngine::Warning,
"only returning one or zero is an indication you want to return bool",
- functionDecl->getLocStart())
+ compat::getBeginLoc(functionDecl))
<< functionDecl->getSourceRange();
if (canonicalDecl->getLocation() != functionDecl->getLocation())
{
report(DiagnosticsEngine::Note, "canonical function declaration here",
- canonicalDecl->getLocStart())
+ compat::getBeginLoc(canonicalDecl))
<< canonicalDecl->getSourceRange();
}
}