diff --git a/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h b/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h index b5a7c061e17b..40bace44ffbd 100644 --- a/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h +++ b/clang/include/clang/Analysis/FlowSensitive/DataflowAnalysis.h @@ -136,6 +136,15 @@ runDataflowAnalysis(const ControlFlowContext &CFCtx, AnalysisT &Analysis, return BlockStates; } +/// Abstract base class for dataflow "models": reusable analysis components that +/// model a particular aspect of program semantics in the `Environment`. For +/// example, a model may capture a type and its related functions. +class DataflowModel : public Environment::ValueModel { +public: + /// Return value indicates whether the model processed the `Stmt`. + virtual bool transfer(const Stmt *Stmt, Environment &Env) = 0; +}; + } // namespace dataflow } // namespace clang