summaryrefslogtreecommitdiff
path: root/compilerplugins/clang/loopvartoosmall.cxx
diff options
context:
space:
mode:
authorNoel Grandin <noel.grandin@collabora.co.uk>2018-11-27 12:56:12 +0200
committerNoel Grandin <noel.grandin@collabora.co.uk>2018-11-27 17:16:05 +0100
commit75dd5d2e734ad9e8265b1954c7496d1ba241079e (patch)
treeb3a694e1bbe01dcdfc917a01d44c36bde39e850b /compilerplugins/clang/loopvartoosmall.cxx
parentecdf05d1b93529a0b1edda04d0f89c08cf580308 (diff)
add EvaluateAsInt compat function for latest clang
the old EvaluateAsInt method has been dropped as from current clang Change-Id: Ie30d1547ad8de777badff4b380d2fc9fb261e8fe Reviewed-on: https://gerrit.libreoffice.org/64107 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk>
Diffstat (limited to 'compilerplugins/clang/loopvartoosmall.cxx')
-rw-r--r--compilerplugins/clang/loopvartoosmall.cxx2
1 files changed, 1 insertions, 1 deletions
diff --git a/compilerplugins/clang/loopvartoosmall.cxx b/compilerplugins/clang/loopvartoosmall.cxx
index 79503ceaeec6..7ebe34f22474 100644
--- a/compilerplugins/clang/loopvartoosmall.cxx
+++ b/compilerplugins/clang/loopvartoosmall.cxx
@@ -160,7 +160,7 @@ void LoopVarTooSmall::checkSubExpr(Expr const * expr, bool positive) {
//
// with dependent type T:
if (!binOpRHS->isValueDependent()
- && binOpRHS->EvaluateAsInt(aIntResult, compiler.getASTContext()))
+ && compat::EvaluateAsInt(binOpRHS, aIntResult, compiler.getASTContext()))
{
if (less && aIntResult.isStrictlyPositive()) {
--aIntResult;