CodeQL library for C/C++
codeql/cpp-all 1.1.2-dev (changelog, source)
Search

Predicate exprMightOverflowNegatively

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

Import path

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