clang 17.0.0git
|
Holds CFG and other derived context that is needed to perform dataflow analysis. More...
#include "clang/Analysis/FlowSensitive/ControlFlowContext.h"
Public Member Functions | |
const Decl * | getDecl () const |
Returns the Decl containing the statement used to construct the CFG, if available. | |
const CFG & | getCFG () const |
Returns the CFG that is stored in this context. | |
const llvm::DenseMap< const Stmt *, const CFGBlock * > & | getStmtToBlock () const |
Returns a mapping from statements to basic blocks that contain them. | |
bool | isBlockReachable (const CFGBlock &B) const |
Returns whether B is reachable from the entry block. | |
Static Public Member Functions | |
static llvm::Expected< ControlFlowContext > | build (const Decl *D, Stmt &S, ASTContext &C) |
Builds a ControlFlowContext from an AST node. | |
Holds CFG and other derived context that is needed to perform dataflow analysis.
Definition at line 32 of file ControlFlowContext.h.
|
static |
Builds a ControlFlowContext from an AST node.
D
is the function in which S
resides and must not be null.
Definition at line 71 of file ControlFlowContext.cpp.
References clang::CFG::buildCFG(), clang::dataflow::buildStmtToBasicBlockMap(), clang::C, and clang::dataflow::findReachableBlocks().
Referenced by clang::dataflow::DataflowAnalysisContext::getControlFlowContext().
|
inline |
Returns the CFG that is stored in this context.
Definition at line 44 of file ControlFlowContext.h.
Referenced by clang::dataflow::runTypeErasedDataflowAnalysis().
|
inline |
Returns the Decl
containing the statement used to construct the CFG, if available.
Definition at line 41 of file ControlFlowContext.h.
|
inline |
Returns a mapping from statements to basic blocks that contain them.
Definition at line 47 of file ControlFlowContext.h.
Referenced by clang::dataflow::computeBlockInputState(), and clang::dataflow::StmtToEnvMapImpl::getEnvironment().
Returns whether B
is reachable from the entry block.
Definition at line 52 of file ControlFlowContext.h.
References clang::CFGBlock::getBlockID().
Referenced by clang::dataflow::StmtToEnvMapImpl::getEnvironment().