clang API Documentation
#include <SymbolManager.h>
Public Member Functions | |
SymbolManager (ASTContext &ctx, BasicValueFactory &bv, llvm::BumpPtrAllocator &bpalloc) | |
~SymbolManager () | |
const SymbolRegionValue * | getRegionValueSymbol (const TypedValueRegion *R) |
Make a unique symbol for MemRegion R according to its kind. | |
const SymbolConjured * | conjureSymbol (const Stmt *E, const LocationContext *LCtx, QualType T, unsigned VisitCount, const void *SymbolTag=nullptr) |
const SymbolConjured * | conjureSymbol (const Expr *E, const LocationContext *LCtx, unsigned VisitCount, const void *SymbolTag=nullptr) |
const SymbolDerived * | getDerivedSymbol (SymbolRef parentSymbol, const TypedValueRegion *R) |
const SymbolExtent * | getExtentSymbol (const SubRegion *R) |
const SymbolMetadata * | getMetadataSymbol (const MemRegion *R, const Stmt *S, QualType T, unsigned VisitCount, const void *SymbolTag=nullptr) |
Creates a metadata symbol associated with a specific region. | |
const SymbolCast * | getCastSymbol (const SymExpr *Operand, QualType From, QualType To) |
const SymIntExpr * | getSymIntExpr (const SymExpr *lhs, BinaryOperator::Opcode op, const llvm::APSInt &rhs, QualType t) |
const SymIntExpr * | getSymIntExpr (const SymExpr &lhs, BinaryOperator::Opcode op, const llvm::APSInt &rhs, QualType t) |
const IntSymExpr * | getIntSymExpr (const llvm::APSInt &lhs, BinaryOperator::Opcode op, const SymExpr *rhs, QualType t) |
const SymSymExpr * | getSymSymExpr (const SymExpr *lhs, BinaryOperator::Opcode op, const SymExpr *rhs, QualType t) |
QualType | getType (const SymExpr *SE) const |
void | addSymbolDependency (const SymbolRef Primary, const SymbolRef Dependent) |
Add artificial symbol dependency. | |
const SymbolRefSmallVectorTy * | getDependentSymbols (const SymbolRef Primary) |
ASTContext & | getContext () |
BasicValueFactory & | getBasicVals () |
Static Public Member Functions | |
static bool | canSymbolicate (QualType T) |
Definition at line 471 of file SymbolManager.h.
clang::ento::SymbolManager::SymbolManager | ( | ASTContext & | ctx, |
BasicValueFactory & | bv, | ||
llvm::BumpPtrAllocator & | bpalloc | ||
) | [inline] |
Definition at line 485 of file SymbolManager.h.
Definition at line 328 of file SymbolManager.cpp.
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 347 of file SymbolManager.cpp.
bool SymbolManager::canSymbolicate | ( | QualType | T | ) | [static] |
Definition at line 332 of file SymbolManager.cpp.
References clang::QualType::getCanonicalType(), clang::Type::isIntegralOrEnumerationType(), clang::ento::Loc::isLocType(), clang::Type::isRecordType(), and clang::Type::isUnionType().
Referenced by clang::ento::SValBuilder::conjureSymbolVal(), clang::ento::SValBuilder::getConjuredHeapSymbolVal(), clang::ento::SValBuilder::getDerivedRegionValueSymbolVal(), clang::ento::SValBuilder::getMetadataSymbolVal(), and clang::ento::SValBuilder::getRegionValueSymbolVal().
const SymbolConjured * SymbolManager::conjureSymbol | ( | const Stmt * | E, |
const LocationContext * | LCtx, | ||
QualType | T, | ||
unsigned | VisitCount, | ||
const void * | SymbolTag = nullptr |
||
) |
Definition at line 166 of file SymbolManager.cpp.
References clang::ento::SymExpr::Profile().
Referenced by clang::ento::SValBuilder::conjureSymbol(), conjureSymbol(), clang::ento::SValBuilder::conjureSymbolVal(), clang::ento::SValBuilder::getConjuredHeapSymbolVal(), and clang::ento::ExprEngine::VisitObjCForCollectionStmt().
const SymbolConjured* clang::ento::SymbolManager::conjureSymbol | ( | const Expr * | E, |
const LocationContext * | LCtx, | ||
unsigned | VisitCount, | ||
const void * | SymbolTag = nullptr |
||
) | [inline] |
Definition at line 503 of file SymbolManager.h.
References conjureSymbol(), and clang::Expr::getType().
BasicValueFactory& clang::ento::SymbolManager::getBasicVals | ( | ) | [inline] |
Definition at line 553 of file SymbolManager.h.
const SymbolCast * SymbolManager::getCastSymbol | ( | const SymExpr * | Operand, |
QualType | From, | ||
QualType | To | ||
) |
Definition at line 238 of file SymbolManager.cpp.
References data(), and clang::ento::SymExpr::Profile().
Referenced by clang::ento::SValBuilder::makeNonLoc().
ASTContext& clang::ento::SymbolManager::getContext | ( | ) | [inline] |
Definition at line 552 of file SymbolManager.h.
Referenced by clang::ento::SimpleConstraintManager::assumeAux().
const SymbolRefSmallVectorTy * SymbolManager::getDependentSymbols | ( | const SymbolRef | Primary | ) |
Definition at line 360 of file SymbolManager.cpp.
const SymbolDerived * SymbolManager::getDerivedSymbol | ( | SymbolRef | parentSymbol, |
const TypedValueRegion * | R | ||
) |
Definition at line 186 of file SymbolManager.cpp.
References clang::ento::SymExpr::Profile().
Referenced by clang::ento::SValBuilder::getDerivedRegionValueSymbolVal().
const SymbolExtent * SymbolManager::getExtentSymbol | ( | const SubRegion * | R | ) |
Definition at line 204 of file SymbolManager.cpp.
References clang::ento::SymExpr::Profile().
Referenced by clang::ento::AllocaRegion::getExtent(), clang::ento::TypedValueRegion::getExtent(), and clang::ento::SymbolicRegion::getExtent().
const IntSymExpr * SymbolManager::getIntSymExpr | ( | const llvm::APSInt & | lhs, |
BinaryOperator::Opcode | op, | ||
const SymExpr * | rhs, | ||
QualType | t | ||
) |
Definition at line 271 of file SymbolManager.cpp.
References data(), and clang::ento::SymExpr::Profile().
Referenced by clang::ento::SValBuilder::makeNonLoc().
const SymbolMetadata * SymbolManager::getMetadataSymbol | ( | const MemRegion * | R, |
const Stmt * | S, | ||
QualType | T, | ||
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 220 of file SymbolManager.cpp.
References clang::ento::SymExpr::Profile().
Referenced by clang::ento::SValBuilder::getMetadataSymbolVal().
const SymbolRegionValue * SymbolManager::getRegionValueSymbol | ( | const TypedValueRegion * | R | ) |
Make a unique symbol for MemRegion R according to its kind.
Definition at line 151 of file SymbolManager.cpp.
References clang::ento::SymExpr::Profile().
Referenced by clang::ento::SValBuilder::getRegionValueSymbolVal().
const SymIntExpr * SymbolManager::getSymIntExpr | ( | const SymExpr * | lhs, |
BinaryOperator::Opcode | op, | ||
const llvm::APSInt & | rhs, | ||
QualType | t | ||
) |
Definition at line 253 of file SymbolManager.cpp.
References data(), and clang::ento::SymExpr::Profile().
Referenced by getSymIntExpr(), and clang::ento::SValBuilder::makeNonLoc().
const SymIntExpr* clang::ento::SymbolManager::getSymIntExpr | ( | const SymExpr & | lhs, |
BinaryOperator::Opcode | op, | ||
const llvm::APSInt & | rhs, | ||
QualType | t | ||
) | [inline] |
Definition at line 529 of file SymbolManager.h.
References getSymIntExpr().
const SymSymExpr * SymbolManager::getSymSymExpr | ( | const SymExpr * | lhs, |
BinaryOperator::Opcode | op, | ||
const SymExpr * | rhs, | ||
QualType | t | ||
) |
Definition at line 289 of file SymbolManager.cpp.
References data(), and clang::ento::SymExpr::Profile().
Referenced by clang::ento::SimpleConstraintManager::assumeAux(), and clang::ento::SValBuilder::makeNonLoc().
QualType clang::ento::SymbolManager::getType | ( | const SymExpr * | SE | ) | const [inline] |
Definition at line 541 of file SymbolManager.h.
References clang::ento::SymExpr::getType().