class ControlFlowContext

Declaration

class ControlFlowContext { /* full declaration omitted */ };

Description

Holds CFG and other derived context that is needed to perform dataflow analysis.

Declared at: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h:31

Member Variables

private std::unique_ptr<CFG> Cfg
private llvm::DenseMap<const Stmt*, const CFGBlock*> StmtToBlock

Method Overview

  • private ControlFlowContext(std::unique_ptr<CFG> Cfg, llvm::DenseMap<const Stmt *, const CFGBlock *> StmtToBlock)
  • public static llvm::Expected<ControlFlowContext> build(const clang::Decl * D, clang::Stmt * S, clang::ASTContext * C)
  • public const clang::CFG & getCFG() const
  • public const llvm::DenseMap<const Stmt *, const CFGBlock *> & getStmtToBlock() const

Methods

ControlFlowContext(
    std::unique_ptr<CFG> Cfg,
    llvm::DenseMap<const Stmt*, const CFGBlock*>
        StmtToBlock)

Declared at: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h:46

Parameters

std::unique_ptr<CFG> Cfg
llvm::DenseMap<const Stmt*, const CFGBlock*> StmtToBlock

static llvm::Expected<ControlFlowContext> build(
    const clang::Decl* D,
    clang::Stmt* S,
    clang::ASTContext* C)

Description

Builds a ControlFlowContext from an AST node.

Declared at: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h:34

Parameters

const clang::Decl* D
clang::Stmt* S
clang::ASTContext* C

const clang::CFG& getCFG() const

Description

Returns the CFG that is stored in this context.

Declared at: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h:38

const llvm::DenseMap<const Stmt*,
                     const CFGBlock*>&
getStmtToBlock() const

Description

Returns a mapping from statements to basic blocks that contain them.

Declared at: clang/include/clang/Analysis/FlowSensitive/ControlFlowContext.h:41