Module Nullness

Import path

semmle.code.cpp.controlflow.Nullness

Imports

DefinitionsAndUses
cpp

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

Predicates

callMayReturnNull

Holds if call may, directly or indirectly, evaluate to a null literal.

checkedNull

Holds if var is likely to be null at node.

checkedValid

Holds if var is likely to be non-null at node.

mayReturnNull

Holds if f may, directly or indirectly, return a null literal.

nullCheckExpr

Holds if var is null when checkExpr evaluates to a true value.

nullInit

Holds if the evaluation of n may have the effect of, directly or indirectly, assigning a null literal to var.

nullValue

Holds if val is a null literal or a call to a function that may return a null literal.

validCheckExpr

Holds if var is non-null when checkExpr evaluates to a true value.

Classes

AnalysedExpr

An expression that has been extended with member predicates that provide information about the role of this expression in nullness checks.

NullValue

A C/C++ literal whose value is considered null.

Zero

A C/C++ literal whose value is zero.