summaryrefslogtreecommitdiffstats
path: root/compilerplugins/clang/dodgyswitch.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/dodgyswitch.cxx
parenttdf#42949 Fix IWYU warnings in include/salhelper/* (diff)
downloadcore-3cc5149a84c7b8cfaf0deb2e2f6c88c72343ee28.tar.gz
core-3cc5149a84c7b8cfaf0deb2e2f6c88c72343ee28.zip
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/dodgyswitch.cxx')
-rw-r--r--compilerplugins/clang/dodgyswitch.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/compilerplugins/clang/dodgyswitch.cxx b/compilerplugins/clang/dodgyswitch.cxx
index 98ac1c161ef5..066d4fcebebb 100644
--- a/compilerplugins/clang/dodgyswitch.cxx
+++ b/compilerplugins/clang/dodgyswitch.cxx
@@ -41,7 +41,7 @@ bool DodgySwitch::VisitDefaultStmt(DefaultStmt const * defaultStmt)
if (!IsParentSwitch(defaultStmt))
report(
DiagnosticsEngine::Warning, "default statement not directly under switch",
- defaultStmt->getLocStart())
+ compat::getBeginLoc(defaultStmt))
<< defaultStmt->getSourceRange();
return true;
}
@@ -55,7 +55,7 @@ bool DodgySwitch::VisitCaseStmt(CaseStmt const * caseStmt)
//parentStmt(parentStmt(caseStmt))->dump();
report(
DiagnosticsEngine::Warning, "case statement not directly under switch",
- caseStmt->getLocStart())
+ compat::getBeginLoc(caseStmt))
<< caseStmt->getSourceRange();
}
return true;