clang 22.0.0git
clang::ento::ProgramStateManager Class Reference

#include "clang/StaticAnalyzer/Core/PathSensitive/ProgramState.h"

Public Member Functions

 ProgramStateManager (ASTContext &Ctx, StoreManagerCreator CreateStoreManager, ConstraintManagerCreator CreateConstraintManager, llvm::BumpPtrAllocator &alloc, ExprEngine *expreng)
 ~ProgramStateManager ()
ProgramStateRef getInitialState (const LocationContext *InitLoc)
ASTContextgetContext ()
const ASTContextgetContext () const
BasicValueFactorygetBasicVals ()
SValBuildergetSValBuilder ()
const SValBuildergetSValBuilder () const
SymbolManagergetSymbolManager ()
const SymbolManagergetSymbolManager () const
llvm::BumpPtrAllocator & getAllocator ()
MemRegionManagergetRegionManager ()
const MemRegionManagergetRegionManager () const
CallEventManagergetCallEventManager ()
StoreManagergetStoreManager ()
const StoreManagergetStoreManager () const
ConstraintManagergetConstraintManager ()
const ConstraintManagergetConstraintManager () const
ExprEnginegetOwningEngine ()
ProgramStateRef removeDeadBindingsFromEnvironmentAndStore (ProgramStateRef St, const StackFrameContext *LCtx, SymbolReaper &SymReaper)
SVal ArrayToPointer (Loc Array, QualType ElementTy)
ProgramStateRef addGDM (ProgramStateRef St, void *Key, void *Data)
ProgramStateRef removeGDM (ProgramStateRef state, void *Key)
void iterBindings (ProgramStateRef state, StoreManager::BindingsHandler &F)
ProgramStateRef getPersistentState (ProgramState &Impl)
ProgramStateRef getPersistentStateWithGDM (ProgramStateRef FromState, ProgramStateRef GDMState)
bool haveEqualConstraints (ProgramStateRef S1, ProgramStateRef S2) const
bool haveEqualEnvironments (ProgramStateRef S1, ProgramStateRef S2) const
bool haveEqualStores (ProgramStateRef S1, ProgramStateRef S2) const
template<typename T>
ProgramStateRef set (ProgramStateRef st, typename ProgramStateTrait< T >::data_type D)
template<typename T>
ProgramStateRef set (ProgramStateRef st, typename ProgramStateTrait< T >::key_type K, typename ProgramStateTrait< T >::value_type V, typename ProgramStateTrait< T >::context_type C)
template<typename T>
ProgramStateRef add (ProgramStateRef st, typename ProgramStateTrait< T >::key_type K, typename ProgramStateTrait< T >::context_type C)
template<typename T>
ProgramStateRef remove (ProgramStateRef st, typename ProgramStateTrait< T >::key_type K, typename ProgramStateTrait< T >::context_type C)
template<typename T>
ProgramStateRef remove (ProgramStateRef st)
void * FindGDMContext (void *index, void *(*CreateContext)(llvm::BumpPtrAllocator &), void(*DeleteContext)(void *))
template<typename T>
ProgramStateTrait< T >::context_type get_context ()

Friends

class ProgramState
void ProgramStateRelease (const ProgramState *state)
 Decrement the number of times this state is referenced.

Detailed Description

Definition at line 498 of file ProgramState.h.

Constructor & Destructor Documentation

◆ ProgramStateManager()

ProgramStateManager::ProgramStateManager ( ASTContext & Ctx,
StoreManagerCreator CreateStoreManager,
ConstraintManagerCreator CreateConstraintManager,
llvm::BumpPtrAllocator & alloc,
ExprEngine * expreng )

Definition at line 71 of file ProgramState.cpp.

References clang::ento::createSimpleSValBuilder().

◆ ~ProgramStateManager()

ProgramStateManager::~ProgramStateManager ( )

Definition at line 84 of file ProgramState.cpp.

Member Function Documentation

◆ add()

template<typename T>
ProgramStateRef clang::ento::ProgramStateManager::add ( ProgramStateRef st,
typename ProgramStateTrait< T >::key_type K,
typename ProgramStateTrait< T >::context_type C )
inline

◆ addGDM()

ProgramStateRef ProgramStateManager::addGDM ( ProgramStateRef St,
void * Key,
void * Data )

Definition at line 552 of file ProgramState.cpp.

References clang::Data, getPersistentState(), and ProgramState.

Referenced by add(), remove(), set(), and set().

◆ ArrayToPointer()

SVal clang::ento::ProgramStateManager::ArrayToPointer ( Loc Array,
QualType ElementTy )
inline

Definition at line 589 of file ProgramState.h.

◆ FindGDMContext()

void * ProgramStateManager::FindGDMContext ( void * index,
void *(* CreateContext )(llvm::BumpPtrAllocator &),
void(* DeleteContext )(void *) )

Definition at line 539 of file ProgramState.cpp.

Referenced by get_context().

◆ get_context()

template<typename T>
ProgramStateTrait< T >::context_type clang::ento::ProgramStateManager::get_context ( )
inline

Definition at line 681 of file ProgramState.h.

References FindGDMContext().

Referenced by clang::ento::ProgramState::get_context().

◆ getAllocator()

llvm::BumpPtrAllocator & clang::ento::ProgramStateManager::getAllocator ( )
inline

Definition at line 563 of file ProgramState.h.

◆ getBasicVals()

BasicValueFactory & clang::ento::ProgramStateManager::getBasicVals ( )
inline

Definition at line 544 of file ProgramState.h.

Referenced by clang::ento::ProgramState::getBasicVals().

◆ getCallEventManager()

◆ getConstraintManager() [1/2]

ConstraintManager & clang::ento::ProgramStateManager::getConstraintManager ( )
inline

Definition at line 576 of file ProgramState.h.

Referenced by clang::ento::ProgramState::printJson().

◆ getConstraintManager() [2/2]

const ConstraintManager & clang::ento::ProgramStateManager::getConstraintManager ( ) const
inline

Definition at line 577 of file ProgramState.h.

◆ getContext() [1/2]

ASTContext & clang::ento::ProgramStateManager::getContext ( )
inline

Definition at line 541 of file ProgramState.h.

Referenced by clang::ento::ProgramState::printJson().

◆ getContext() [2/2]

const ASTContext & clang::ento::ProgramStateManager::getContext ( ) const
inline

Definition at line 542 of file ProgramState.h.

◆ getInitialState()

ProgramStateRef ProgramStateManager::getInitialState ( const LocationContext * InitLoc)

Definition at line 394 of file ProgramState.cpp.

References getPersistentState(), and ProgramState.

◆ getOwningEngine()

◆ getPersistentState()

◆ getPersistentStateWithGDM()

ProgramStateRef ProgramStateManager::getPersistentStateWithGDM ( ProgramStateRef FromState,
ProgramStateRef GDMState )

Definition at line 403 of file ProgramState.cpp.

References getPersistentState(), and ProgramState.

◆ getRegionManager() [1/2]

MemRegionManager & clang::ento::ProgramStateManager::getRegionManager ( )
inline

Definition at line 565 of file ProgramState.h.

Referenced by clang::ento::ProgramState::getRegion().

◆ getRegionManager() [2/2]

const MemRegionManager & clang::ento::ProgramStateManager::getRegionManager ( ) const
inline

Definition at line 568 of file ProgramState.h.

◆ getStoreManager() [1/2]

StoreManager & clang::ento::ProgramStateManager::getStoreManager ( )
inline

◆ getStoreManager() [2/2]

const StoreManager & clang::ento::ProgramStateManager::getStoreManager ( ) const
inline

Definition at line 575 of file ProgramState.h.

◆ getSValBuilder() [1/2]

◆ getSValBuilder() [2/2]

const SValBuilder & clang::ento::ProgramStateManager::getSValBuilder ( ) const
inline

Definition at line 552 of file ProgramState.h.

◆ getSymbolManager() [1/2]

SymbolManager & clang::ento::ProgramStateManager::getSymbolManager ( )
inline

Definition at line 556 of file ProgramState.h.

Referenced by clang::ento::ProgramState::getSymbolManager().

◆ getSymbolManager() [2/2]

const SymbolManager & clang::ento::ProgramStateManager::getSymbolManager ( ) const
inline

Definition at line 559 of file ProgramState.h.

◆ haveEqualConstraints()

bool clang::ento::ProgramStateManager::haveEqualConstraints ( ProgramStateRef S1,
ProgramStateRef S2 ) const
inline

Definition at line 607 of file ProgramState.h.

Referenced by clang::ento::ConditionBRVisitor::VisitTrueTest().

◆ haveEqualEnvironments()

bool clang::ento::ProgramStateManager::haveEqualEnvironments ( ProgramStateRef S1,
ProgramStateRef S2 ) const
inline

Definition at line 611 of file ProgramState.h.

◆ haveEqualStores()

bool clang::ento::ProgramStateManager::haveEqualStores ( ProgramStateRef S1,
ProgramStateRef S2 ) const
inline

Definition at line 615 of file ProgramState.h.

◆ iterBindings()

void clang::ento::ProgramStateManager::iterBindings ( ProgramStateRef state,
StoreManager::BindingsHandler & F )
inline

Definition at line 599 of file ProgramState.h.

Referenced by GetAllocationSite(), and getAllVarBindingsForSymbol().

◆ remove() [1/2]

template<typename T>
ProgramStateRef clang::ento::ProgramStateManager::remove ( ProgramStateRef st)
inline

Definition at line 672 of file ProgramState.h.

References removeGDM().

◆ remove() [2/2]

template<typename T>
ProgramStateRef clang::ento::ProgramStateManager::remove ( ProgramStateRef st,
typename ProgramStateTrait< T >::key_type K,
typename ProgramStateTrait< T >::context_type C )
inline

◆ removeDeadBindingsFromEnvironmentAndStore()

ProgramStateRef ProgramStateManager::removeDeadBindingsFromEnvironmentAndStore ( ProgramStateRef St,
const StackFrameContext * LCtx,
SymbolReaper & SymReaper )

◆ removeGDM()

ProgramStateRef ProgramStateManager::removeGDM ( ProgramStateRef state,
void * Key )

Definition at line 564 of file ProgramState.cpp.

References getPersistentState(), and ProgramState.

Referenced by remove().

◆ set() [1/2]

template<typename T>
ProgramStateRef clang::ento::ProgramStateManager::set ( ProgramStateRef st,
typename ProgramStateTrait< T >::data_type D )
inline

◆ set() [2/2]

template<typename T>
ProgramStateRef clang::ento::ProgramStateManager::set ( ProgramStateRef st,
typename ProgramStateTrait< T >::key_type K,
typename ProgramStateTrait< T >::value_type V,
typename ProgramStateTrait< T >::context_type C )
inline

◆ ProgramState

◆ ProgramStateRelease

void ProgramStateRelease ( const ProgramState * state)
friend

Decrement the number of times this state is referenced.

Definition at line 34 of file ProgramState.cpp.


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