CodeQL library for C/C++
Search

Predicate negative_overflow

Holds if the expression might overflow negatively. This predicate does not consider the possibility that the expression might overflow due to a conversion.

DEPRECATED: use exprMightOverflowNegatively instead.

Import path

import semmle.code.cpp.rangeanalysis.SimpleRangeAnalysis
predicate negative_overflow(Expr expr)