summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/intvsfloat.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/intvsfloat.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/intvsfloat.cxx')
-rw-r--r--compilerplugins/clang/intvsfloat.cxx7
1 files changed, 3 insertions, 4 deletions
diff --git a/compilerplugins/clang/intvsfloat.cxx b/compilerplugins/clang/intvsfloat.cxx
index d89b34155cce..771e2bca0db5 100644
--- a/compilerplugins/clang/intvsfloat.cxx
+++ b/compilerplugins/clang/intvsfloat.cxx
@@ -10,7 +10,6 @@
#include "plugin.hxx"
#include "check.hxx"
-#include "compat.hxx"
#include <iostream>
/**
@@ -55,7 +54,7 @@ bool IntVsFloat::VisitVarDecl(VarDecl const* varDecl)
if (static_cast<long>(*d) == *d)
return true;
report(DiagnosticsEngine::Warning, "assigning constant float value to int truncates data",
- compat::getBeginLoc(init))
+ init->getBeginLoc())
<< init->getSourceRange();
return true;
@@ -67,7 +66,7 @@ bool IntVsFloat::VisitBinaryOperator(BinaryOperator const* op)
{
return true;
}
- if (ignoreLocation(compat::getBeginLoc(op)))
+ if (ignoreLocation(op->getBeginLoc()))
return true;
auto lhs = op->getLHS()->IgnoreImpCasts();
auto rhs = op->getRHS()->IgnoreImpCasts();
@@ -83,7 +82,7 @@ bool IntVsFloat::VisitBinaryOperator(BinaryOperator const* op)
if (static_cast<long>(*d) == *d)
return true;
report(DiagnosticsEngine::Warning, "comparing integer to float constant, can never be true",
- compat::getBeginLoc(op))
+ op->getBeginLoc())
<< op->getSourceRange();
return true;
}