C++: Make exprMightOverflowPositively/exprMightOverFlowNegatively hold for unanalyzable expressions. This hopefully means that expressions that do not satisfy these predicates will never overflow/underflow.

This commit is contained in:
Mathias Vorreiter Pedersen
2021-04-14 16:45:27 +02:00
parent 447f339857
commit ed64ed3d8d

View File

@@ -1630,6 +1630,9 @@ private module SimpleRangeAnalysisCached {
// bound of `x`, so the standard logic (above) does not work for
// detecting whether it might overflow.
getLowerBoundsImpl(expr.(PostfixDecrExpr)) = exprMinVal(expr)
or
// Expressions we cannot analyze could potentially overflow
not analyzableExpr(expr)
}
/**
@@ -1657,6 +1660,9 @@ private module SimpleRangeAnalysisCached {
// bound of `x`, so the standard logic (above) does not work for
// detecting whether it might overflow.
getUpperBoundsImpl(expr.(PostfixIncrExpr)) = exprMaxVal(expr)
or
// Expressions we cannot analyze could potentially overflow
not analyzableExpr(expr)
}
/**