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)
 
const SymbolRegionValuegetRegionValueSymbol (const TypedValueRegion *R)
 Make a unique symbol for MemRegion R according to its kind.
 
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)
 
const SymbolDerivedgetDerivedSymbol (SymbolRef parentSymbol, const TypedValueRegion *R)
 
const SymbolExtentgetExtentSymbol (const SubRegion *R)
 
const SymbolMetadatagetMetadataSymbol (const MemRegion *R, const Stmt *S, QualType T, const LocationContext *LCtx, unsigned VisitCount, const void *SymbolTag=nullptr)
 Creates a metadata symbol associated with a specific region.
 
const SymbolCastgetCastSymbol (const SymExpr *Operand, QualType From, QualType To)
 
const SymIntExprgetSymIntExpr (const SymExpr *lhs, BinaryOperator::Opcode op, APSIntPtr rhs, QualType t)
 
const SymIntExprgetSymIntExpr (const SymExpr &lhs, BinaryOperator::Opcode op, APSIntPtr rhs, QualType t)
 
const IntSymExprgetIntSymExpr (APSIntPtr lhs, BinaryOperator::Opcode op, const SymExpr *rhs, QualType t)
 
const SymSymExprgetSymSymExpr (const SymExpr *lhs, BinaryOperator::Opcode op, const SymExpr *rhs, QualType t)
 
const UnarySymExprgetUnarySymExpr (const SymExpr *operand, UnaryOperator::Opcode op, QualType t)
 
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 ()
 

Static Public Member Functions

static bool canSymbolicate (QualType T)
 

Detailed Description

Definition at line 481 of file SymbolManager.h.

Constructor & Destructor Documentation

◆ SymbolManager()

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

Definition at line 498 of file SymbolManager.h.

Member Function Documentation

◆ 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 362 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 513 of file SymbolManager.h.

References conjureSymbol(), E, and VisitCount.

◆ conjureSymbol() [2/2]

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

◆ getBasicVals()

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

Definition at line 567 of file SymbolManager.h.

◆ getCastSymbol()

const SymbolCast * SymbolManager::getCastSymbol ( const SymExpr Operand,
QualType  From,
QualType  To 
)

◆ getContext()

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

Definition at line 566 of file SymbolManager.h.

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

◆ getDependentSymbols()

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

Definition at line 371 of file SymbolManager.cpp.

◆ getDerivedSymbol()

const SymbolDerived * SymbolManager::getDerivedSymbol ( SymbolRef  parentSymbol,
const TypedValueRegion R 
)

◆ getExtentSymbol()

const SymbolExtent * SymbolManager::getExtentSymbol ( const SubRegion R)

◆ getIntSymExpr()

const IntSymExpr * SymbolManager::getIntSymExpr ( APSIntPtr  lhs,
BinaryOperator::Opcode  op,
const SymExpr rhs,
QualType  t 
)

◆ getMetadataSymbol()

const SymbolMetadata * SymbolManager::getMetadataSymbol ( const MemRegion R,
const Stmt S,
QualType  T,
const LocationContext LCtx,
unsigned  VisitCount,
const void *  SymbolTag = nullptr 
)

Creates a metadata symbol associated with a specific region.

VisitCount can be used to differentiate regions corresponding to different loop iterations, thus, making the symbol path-dependent.

Definition at line 231 of file SymbolManager.cpp.

References clang::ento::SymbolMetadata::Profile(), and clang::T.

Referenced by clang::ento::SValBuilder::getMetadataSymbolVal().

◆ getRegionValueSymbol()

const SymbolRegionValue * SymbolManager::getRegionValueSymbol ( const TypedValueRegion R)

Make a unique symbol for MemRegion R according to its kind.

Definition at line 167 of file SymbolManager.cpp.

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

Referenced by clang::ento::SValBuilder::getRegionValueSymbolVal().

◆ getSymIntExpr() [1/2]

const SymIntExpr * clang::ento::SymbolManager::getSymIntExpr ( const SymExpr lhs,
BinaryOperator::Opcode  op,
APSIntPtr  rhs,
QualType  t 
)
inline

Definition at line 541 of file SymbolManager.h.

References getSymIntExpr().

◆ getSymIntExpr() [2/2]

const SymIntExpr * SymbolManager::getSymIntExpr ( const SymExpr lhs,
BinaryOperator::Opcode  op,
APSIntPtr  rhs,
QualType  t 
)

◆ getSymSymExpr()

const SymSymExpr * SymbolManager::getSymSymExpr ( const SymExpr lhs,
BinaryOperator::Opcode  op,
const SymExpr rhs,
QualType  t 
)

◆ getType()

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

Definition at line 555 of file SymbolManager.h.

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

◆ getUnarySymExpr()

const UnarySymExpr * SymbolManager::getUnarySymExpr ( const SymExpr operand,
UnaryOperator::Opcode  op,
QualType  t 
)

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