clang 20.0.0git
Public Member Functions | Static Public Member Functions | List of all members
clang::ento::SymbolManager Class Reference

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

Public Member Functions

 SymbolManager (ASTContext &ctx, BasicValueFactory &bv, llvm::BumpPtrAllocator &bpalloc)
 
template<typename SymExprT , typename... Args>
const SymExprT * acquire (Args &&...args)
 Create or retrieve a SymExpr of type SymExprT for the given arguments.
 
const SymbolConjuredconjureSymbol (const Stmt *E, const LocationContext *LCtx, QualType T, unsigned VisitCount, const void *SymbolTag=nullptr)
 
const SymbolConjuredconjureSymbol (const Expr *E, const LocationContext *LCtx, unsigned VisitCount, const void *SymbolTag=nullptr)
 
QualType getType (const SymExpr *SE) const
 
void addSymbolDependency (const SymbolRef Primary, const SymbolRef Dependent)
 Add artificial symbol dependency.
 
const SymbolRefSmallVectorTygetDependentSymbols (const SymbolRef Primary)
 
ASTContextgetContext ()
 
BasicValueFactorygetBasicVals ()
 
template<typename T , typename... Args>
const Tacquire (Args &&...args)
 

Static Public Member Functions

static bool canSymbolicate (QualType T)
 

Detailed Description

Definition at line 508 of file SymbolManager.h.

Constructor & Destructor Documentation

◆ SymbolManager()

clang::ento::SymbolManager::SymbolManager ( ASTContext ctx,
BasicValueFactory bv,
llvm::BumpPtrAllocator &  bpalloc 
)
inline

Definition at line 524 of file SymbolManager.h.

Member Function Documentation

◆ acquire() [1/2]

template<typename SymExprT , typename... Args>
const SymExprT * clang::ento::SymbolManager::acquire ( Args &&...  args)

Create or retrieve a SymExpr of type SymExprT for the given arguments.

Use the arguments to check for an existing SymExpr and return it, otherwise, create a new one and keep a pointer to it to avoid duplicates.

Referenced by clang::ento::RangedConstraintManager::assumeSym(), doRearrangeUnchecked(), clang::ento::SValBuilder::getDerivedRegionValueSymbolVal(), clang::ento::SValBuilder::getMetadataSymbolVal(), clang::ento::SValBuilder::getRegionValueSymbolVal(), clang::ento::MemRegionManager::getStaticSize(), and clang::ento::SValBuilder::makeNonLoc().

◆ acquire() [2/2]

template<typename T , typename... Args>
const T * clang::ento::SymbolManager::acquire ( Args &&...  args)

Definition at line 682 of file SymbolManager.h.

References clang::ento::SymExprAllocator::make(), and clang::T.

◆ addSymbolDependency()

void SymbolManager::addSymbolDependency ( const SymbolRef  Primary,
const SymbolRef  Dependent 
)

Add artificial symbol dependency.

The dependent symbol should stay alive as long as the primary is alive.

Definition at line 202 of file SymbolManager.cpp.

References clang::Dependent.

◆ canSymbolicate()

bool SymbolManager::canSymbolicate ( QualType  T)
static

◆ conjureSymbol() [1/2]

const SymbolConjured * clang::ento::SymbolManager::conjureSymbol ( const Expr E,
const LocationContext LCtx,
unsigned  VisitCount,
const void *  SymbolTag = nullptr 
)
inline

Definition at line 543 of file SymbolManager.h.

References conjureSymbol(), E, and VisitCount.

◆ conjureSymbol() [2/2]

const SymbolConjured * clang::ento::SymbolManager::conjureSymbol ( const Stmt E,
const LocationContext LCtx,
QualType  T,
unsigned  VisitCount,
const void *  SymbolTag = nullptr 
)
inline

◆ getBasicVals()

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

Definition at line 562 of file SymbolManager.h.

◆ getContext()

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

Definition at line 561 of file SymbolManager.h.

Referenced by clang::ento::RangedConstraintManager::assumeSym().

◆ getDependentSymbols()

const SymbolRefSmallVectorTy * SymbolManager::getDependentSymbols ( const SymbolRef  Primary)

Definition at line 211 of file SymbolManager.cpp.

◆ getType()

QualType clang::ento::SymbolManager::getType ( const SymExpr SE) const
inline

Definition at line 550 of file SymbolManager.h.

References clang::ento::SymExpr::getType().


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