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>
This commit is contained in:
Stephan Bergmann
2018-08-10 12:35:21 +02:00
parent d1a19ef614
commit 3cc5149a84
64 changed files with 395 additions and 323 deletions

View File

@@ -686,7 +686,7 @@ bool ImplicitBoolConversion::TraverseBinAndAssign(CompoundAssignOperator * expr)
{
report(
DiagnosticsEngine::Warning, "mix of %0 and %1 in operator &=",
expr->getRHS()->getLocStart())
compat::getBeginLoc(expr->getRHS()))
<< expr->getLHS()->getType()
<< expr->getRHS()->IgnoreParenImpCasts()->getType()
<< expr->getSourceRange();
@@ -712,7 +712,7 @@ bool ImplicitBoolConversion::TraverseBinOrAssign(CompoundAssignOperator * expr)
{
report(
DiagnosticsEngine::Warning, "mix of %0 and %1 in operator |=",
expr->getRHS()->getLocStart())
compat::getBeginLoc(expr->getRHS()))
<< expr->getLHS()->getType()
<< expr->getRHS()->IgnoreParenImpCasts()->getType()
<< expr->getSourceRange();
@@ -738,7 +738,7 @@ bool ImplicitBoolConversion::TraverseBinXorAssign(CompoundAssignOperator * expr)
{
report(
DiagnosticsEngine::Warning, "mix of %0 and %1 in operator ^=",
expr->getRHS()->getLocStart())
compat::getBeginLoc(expr->getRHS()))
<< expr->getLHS()->getType()
<< expr->getRHS()->IgnoreParenImpCasts()->getType()
<< expr->getSourceRange();
@@ -870,7 +870,7 @@ bool ImplicitBoolConversion::VisitImplicitCastExpr(
DiagnosticsEngine::Warning,
("explicit conversion (%0) from %1 to %2 implicitly cast back"
" to %3"),
expr->getLocStart())
compat::getBeginLoc(expr))
<< sub->getCastKindName() << subsub->getType() << sub->getType()
<< expr->getType() << expr->getSourceRange();
return true;
@@ -888,7 +888,7 @@ bool ImplicitBoolConversion::VisitImplicitCastExpr(
report(
DiagnosticsEngine::Warning,
"implicit conversion (%0) of call argument from %1 to %2",
expr->getLocStart())
compat::getBeginLoc(expr))
<< expr->getCastKindName() << expr->getSubExpr()->getType()
<< expr->getType() << expr->getSourceRange();
return true;
@@ -912,7 +912,7 @@ bool ImplicitBoolConversion::VisitMaterializeTemporaryExpr(
DiagnosticsEngine::Warning,
("explicit conversion (%0) from %1 to %2 implicitly converted"
" back to %3"),
expr->getLocStart())
compat::getBeginLoc(expr))
<< sub->getCastKindName() << subsub->getType() << sub->getType()
<< expr->getType() << expr->getSourceRange();
return true;
@@ -1017,7 +1017,7 @@ void ImplicitBoolConversion::reportWarning(ImplicitCastExpr const * expr) {
if (compiler.getLangOpts().CPlusPlus) {
report(
DiagnosticsEngine::Warning,
"implicit conversion (%0) from %1 to %2", expr->getLocStart())
"implicit conversion (%0) from %1 to %2", compat::getBeginLoc(expr))
<< expr->getCastKindName() << expr->getSubExprAsWritten()->getType()
<< expr->getType() << expr->getSourceRange();
}