ΒΆtemplate <typename AnalysisT>
llvm::Expected<std::vector<
llvm::Optional<DataflowAnalysisState<
typename AnalysisT::Lattice>>>>
runDataflowAnalysis(
const clang::dataflow::ControlFlowContext&
CFCtx,
AnalysisT& Analysis,
const clang::dataflow::Environment& InitEnv,
std::function<
void(const Stmt*,
const DataflowAnalysisState<
typename AnalysisT::Lattice>&)>
PostVisitStmt = nullptr)
template <typename AnalysisT>
llvm::Expected<std::vector<
llvm::Optional<DataflowAnalysisState<
typename AnalysisT::Lattice>>>>
runDataflowAnalysis(
const clang::dataflow::ControlFlowContext&
CFCtx,
AnalysisT& Analysis,
const clang::dataflow::Environment& InitEnv,
std::function<
void(const Stmt*,
const DataflowAnalysisState<
typename AnalysisT::Lattice>&)>
PostVisitStmt = nullptr)
Description
Performs dataflow analysis and returns a mapping from basic block IDs to dataflow analysis states that model the respective basic blocks. The returned vector, if any, will have the same size as the number of CFG blocks, with indices corresponding to basic block IDs. Returns an error if the dataflow analysis cannot be performed successfully. Otherwise, calls `PostVisitStmt` on each statement with the final analysis results at that program point.
Declared at: clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h:124
Templates
- AnalysisT
Parameters
- const clang::dataflow::ControlFlowContext& CFCtx
- AnalysisT& Analysis
- const clang::dataflow::Environment& InitEnv
- std::function<void( const Stmt*, const DataflowAnalysisState< typename AnalysisT::Lattice>&)> PostVisitStmt = nullptr