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

Module Dataflow

Provides a simple data flow analysis to find expressions that are definitely null or that may be null.

Import path

import semmle.code.cpp.controlflow.Dataflow

Imports

Dereferenced

Provides predicates for detecting whether an expression dereferences a pointer.

Nullness

Provides classes and predicates for working with null values and checks for nullness.

cpp

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

Predicates

callByReference

Holds if call passes v by reference, either with an explicit address-of operator or implicitly as a C++ reference. Both const and non-const references are included.

definitelyNull

Holds if a simple data-flow analysis determines that e is definitely null.

deref

Holds if evaluation of op dereferences v.

maybeNull

Holds if a simple data-flow analysis determines that e may be null.

Classes

DataflowAnnotation

INTERNAL: Do not use. A string that identifies a data flow analysis along with a set of member predicates that implement this analysis.

NullnessAnnotation

INTERNAL: Do not use. Two analyses relating to nullness: "pointer-null" and "pointer-valid". These analyses mark expressions that are possibly null or possibly non-null, respectively.