clang 22.0.0git
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 (ConstCFGElementRef Elem, const LocationContext *LCtx, QualType T, 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 509 of file SymbolManager.h.

Constructor & Destructor Documentation

◆ SymbolManager()

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

Definition at line 525 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(), conjureSymbol(), doRearrangeUnchecked(), and clang::ento::MemRegionManager::getStaticSize().

◆ acquire() [2/2]

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

Definition at line 677 of file SymbolManager.h.

References clang::cast(), 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 241 of file SymbolManager.cpp.

References clang::Dependent.

◆ canSymbolicate()

◆ conjureSymbol()

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

Definition at line 537 of file SymbolManager.h.

References acquire(), and clang::T.

Referenced by populateObjCForDestinationSet().

◆ getBasicVals()

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

Definition at line 557 of file SymbolManager.h.

◆ getContext()

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

Definition at line 556 of file SymbolManager.h.

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

◆ getDependentSymbols()

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

Definition at line 250 of file SymbolManager.cpp.

◆ getType()

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

Definition at line 545 of file SymbolManager.h.

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


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