clang  3.9.0svn
Public Types | Public Member Functions | Static Public Member Functions | Friends | List of all members
clang::ento::ProgramState Class Reference

ProgramState - This class encapsulates: More...

#include <ProgramState.h>

Inheritance diagram for clang::ento::ProgramState:
Inheritance graph
[legend]
Collaboration diagram for clang::ento::ProgramState:
Collaboration graph
[legend]

Public Types

typedef llvm::ImmutableSet< llvm::APSInt * > IntSetTy
 
typedef llvm::ImmutableMap< void *, void * > GenericDataMap
 

Public Member Functions

 ProgramState (ProgramStateManager *mgr, const Environment &env, StoreRef st, GenericDataMap gdm)
 This ctor is used when creating the first ProgramState object. More...
 
 ProgramState (const ProgramState &RHS)
 Copy ctor - We must explicitly define this or else the "Next" ptr in FoldingSetNode will also get copied. More...
 
 ~ProgramState ()
 
ProgramStateManagergetStateManager () const
 Return the ProgramStateManager associated with this state. More...
 
ConstraintManagergetConstraintManager () const
 Return the ConstraintManager. More...
 
const EnvironmentgetEnvironment () const
 getEnvironment - Return the environment associated with this state. More...
 
Store getStore () const
 Return the store associated with this state. More...
 
GenericDataMap getGDM () const
 getGDM - Return the generic data map associated with this state. More...
 
void setGDM (GenericDataMap gdm)
 
void Profile (llvm::FoldingSetNodeID &ID) const
 Profile - Used to profile the contents of this object for inclusion in a FoldingSet. More...
 
BasicValueFactorygetBasicVals () const
 
SymbolManagergetSymbolManager () const
 
ProgramStateRef assume (DefinedOrUnknownSVal cond, bool assumption) const
 Assumes that the value of cond is zero (if assumption is "false") or non-zero (if assumption is "true"). More...
 
std::pair< ProgramStateRef, ProgramStateRefassume (DefinedOrUnknownSVal cond) const
 Assumes both "true" and "false" for cond, and returns both corresponding states (respectively). More...
 
ProgramStateRef assumeInBound (DefinedOrUnknownSVal idx, DefinedOrUnknownSVal upperBound, bool assumption, QualType IndexType=QualType()) const
 
ProgramStateRef assumeWithinInclusiveRange (DefinedOrUnknownSVal Val, const llvm::APSInt &From, const llvm::APSInt &To, bool assumption) const
 Assumes that the value of Val is bounded with [From; To] (if assumption is "true") or it is fully out of this range (if assumption is "false"). More...
 
std::pair< ProgramStateRef, ProgramStateRefassumeWithinInclusiveRange (DefinedOrUnknownSVal Val, const llvm::APSInt &From, const llvm::APSInt &To) const
 Assumes given range both "true" and "false" for Val, and returns both corresponding states (respectively). More...
 
ConditionTruthVal isNull (SVal V) const
 Check if the given SVal is constrained to zero or is a zero constant. More...
 
const VarRegiongetRegion (const VarDecl *D, const LocationContext *LC) const
 Utility method for getting regions. More...
 
ProgramStateRef BindExpr (const Stmt *S, const LocationContext *LCtx, SVal V, bool Invalidate=true) const
 Create a new state by binding the value 'V' to the statement 'S' in the state's environment. More...
 
ProgramStateRef bindLoc (Loc location, SVal V, bool notifyChanges=true) const
 
ProgramStateRef bindLoc (SVal location, SVal V) const
 
ProgramStateRef bindDefault (SVal loc, SVal V) const
 
ProgramStateRef killBinding (Loc LV) const
 
ProgramStateRef invalidateRegions (ArrayRef< const MemRegion * > Regions, const Expr *E, unsigned BlockCount, const LocationContext *LCtx, bool CausesPointerEscape, InvalidatedSymbols *IS=nullptr, const CallEvent *Call=nullptr, RegionAndSymbolInvalidationTraits *ITraits=nullptr) const
 Returns the state with bindings for the given regions cleared from the store. More...
 
ProgramStateRef invalidateRegions (ArrayRef< SVal > Regions, const Expr *E, unsigned BlockCount, const LocationContext *LCtx, bool CausesPointerEscape, InvalidatedSymbols *IS=nullptr, const CallEvent *Call=nullptr, RegionAndSymbolInvalidationTraits *ITraits=nullptr) const
 
ProgramStateRef enterStackFrame (const CallEvent &Call, const StackFrameContext *CalleeCtx) const
 enterStackFrame - Returns the state for entry to the given stack frame, preserving the current state. More...
 
Loc getLValue (const VarDecl *D, const LocationContext *LC) const
 Get the lvalue for a variable reference. More...
 
Loc getLValue (const CompoundLiteralExpr *literal, const LocationContext *LC) const
 
SVal getLValue (const ObjCIvarDecl *decl, SVal base) const
 Get the lvalue for an ivar reference. More...
 
SVal getLValue (const FieldDecl *decl, SVal Base) const
 Get the lvalue for a field reference. More...
 
SVal getLValue (const IndirectFieldDecl *decl, SVal Base) const
 Get the lvalue for an indirect field reference. More...
 
SVal getLValue (QualType ElementType, SVal Idx, SVal Base) const
 Get the lvalue for an array index. More...
 
SVal getSVal (const Stmt *S, const LocationContext *LCtx) const
 Returns the SVal bound to the statement 'S' in the state's environment. More...
 
SVal getSValAsScalarOrLoc (const Stmt *Ex, const LocationContext *LCtx) const
 
SVal getSVal (Loc LV, QualType T=QualType()) const
 Return the value bound to the specified location. More...
 
SVal getRawSVal (Loc LV, QualType T=QualType()) const
 Returns the "raw" SVal bound to LV before any value simplfication. More...
 
SVal getSVal (const MemRegion *R) const
 Return the value bound to the specified location. More...
 
SVal getSValAsScalarOrLoc (const MemRegion *R) const
 
bool scanReachableSymbols (SVal val, SymbolVisitor &visitor) const
 Visits the symbols reachable from the given SVal using the provided SymbolVisitor. More...
 
bool scanReachableSymbols (const SVal *I, const SVal *E, SymbolVisitor &visitor) const
 Visits the symbols reachable from the SVals in the given range using the provided SymbolVisitor. More...
 
bool scanReachableSymbols (const MemRegion *const *I, const MemRegion *const *E, SymbolVisitor &visitor) const
 Visits the symbols reachable from the regions in the given MemRegions range using the provided SymbolVisitor. More...
 
template<typename CB >
CB scanReachableSymbols (SVal val) const
 
template<typename CB >
CB scanReachableSymbols (const SVal *beg, const SVal *end) const
 
template<typename CB >
CB scanReachableSymbols (const MemRegion *const *beg, const MemRegion *const *end) const
 
ProgramStateRef addTaint (const Stmt *S, const LocationContext *LCtx, TaintTagType Kind=TaintTagGeneric) const
 Create a new state in which the statement is marked as tainted. More...
 
ProgramStateRef addTaint (SymbolRef S, TaintTagType Kind=TaintTagGeneric) const
 Create a new state in which the symbol is marked as tainted. More...
 
ProgramStateRef addTaint (const MemRegion *R, TaintTagType Kind=TaintTagGeneric) const
 Create a new state in which the region symbol is marked as tainted. More...
 
bool isTainted (const Stmt *S, const LocationContext *LCtx, TaintTagType Kind=TaintTagGeneric) const
 Check if the statement is tainted in the current state. More...
 
bool isTainted (SVal V, TaintTagType Kind=TaintTagGeneric) const
 
bool isTainted (SymbolRef Sym, TaintTagType Kind=TaintTagGeneric) const
 
bool isTainted (const MemRegion *Reg, TaintTagType Kind=TaintTagGeneric) const
 
void *const * FindGDM (void *K) const
 
template<typename T >
ProgramStateRef add (typename ProgramStateTrait< T >::key_type K) const
 
template<typename T >
ProgramStateTrait< T >::data_type get () const
 
template<typename T >
ProgramStateTrait< T >::lookup_type get (typename ProgramStateTrait< T >::key_type key) const
 
template<typename T >
ProgramStateTrait< T >::context_type get_context () const
 
template<typename T >
ProgramStateRef remove (typename ProgramStateTrait< T >::key_type K) const
 
template<typename T >
ProgramStateRef remove (typename ProgramStateTrait< T >::key_type K, typename ProgramStateTrait< T >::context_type C) const
 
template<typename T >
ProgramStateRef remove () const
 
template<typename T >
ProgramStateRef set (typename ProgramStateTrait< T >::data_type D) const
 
template<typename T >
ProgramStateRef set (typename ProgramStateTrait< T >::key_type K, typename ProgramStateTrait< T >::value_type E) const
 
template<typename T >
ProgramStateRef set (typename ProgramStateTrait< T >::key_type K, typename ProgramStateTrait< T >::value_type E, typename ProgramStateTrait< T >::context_type C) const
 
template<typename T >
bool contains (typename ProgramStateTrait< T >::key_type key) const
 
void print (raw_ostream &Out, const char *nl="\n", const char *sep="") const
 
void printDOT (raw_ostream &Out) const
 
void printTaint (raw_ostream &Out, const char *nl="\n", const char *sep="") const
 
void dump () const
 
void dumpTaint () const
 

Static Public Member Functions

static void Profile (llvm::FoldingSetNodeID &ID, const ProgramState *V)
 Profile - Profile the contents of a ProgramState object for use in a FoldingSet. More...
 

Friends

class ProgramStateManager
 
class ExplodedGraph
 
class ExplodedNode
 
void ProgramStateRetain (const ProgramState *state)
 Increments the number of times this state is referenced. More...
 
void ProgramStateRelease (const ProgramState *state)
 Decrement the number of times this state is referenced. More...
 

Detailed Description

ProgramState - This class encapsulates:

  1. A mapping from expressions to values (Environment)
  2. A mapping from locations to values (Store)
  3. Constraints on symbolic values (GenericDataMap)

Together these represent the "abstract state" of a program.

ProgramState is intended to be used as a functional object; that is, once it is created and made "persistent" in a FoldingSet, its values will never change.

Definition at line 73 of file ProgramState.h.

Member Typedef Documentation

Definition at line 76 of file ProgramState.h.

Definition at line 75 of file ProgramState.h.

Constructor & Destructor Documentation

ProgramState::ProgramState ( ProgramStateManager mgr,
const Environment env,
StoreRef  st,
GenericDataMap  gdm 
)

This ctor is used when creating the first ProgramState object.

Definition at line 45 of file ProgramState.cpp.

References clang::ento::ProgramStateManager::getStoreManager(), and clang::ento::StoreManager::incrementReferenceCount().

ProgramState::ProgramState ( const ProgramState RHS)

Copy ctor - We must explicitly define this or else the "Next" ptr in FoldingSetNode will also get copied.

Definition at line 55 of file ProgramState.cpp.

References clang::ento::ProgramStateManager::getStoreManager(), and clang::ento::StoreManager::incrementReferenceCount().

ProgramState::~ProgramState ( )

Member Function Documentation

template<typename T >
ProgramStateRef clang::ento::ProgramState::add ( typename ProgramStateTrait< T >::key_type  K) const

Definition at line 764 of file ProgramState.h.

ProgramStateRef ProgramState::addTaint ( const Stmt S,
const LocationContext LCtx,
TaintTagType  Kind = TaintTagGeneric 
) const

Create a new state in which the statement is marked as tainted.

Definition at line 651 of file ProgramState.cpp.

References clang::Expr::IgnoreParens().

ProgramStateRef ProgramState::addTaint ( SymbolRef  S,
TaintTagType  Kind = TaintTagGeneric 
) const

Create a new state in which the symbol is marked as tainted.

Definition at line 675 of file ProgramState.cpp.

ProgramStateRef ProgramState::addTaint ( const MemRegion R,
TaintTagType  Kind = TaintTagGeneric 
) const

Create a new state in which the region symbol is marked as tainted.

Definition at line 668 of file ProgramState.cpp.

ProgramStateRef clang::ento::ProgramState::assume ( DefinedOrUnknownSVal  cond,
bool  assumption 
) const
inline

Assumes that the value of cond is zero (if assumption is "false") or non-zero (if assumption is "true").

This returns a new state with the added constraint on cond. If no new state is feasible, NULL is returned.

Definition at line 642 of file ProgramState.h.

References clang::ento::SVal::castAs(), and clang::ento::SVal::isUnknown().

std::pair< ProgramStateRef, ProgramStateRef > clang::ento::ProgramState::assume ( DefinedOrUnknownSVal  cond) const
inline

Assumes both "true" and "false" for cond, and returns both corresponding states (respectively).

This is more efficient than calling assume() twice. Note that one (but not both) of the returned states may be NULL.

Definition at line 652 of file ProgramState.h.

References clang::ento::SVal::castAs(), and clang::ento::SVal::isUnknown().

ProgramStateRef ProgramState::assumeInBound ( DefinedOrUnknownSVal  idx,
DefinedOrUnknownSVal  upperBound,
bool  assumption,
QualType  IndexType = QualType() 
) const
ProgramStateRef clang::ento::ProgramState::assumeWithinInclusiveRange ( DefinedOrUnknownSVal  Val,
const llvm::APSInt &  From,
const llvm::APSInt &  To,
bool  assumption 
) const
inline

Assumes that the value of Val is bounded with [From; To] (if assumption is "true") or it is fully out of this range (if assumption is "false").

This returns a new state with the added constraint on cond. If no new state is feasible, NULL is returned.

Definition at line 661 of file ProgramState.h.

References clang::ento::SVal::castAs(), clang::ento::SVal::getAs(), and clang::ento::SVal::isUnknown().

std::pair< ProgramStateRef, ProgramStateRef > clang::ento::ProgramState::assumeWithinInclusiveRange ( DefinedOrUnknownSVal  Val,
const llvm::APSInt &  From,
const llvm::APSInt &  To 
) const
inline

Assumes given range both "true" and "false" for Val, and returns both corresponding states (respectively).

This is more efficient than calling assume() twice. Note that one (but not both) of the returned states may be NULL.

Definition at line 675 of file ProgramState.h.

References clang::ento::SVal::castAs(), clang::ento::SVal::getAs(), and clang::ento::SVal::isUnknown().

ProgramStateRef ProgramState::bindDefault ( SVal  loc,
SVal  V 
) const
ProgramStateRef ProgramState::BindExpr ( const Stmt S,
const LocationContext LCtx,
SVal  V,
bool  Invalidate = true 
) const

Create a new state by binding the value 'V' to the statement 'S' in the state's environment.

Definition at line 290 of file ProgramState.cpp.

References Env.

ProgramStateRef ProgramState::bindLoc ( Loc  location,
SVal  V,
bool  notifyChanges = true 
) const
ProgramStateRef clang::ento::ProgramState::bindLoc ( SVal  location,
SVal  V 
) const
inline

Definition at line 687 of file ProgramState.h.

References clang::ento::SVal::getAs().

template<typename T >
bool clang::ento::ProgramState::contains ( typename ProgramStateTrait< T >::key_type  key) const
inline
LLVM_DUMP_METHOD void ProgramState::dump ( ) const

Definition at line 442 of file ProgramState.cpp.

void ProgramState::dumpTaint ( ) const

Definition at line 458 of file ProgramState.cpp.

ProgramStateRef ProgramState::enterStackFrame ( const CallEvent Call,
const StackFrameContext CalleeCtx 
) const

enterStackFrame - Returns the state for entry to the given stack frame, preserving the current state.

Definition at line 228 of file ProgramState.cpp.

void *const * ProgramState::FindGDM ( void *  K) const

Definition at line 466 of file ProgramState.cpp.

template<typename T >
ProgramStateTrait<T>::data_type clang::ento::ProgramState::get ( ) const
inline

Definition at line 372 of file ProgramState.h.

template<typename T >
ProgramStateTrait<T>::lookup_type clang::ento::ProgramState::get ( typename ProgramStateTrait< T >::key_type  key) const
inline

Definition at line 378 of file ProgramState.h.

References AttributeLangSupport::C.

template<typename T >
ProgramStateTrait< T >::context_type clang::ento::ProgramState::get_context ( ) const

Definition at line 769 of file ProgramState.h.

BasicValueFactory & clang::ento::ProgramState::getBasicVals ( ) const
inline

Definition at line 755 of file ProgramState.h.

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

Return the ConstraintManager.

Definition at line 632 of file ProgramState.h.

const Environment& clang::ento::ProgramState::getEnvironment ( ) const
inline

getEnvironment - Return the environment associated with this state.

The environment is the mapping from expressions to values.

Definition at line 118 of file ProgramState.h.

References Env.

GenericDataMap clang::ento::ProgramState::getGDM ( ) const
inline

getGDM - Return the generic data map associated with this state.

Definition at line 126 of file ProgramState.h.

Loc clang::ento::ProgramState::getLValue ( const VarDecl D,
const LocationContext LC 
) const
inline
Loc clang::ento::ProgramState::getLValue ( const CompoundLiteralExpr literal,
const LocationContext LC 
) const
inline

Definition at line 698 of file ProgramState.h.

SVal clang::ento::ProgramState::getLValue ( const ObjCIvarDecl decl,
SVal  base 
) const
inline

Get the lvalue for an ivar reference.

Definition at line 703 of file ProgramState.h.

SVal clang::ento::ProgramState::getLValue ( const FieldDecl decl,
SVal  Base 
) const
inline

Get the lvalue for a field reference.

Definition at line 707 of file ProgramState.h.

SVal clang::ento::ProgramState::getLValue ( const IndirectFieldDecl decl,
SVal  Base 
) const
inline

Get the lvalue for an indirect field reference.

Definition at line 711 of file ProgramState.h.

References clang::IndirectFieldDecl::chain(), clang::ento::StoreManager::getLValueField(), and SM.

SVal clang::ento::ProgramState::getLValue ( QualType  ElementType,
SVal  Idx,
SVal  Base 
) const
inline

Get the lvalue for an array index.

Definition at line 721 of file ProgramState.h.

References clang::ento::SVal::getAs().

SVal clang::ento::ProgramState::getRawSVal ( Loc  LV,
QualType  T = QualType() 
) const
inline

Returns the "raw" SVal bound to LV before any value simplfication.

Definition at line 746 of file ProgramState.h.

Referenced by reversePropagateInterestingSymbols().

const VarRegion * clang::ento::ProgramState::getRegion ( const VarDecl D,
const LocationContext LC 
) const
inline

Utility method for getting regions.

Definition at line 636 of file ProgramState.h.

ProgramStateManager& clang::ento::ProgramState::getStateManager ( ) const
inline

Return the ProgramStateManager associated with this state.

Definition at line 109 of file ProgramState.h.

Referenced by clang::ento::ProgramStateRelease().

Store clang::ento::ProgramState::getStore ( ) const
inline

Return the store associated with this state.

The store is a mapping from locations to values.

Definition at line 122 of file ProgramState.h.

Referenced by clang::ento::ProgramStateManager::removeDeadBindings().

SVal clang::ento::ProgramState::getSVal ( const Stmt S,
const LocationContext LCtx 
) const
inline

Returns the SVal bound to the statement 'S' in the state's environment.

Definition at line 727 of file ProgramState.h.

References Env.

Referenced by clang::ento::ConditionBRVisitor::patternMatch(), and reversePropagateIntererstingSymbols().

SVal ProgramState::getSVal ( Loc  LV,
QualType  T = QualType() 
) const

Return the value bound to the specified location.

Returns UnknownVal() if none found.

Definition at line 251 of file ProgramState.cpp.

References clang::ento::BasicValueFactory::Convert(), clang::ento::SVal::getAs(), clang::ento::SVal::getAsSymbol(), clang::ento::ProgramStateManager::getBasicVals(), and clang::QualType::isNull().

SVal clang::ento::ProgramState::getSVal ( const MemRegion R) const
inline

Return the value bound to the specified location.

Returns UnknownVal() if none found.

Definition at line 750 of file ProgramState.h.

SVal clang::ento::ProgramState::getSValAsScalarOrLoc ( const Stmt Ex,
const LocationContext LCtx 
) const
inline

Definition at line 734 of file ProgramState.h.

References clang::Type::isIntegralOrEnumerationType().

SVal ProgramState::getSValAsScalarOrLoc ( const MemRegion R) const
SymbolManager & clang::ento::ProgramState::getSymbolManager ( ) const
inline

Definition at line 759 of file ProgramState.h.

ProgramStateRef clang::ento::ProgramState::invalidateRegions ( ArrayRef< const MemRegion * >  Regions,
const Expr E,
unsigned  BlockCount,
const LocationContext LCtx,
bool  CausesPointerEscape,
InvalidatedSymbols IS = nullptr,
const CallEvent Call = nullptr,
RegionAndSymbolInvalidationTraits ITraits = nullptr 
) const

Returns the state with bindings for the given regions cleared from the store.

Optionally invalidates global regions as well.

Parameters
Regionsthe set of regions to be invalidated.
Ethe expression that caused the invalidation.
BlockCountThe number of times the current basic block has been
CausesPointerEscapethe flag is set to true when the invalidation entails escape of a symbol (representing a pointer). For example, due to it being passed as an argument in a call.
ISthe set of invalidated symbols.
Callif non-null, the invalidated regions represent parameters to the call and should be considered directly invalidated.
ITraitsinformation about special handling for a particular region/symbol.
ProgramStateRef clang::ento::ProgramState::invalidateRegions ( ArrayRef< SVal Regions,
const Expr E,
unsigned  BlockCount,
const LocationContext LCtx,
bool  CausesPointerEscape,
InvalidatedSymbols IS = nullptr,
const CallEvent Call = nullptr,
RegionAndSymbolInvalidationTraits ITraits = nullptr 
) const
ConditionTruthVal ProgramState::isNull ( SVal  V) const

Check if the given SVal is constrained to zero or is a zero constant.

Definition at line 350 of file ProgramState.cpp.

References clang::ento::SVal::getAsSymbol(), clang::ento::SVal::isConstant(), and clang::ento::SVal::isZeroConstant().

bool ProgramState::isTainted ( const Stmt S,
const LocationContext LCtx,
TaintTagType  Kind = TaintTagGeneric 
) const

Check if the statement is tainted in the current state.

Definition at line 687 of file ProgramState.cpp.

References clang::Expr::IgnoreParens().

bool ProgramState::isTainted ( SVal  V,
TaintTagType  Kind = TaintTagGeneric 
) const
bool ProgramState::isTainted ( SymbolRef  Sym,
TaintTagType  Kind = TaintTagGeneric 
) const
bool ProgramState::isTainted ( const MemRegion Reg,
TaintTagType  Kind = TaintTagGeneric 
) const

Definition at line 704 of file ProgramState.cpp.

ProgramStateRef ProgramState::killBinding ( Loc  LV) const
void ProgramState::print ( raw_ostream &  Out,
const char *  nl = "\n",
const char *  sep = "" 
) const
void ProgramState::printDOT ( raw_ostream &  Out) const

Definition at line 438 of file ProgramState.cpp.

void ProgramState::printTaint ( raw_ostream &  Out,
const char *  nl = "\n",
const char *  sep = "" 
) const

Definition at line 446 of file ProgramState.cpp.

static void clang::ento::ProgramState::Profile ( llvm::FoldingSetNodeID &  ID,
const ProgramState V 
)
inlinestatic

Profile - Profile the contents of a ProgramState object for use in a FoldingSet.

Two ProgramState objects are considered equal if they have the same Environment, Store, and GenericDataMap.

Definition at line 133 of file ProgramState.h.

References clang::ento::Environment::Profile().

Referenced by clang::ento::ProgramStateManager::getPersistentState().

void clang::ento::ProgramState::Profile ( llvm::FoldingSetNodeID &  ID) const
inline

Profile - Used to profile the contents of this object for inclusion in a FoldingSet.

Definition at line 141 of file ProgramState.h.

References clang::ast_matchers::decl, and clang::ento::TaintTagGeneric.

template<typename T >
ProgramStateRef clang::ento::ProgramState::remove ( typename ProgramStateTrait< T >::key_type  K) const

Definition at line 774 of file ProgramState.h.

template<typename T >
ProgramStateRef clang::ento::ProgramState::remove ( typename ProgramStateTrait< T >::key_type  K,
typename ProgramStateTrait< T >::context_type  C 
) const

Definition at line 779 of file ProgramState.h.

References AttributeLangSupport::C.

template<typename T >
ProgramStateRef clang::ento::ProgramState::remove ( ) const

Definition at line 785 of file ProgramState.h.

bool ProgramState::scanReachableSymbols ( SVal  val,
SymbolVisitor visitor 
) const

Visits the symbols reachable from the given SVal using the provided SymbolVisitor.

This is a convenience API. Consider using ScanReachableSymbols class directly when making multiple scans on the same state with the same visitor to avoid repeated initialization cost.

See also
ScanReachableSymbols

Definition at line 625 of file ProgramState.cpp.

References clang::ento::ScanReachableSymbols::scan().

bool ProgramState::scanReachableSymbols ( const SVal I,
const SVal E,
SymbolVisitor visitor 
) const

Visits the symbols reachable from the SVals in the given range using the provided SymbolVisitor.

Definition at line 630 of file ProgramState.cpp.

References clang::ento::ScanReachableSymbols::scan().

bool ProgramState::scanReachableSymbols ( const MemRegion *const *  I,
const MemRegion *const *  E,
SymbolVisitor visitor 
) const

Visits the symbols reachable from the regions in the given MemRegions range using the provided SymbolVisitor.

Definition at line 640 of file ProgramState.cpp.

References clang::ento::ScanReachableSymbols::scan().

template<typename CB >
CB clang::ento::ProgramState::scanReachableSymbols ( SVal  val) const

Definition at line 808 of file ProgramState.h.

template<typename CB >
CB clang::ento::ProgramState::scanReachableSymbols ( const SVal beg,
const SVal end 
) const

Definition at line 815 of file ProgramState.h.

template<typename CB >
CB clang::ento::ProgramState::scanReachableSymbols ( const MemRegion *const *  beg,
const MemRegion *const *  end 
) const

Definition at line 822 of file ProgramState.h.

template<typename T >
ProgramStateRef clang::ento::ProgramState::set ( typename ProgramStateTrait< T >::data_type  D) const

Definition at line 790 of file ProgramState.h.

template<typename T >
ProgramStateRef clang::ento::ProgramState::set ( typename ProgramStateTrait< T >::key_type  K,
typename ProgramStateTrait< T >::value_type  E 
) const

Definition at line 795 of file ProgramState.h.

template<typename T >
ProgramStateRef clang::ento::ProgramState::set ( typename ProgramStateTrait< T >::key_type  K,
typename ProgramStateTrait< T >::value_type  E,
typename ProgramStateTrait< T >::context_type  C 
) const

Definition at line 801 of file ProgramState.h.

References AttributeLangSupport::C.

void clang::ento::ProgramState::setGDM ( GenericDataMap  gdm)
inline

Definition at line 128 of file ProgramState.h.

Friends And Related Function Documentation

friend class ExplodedGraph
friend

Definition at line 82 of file ProgramState.h.

friend class ExplodedNode
friend

Definition at line 83 of file ProgramState.h.

friend class ProgramStateManager
friend

Definition at line 81 of file ProgramState.h.

void ProgramStateRelease ( const ProgramState state)
friend

Decrement the number of times this state is referenced.

Definition at line 33 of file ProgramState.cpp.

void ProgramStateRetain ( const ProgramState state)
friend

Increments the number of times this state is referenced.

Definition at line 28 of file ProgramState.cpp.


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