Module IntegerConstant

Import path

semmle.code.cpp.ir.internal.IntegerConstant

Imports

cpp

Provides classes and predicates for working with C/C++/ObjC/ObjC++ code.

Predicates

add

Returns a + b. If either input is unknown, or if the addition overflows, the result is unknown.

div

Returns a / b. If either input is unknown, or if b is zero, the result is unknown.

getValue

Gets the value of n. Holds only if n has a known value.

hasValue

Holds if n has a known value.

maxValue

Returns the value of the maximum representable integer.

minValue

Returns the value of the minimum representable integer.

mul

Returns a * b. If the multiplication overflows, the result is unknown. If either input is unknown and the other input is non-zero, the result is unknown.

neg

Return -a. If a is unknown, the result is unknown.

sub

Returns a - b. If either input is unknown, or if the subtraction overflows, the result is unknown.

unknown

Returns a value representing an unknown integer.

Aliases

IntValue

The primitive type of integers, represented with 32 bits using two’s complement.