clang  16.0.0git
Classes | Namespaces | Functions
TypeErasedDataflowAnalysis.cpp File Reference
#include <algorithm>
#include <memory>
#include <system_error>
#include <utility>
#include <vector>
#include "clang/AST/DeclCXX.h"
#include "clang/AST/OperationKinds.h"
#include "clang/AST/StmtVisitor.h"
#include "clang/Analysis/Analyses/PostOrderCFGView.h"
#include "clang/Analysis/CFG.h"
#include "clang/Analysis/FlowSensitive/DataflowEnvironment.h"
#include "clang/Analysis/FlowSensitive/DataflowWorklist.h"
#include "clang/Analysis/FlowSensitive/Transfer.h"
#include "clang/Analysis/FlowSensitive/TypeErasedDataflowAnalysis.h"
#include "clang/Analysis/FlowSensitive/Value.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseSet.h"
#include "llvm/ADT/None.h"
#include "llvm/ADT/Optional.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/Support/Error.h"
#include "llvm/Support/ErrorHandling.h"
Include dependency graph for TypeErasedDataflowAnalysis.cpp:

Go to the source code of this file.

Classes

class  clang::dataflow::StmtToEnvMapImpl
 
class  clang::dataflow::TerminatorVisitor
 Extends the flow condition of an environment based on a terminator statement. More...
 
struct  clang::dataflow::AnalysisContext
 Holds data structures required for running dataflow analysis. More...
 

Namespaces

 clang
 
 clang::dataflow
 Dataflow Directional Tag Classes.
 

Functions

static int clang::dataflow::blockIndexInPredecessor (const CFGBlock &Pred, const CFGBlock &Block)
 Returns the index of Block in the successors of Pred. More...
 
static TypeErasedDataflowAnalysisState clang::dataflow::computeBlockInputState (const CFGBlock &Block, AnalysisContext &AC)
 Computes the input state for a given basic block by joining the output states of its predecessors. More...
 
void clang::dataflow::builtinTransferStatement (const CFGStmt &Elt, TypeErasedDataflowAnalysisState &InputState, AnalysisContext &AC)
 Built-in transfer function for CFGStmt. More...
 
void clang::dataflow::builtinTransferInitializer (const CFGInitializer &Elt, TypeErasedDataflowAnalysisState &InputState)
 Built-in transfer function for CFGInitializer. More...
 
void clang::dataflow::builtinTransfer (const CFGElement &Elt, TypeErasedDataflowAnalysisState &State, AnalysisContext &AC)
 
TypeErasedDataflowAnalysisState clang::dataflow::transferCFGBlock (const CFGBlock &Block, AnalysisContext &AC, std::function< void(const CFGElement &, const TypeErasedDataflowAnalysisState &)> PostVisitCFG=nullptr)
 Transfers State by evaluating each element in the Block based on the AC.Analysis specified. More...
 
TypeErasedDataflowAnalysisState clang::dataflow::transferBlock (const ControlFlowContext &CFCtx, llvm::ArrayRef< llvm::Optional< TypeErasedDataflowAnalysisState >> BlockStates, const CFGBlock &Block, const Environment &InitEnv, TypeErasedDataflowAnalysis &Analysis, std::function< void(const CFGElement &, const TypeErasedDataflowAnalysisState &)> PostVisitCFG=nullptr)
 Transfers the state of a basic block by evaluating each of its elements in the context of Analysis and the states of its predecessors that are available in BlockStates. More...
 
llvm::Expected< std::vector< llvm::Optional< TypeErasedDataflowAnalysisState > > > clang::dataflow::runTypeErasedDataflowAnalysis (const ControlFlowContext &CFCtx, TypeErasedDataflowAnalysis &Analysis, const Environment &InitEnv, std::function< void(const CFGElement &, const TypeErasedDataflowAnalysisState &)> PostVisitCFG=nullptr)
 Performs dataflow analysis and returns a mapping from basic block IDs to dataflow analysis states that model the respective basic blocks. More...