From 3cc5149a84c7b8cfaf0deb2e2f6c88c72343ee28 Mon Sep 17 00:00:00 2001 From: Stephan Bergmann Date: Fri, 10 Aug 2018 12:35:21 +0200 Subject: 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 --- compilerplugins/clang/flatten.cxx | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'compilerplugins/clang/flatten.cxx') diff --git a/compilerplugins/clang/flatten.cxx b/compilerplugins/clang/flatten.cxx index dd116d7a4ea5..40376d2e1678 100644 --- a/compilerplugins/clang/flatten.cxx +++ b/compilerplugins/clang/flatten.cxx @@ -204,7 +204,7 @@ bool Flatten::VisitIfStmt(IfStmt const * ifStmt) report( DiagnosticsEngine::Warning, "large if statement at end of function, rather invert the condition and exit early, and flatten the function", - ifStmt->getLocStart()) + compat::getBeginLoc(ifStmt)) << ifStmt->getSourceRange(); } return true; @@ -238,12 +238,12 @@ bool Flatten::VisitIfStmt(IfStmt const * ifStmt) report( DiagnosticsEngine::Warning, "unconditional throw in else branch, rather invert the condition, throw early, and flatten the normal case", - elseThrowExpr->getLocStart()) + compat::getBeginLoc(elseThrowExpr)) << elseThrowExpr->getSourceRange(); report( DiagnosticsEngine::Note, "if condition here", - ifStmt->getLocStart()) + compat::getBeginLoc(ifStmt)) << ifStmt->getSourceRange(); } } @@ -260,7 +260,7 @@ bool Flatten::VisitIfStmt(IfStmt const * ifStmt) report( DiagnosticsEngine::Warning, "unconditional throw in then branch, just flatten the else", - thenThrowExpr->getLocStart()) + compat::getBeginLoc(thenThrowExpr)) << thenThrowExpr->getSourceRange(); } } -- cgit