Module LocalScopeVariableReachability

Import path

semmle.code.cpp.controlflow.LocalScopeVariableReachability

Imports

cpp

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

Predicates

bbSuccessorEntryReachesLoopInvariant

Loop invariant for bbSuccessorEntryReaches:

Classes

LocalScopeVariableReachability

A reachability analysis for control-flow nodes involving stack variables. This defines sources, sinks, and any other configurable aspect of the analysis. Multiple analyses can coexist. To create an analysis, extend this class with a subclass whose characteristic predicate is a unique singleton string. For example, write

LocalScopeVariableReachabilityExt

Same as LocalScopeVariableReachability, but isBarrier works on control-flow edges rather than nodes and is therefore parameterized by the original source node as well. Otherwise, this class is used like LocalScopeVariableReachability.

LocalScopeVariableReachabilityWithReassignment

Reachability analysis for control-flow nodes involving stack variables. Unlike LocalScopeVariableReachability, this analysis takes variable reassignments into account.