clang 20.0.0git
Public Member Functions | List of all members
clang::dataflow::DataflowModel Class Referenceabstract

Abstract base class for dataflow "models": reusable analysis components that model a particular aspect of program semantics in the Environment. More...

#include "clang/Analysis/FlowSensitive/DataflowAnalysis.h"

Inheritance diagram for clang::dataflow::DataflowModel:
Inheritance graph
[legend]

Public Member Functions

virtual bool transfer (const CFGElement &Element, Environment &Env)=0
 Return value indicates whether the model processed the Element.
 
- Public Member Functions inherited from clang::dataflow::Environment::ValueModel
virtual ~ValueModel ()=default
 
virtual ComparisonResult compare (QualType Type, const Value &Val1, const Environment &Env1, const Value &Val2, const Environment &Env2)
 Returns: Same: Val1 is equivalent to Val2, according to the model.
 
virtual void join (QualType Type, const Value &Val1, const Environment &Env1, const Value &Val2, const Environment &Env2, Value &JoinedVal, Environment &JoinedEnv)
 Modifies JoinedVal to approximate both Val1 and Val2.
 
virtual std::optional< WidenResultwiden (QualType Type, Value &Prev, const Environment &PrevEnv, Value &Current, Environment &CurrentEnv)
 This function may widen the current value – replace it with an approximation that can reach a fixed point more quickly than iterated application of the transfer function alone.
 

Detailed Description

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.

Definition at line 395 of file DataflowAnalysis.h.

Member Function Documentation

◆ transfer()

virtual bool clang::dataflow::DataflowModel::transfer ( const CFGElement Element,
Environment Env 
)
pure virtual

Return value indicates whether the model processed the Element.

Implemented in clang::dataflow::ChromiumCheckModel.


The documentation for this class was generated from the following file: