clang 24.0.0git
clang::ento::lifetime_modeling Namespace Reference

Functions

std::vector< const MemRegion * > getDanglingRegionsAfterReturn (SVal Source, ProgramStateRef State, CheckerContext &C)
 Returns the set of lifetime sources bound to Source that are dangling stack regions.
bool isDeallocated (ProgramStateRef State, const MemRegion *Region)
 Returns true if the underlying MemRegion is deallocated.
bool isBoundToLifetimeSource (ProgramStateRef State, SVal Val)
 Returns true if Val is a key in the LifetimeBoundMap.
std::string getRegionName (const MemRegion *Reg)
 Returns the descriptive name of the memory region or a placeholder if a descriptive name cannot be constructed for it.
ProgramStateRef markAsReported (ProgramStateRef State, const MemRegion *Region)
 Returns the updated State with R marked as reported if R is seen the first time.

Function Documentation

◆ getDanglingRegionsAfterReturn()

std::vector< const MemRegion * > clang::ento::lifetime_modeling::getDanglingRegionsAfterReturn ( SVal Source,
ProgramStateRef State,
CheckerContext & C )

Returns the set of lifetime sources bound to Source that are dangling stack regions.

Definition at line 68 of file LifetimeModeling.cpp.

References clang::C, and isDanglingStackSource().

◆ getRegionName()

std::string clang::ento::lifetime_modeling::getRegionName ( const MemRegion * Reg)

Returns the descriptive name of the memory region or a placeholder if a descriptive name cannot be constructed for it.

Definition at line 109 of file LifetimeModeling.cpp.

References clang::ento::MemRegion::getDescriptiveName().

◆ isBoundToLifetimeSource()

bool clang::ento::lifetime_modeling::isBoundToLifetimeSource ( ProgramStateRef State,
SVal Val )

Returns true if Val is a key in the LifetimeBoundMap.

Definition at line 80 of file LifetimeModeling.cpp.

◆ isDeallocated()

bool clang::ento::lifetime_modeling::isDeallocated ( ProgramStateRef State,
const MemRegion * Region )

Returns true if the underlying MemRegion is deallocated.

Definition at line 85 of file LifetimeModeling.cpp.

References clang::ento::MemRegion::getBaseRegion().

◆ markAsReported()

ProgramStateRef clang::ento::lifetime_modeling::markAsReported ( ProgramStateRef State,
const MemRegion * Region )

Returns the updated State with R marked as reported if R is seen the first time.

Returns nullptr if R was already reported.

Definition at line 90 of file LifetimeModeling.cpp.

References clang::ento::MemRegion::getBaseRegion().