summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/expressionalwayszero.cxx
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2022-02-15 15:03:24 +0100
committerStephan Bergmann <sbergman@redhat.com>2022-02-17 21:45:06 +0100
commitd1a2b80b9dc146c7fe63d2657e5506f49d6e5c0d (patch)
tree7ceeb7e977c660d5b69bc93e8327674b7ea1ae5d /compilerplugins/clang/expressionalwayszero.cxx
parenteed401bc7429f29f1b21cf8e3b08969e011d5692 (diff)
Bump compiler plugins Clang baseline to 12.0.1
...as discussed in the mail thread starting at <https://lists.freedesktop.org/archives/libreoffice/2020-November/086234.html> "Bump --enable-compiler-plugins Clang baseline?" (and now picked up again at <https://lists.freedesktop.org/archives/libreoffice/2022-February/088459.html> "Re: Bump --enable-compiler-plugins Clang baseline?"), and clean up compilerplugins/clang/ accordingly Change-Id: I5e81c6fdcc363aeefd6227606225b526fdf7ac16 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/129989 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
Diffstat (limited to 'compilerplugins/clang/expressionalwayszero.cxx')
-rw-r--r--compilerplugins/clang/expressionalwayszero.cxx8
1 files changed, 4 insertions, 4 deletions
diff --git a/compilerplugins/clang/expressionalwayszero.cxx b/compilerplugins/clang/expressionalwayszero.cxx
index b5650aa076a2..f741d30c426b 100644
--- a/compilerplugins/clang/expressionalwayszero.cxx
+++ b/compilerplugins/clang/expressionalwayszero.cxx
@@ -72,7 +72,7 @@ bool ExpressionAlwaysZero::VisitBinaryOperator(BinaryOperator const* binaryOpera
{
if (ignoreLocation(binaryOperator))
return true;
- if (compat::getBeginLoc(binaryOperator).isMacroID())
+ if (binaryOperator->getBeginLoc().isMacroID())
return true;
auto op = binaryOperator->getOpcode();
@@ -90,7 +90,7 @@ bool ExpressionAlwaysZero::VisitBinaryOperator(BinaryOperator const* binaryOpera
else
return true;
report(DiagnosticsEngine::Warning, "expression always evaluates to zero, lhs=%0 rhs=%1",
- compat::getBeginLoc(binaryOperator))
+ binaryOperator->getBeginLoc())
<< (lhsValue ? compat::toString(*lhsValue, 10) : "unknown")
<< (rhsValue ? compat::toString(*rhsValue, 10) : "unknown")
<< binaryOperator->getSourceRange();
@@ -101,7 +101,7 @@ bool ExpressionAlwaysZero::VisitCXXOperatorCallExpr(CXXOperatorCallExpr const* c
{
if (ignoreLocation(cxxOperatorCallExpr))
return true;
- if (compat::getBeginLoc(cxxOperatorCallExpr).isMacroID())
+ if (cxxOperatorCallExpr->getBeginLoc().isMacroID())
return true;
auto op = cxxOperatorCallExpr->getOperator();
@@ -121,7 +121,7 @@ bool ExpressionAlwaysZero::VisitCXXOperatorCallExpr(CXXOperatorCallExpr const* c
else
return true;
report(DiagnosticsEngine::Warning, "expression always evaluates to zero, lhs=%0 rhs=%1",
- compat::getBeginLoc(cxxOperatorCallExpr))
+ cxxOperatorCallExpr->getBeginLoc())
<< (lhsValue ? compat::toString(*lhsValue, 10) : "unknown")
<< (rhsValue ? compat::toString(*rhsValue, 10) : "unknown")
<< cxxOperatorCallExpr->getSourceRange();