clang  15.0.0git
Public Member Functions | List of all members
clang::dataflow::TypeErasedDataflowAnalysis Class Referenceabstract

Type-erased base class for dataflow analyses built on a single lattice type. More...

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

Inheritance diagram for clang::dataflow::TypeErasedDataflowAnalysis:
Inheritance graph
[legend]
Collaboration diagram for clang::dataflow::TypeErasedDataflowAnalysis:
Collaboration graph
[legend]

Public Member Functions

 TypeErasedDataflowAnalysis ()
 
 TypeErasedDataflowAnalysis (bool ApplyBuiltinTransfer)
 
virtual ~TypeErasedDataflowAnalysis ()
 
virtual ASTContextgetASTContext ()=0
 Returns the ASTContext that is used by the analysis. More...
 
virtual TypeErasedLattice typeErasedInitialElement ()=0
 Returns a type-erased lattice element that models the initial state of a basic block. More...
 
virtual LatticeJoinEffect joinTypeErased (TypeErasedLattice &, const TypeErasedLattice &)=0
 Joins two type-erased lattice elements by computing their least upper bound. More...
 
virtual bool isEqualTypeErased (const TypeErasedLattice &, const TypeErasedLattice &)=0
 Returns true if and only if the two given type-erased lattice elements are equal. More...
 
virtual void transferTypeErased (const Stmt *, TypeErasedLattice &, Environment &)=0
 Applies the analysis transfer function for a given statement and type-erased lattice element. More...
 
bool applyBuiltinTransfer () const
 Determines whether to apply the built-in transfer functions, which model the heap and stack in the Environment. More...
 
- Public Member Functions inherited from clang::dataflow::Environment::ValueModel
virtual ~ValueModel ()=default
 
virtual bool compareEquivalent (QualType Type, const Value &Val1, const Environment &Env1, const Value &Val2, const Environment &Env2)
 Returns true if and only if Val1 is equivalent to Val2. More...
 
virtual bool merge (QualType Type, const Value &Val1, const Environment &Env1, const Value &Val2, const Environment &Env2, Value &MergedVal, Environment &MergedEnv)
 Modifies MergedVal to approximate both Val1 and Val2. More...
 

Detailed Description

Type-erased base class for dataflow analyses built on a single lattice type.

Definition at line 44 of file TypeErasedDataflowAnalysis.h.

Constructor & Destructor Documentation

◆ TypeErasedDataflowAnalysis() [1/2]

clang::dataflow::TypeErasedDataflowAnalysis::TypeErasedDataflowAnalysis ( )
inline

Definition at line 52 of file TypeErasedDataflowAnalysis.h.

◆ TypeErasedDataflowAnalysis() [2/2]

clang::dataflow::TypeErasedDataflowAnalysis::TypeErasedDataflowAnalysis ( bool  ApplyBuiltinTransfer)
inline

Definition at line 53 of file TypeErasedDataflowAnalysis.h.

◆ ~TypeErasedDataflowAnalysis()

virtual clang::dataflow::TypeErasedDataflowAnalysis::~TypeErasedDataflowAnalysis ( )
inlinevirtual

Definition at line 56 of file TypeErasedDataflowAnalysis.h.

Member Function Documentation

◆ applyBuiltinTransfer()

bool clang::dataflow::TypeErasedDataflowAnalysis::applyBuiltinTransfer ( ) const
inline

Determines whether to apply the built-in transfer functions, which model the heap and stack in the Environment.

Definition at line 83 of file TypeErasedDataflowAnalysis.h.

Referenced by clang::dataflow::computeBlockInputState(), and clang::dataflow::transferBlock().

◆ getASTContext()

virtual ASTContext& clang::dataflow::TypeErasedDataflowAnalysis::getASTContext ( )
pure virtual

◆ isEqualTypeErased()

virtual bool clang::dataflow::TypeErasedDataflowAnalysis::isEqualTypeErased ( const TypeErasedLattice ,
const TypeErasedLattice  
)
pure virtual

◆ joinTypeErased()

virtual LatticeJoinEffect clang::dataflow::TypeErasedDataflowAnalysis::joinTypeErased ( TypeErasedLattice ,
const TypeErasedLattice  
)
pure virtual

Joins two type-erased lattice elements by computing their least upper bound.

Places the join result in the left element and returns an effect indicating whether any changes were made to it.

Implemented in clang::dataflow::DataflowAnalysis< Derived, LatticeT >, and clang::dataflow::DataflowAnalysis< UncheckedOptionalAccessModel, SourceLocationsLattice >.

Referenced by clang::dataflow::computeBlockInputState().

◆ transferTypeErased()

virtual void clang::dataflow::TypeErasedDataflowAnalysis::transferTypeErased ( const Stmt ,
TypeErasedLattice ,
Environment  
)
pure virtual

Applies the analysis transfer function for a given statement and type-erased lattice element.

Implemented in clang::dataflow::DataflowAnalysis< Derived, LatticeT >, and clang::dataflow::DataflowAnalysis< UncheckedOptionalAccessModel, SourceLocationsLattice >.

◆ typeErasedInitialElement()

virtual TypeErasedLattice clang::dataflow::TypeErasedDataflowAnalysis::typeErasedInitialElement ( )
pure virtual

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