clang 18.0.0git
|
#include "clang/StaticAnalyzer/Core/PathSensitive/SymbolManager.h"
Public Member Functions | |
SymbolManager (ASTContext &ctx, BasicValueFactory &bv, llvm::BumpPtrAllocator &bpalloc) | |
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, const LocationContext *LCtx, 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) |
const UnarySymExpr * | getUnarySymExpr (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 SymbolRefSmallVectorTy * | getDependentSymbols (const SymbolRef Primary) |
ASTContext & | getContext () |
BasicValueFactory & | getBasicVals () |
Static Public Member Functions | |
static bool | canSymbolicate (QualType T) |
Definition at line 482 of file SymbolManager.h.
|
inline |
Definition at line 499 of file SymbolManager.h.
Add artificial symbol dependency.
The dependent symbol should stay alive as long as the primary is alive.
Definition at line 364 of file SymbolManager.cpp.
Definition at line 349 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().
|
inline |
Definition at line 514 of file SymbolManager.h.
References conjureSymbol(), clang::Expr::getType(), and VisitCount.
const SymbolConjured * SymbolManager::conjureSymbol | ( | const Stmt * | E, |
const LocationContext * | LCtx, | ||
QualType | T, | ||
unsigned | VisitCount, | ||
const void * | SymbolTag = nullptr |
||
) |
Definition at line 181 of file SymbolManager.cpp.
References clang::ento::SymbolConjured::Profile().
Referenced by conjureSymbol(), clang::ento::SValBuilder::conjureSymbol(), clang::ento::SValBuilder::conjureSymbolVal(), clang::ento::SValBuilder::getConjuredHeapSymbolVal(), and populateObjCForDestinationSet().
|
inline |
Definition at line 569 of file SymbolManager.h.
const SymbolCast * SymbolManager::getCastSymbol | ( | const SymExpr * | Operand, |
QualType | From, | ||
QualType | To | ||
) |
Definition at line 248 of file SymbolManager.cpp.
References clang::ento::SymbolCast::Profile().
Referenced by clang::ento::SValBuilder::makeNonLoc().
|
inline |
Definition at line 568 of file SymbolManager.h.
Referenced by clang::ento::RangedConstraintManager::assumeSym().
const SymbolRefSmallVectorTy * SymbolManager::getDependentSymbols | ( | const SymbolRef | Primary | ) |
Definition at line 373 of file SymbolManager.cpp.
const SymbolDerived * SymbolManager::getDerivedSymbol | ( | SymbolRef | parentSymbol, |
const TypedValueRegion * | R | ||
) |
Definition at line 200 of file SymbolManager.cpp.
References clang::ento::SymbolDerived::Profile().
Referenced by clang::ento::SValBuilder::getDerivedRegionValueSymbolVal().
const SymbolExtent * SymbolManager::getExtentSymbol | ( | const SubRegion * | R | ) |
Definition at line 216 of file SymbolManager.cpp.
References clang::ento::SymbolExtent::Profile().
Referenced by clang::ento::MemRegionManager::getStaticSize().
const IntSymExpr * SymbolManager::getIntSymExpr | ( | const llvm::APSInt & | lhs, |
BinaryOperator::Opcode | op, | ||
const SymExpr * | rhs, | ||
QualType | t | ||
) |
Definition at line 279 of file SymbolManager.cpp.
References clang::ento::BinarySymExprImpl< LHSTYPE, RHSTYPE, ClassKind >::Profile().
Referenced by clang::ento::SValBuilder::makeNonLoc().
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().
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 167 of file SymbolManager.cpp.
References clang::ento::SymbolRegionValue::Profile().
Referenced by clang::ento::SValBuilder::getRegionValueSymbolVal().
|
inline |
Definition at line 542 of file SymbolManager.h.
References getSymIntExpr().
const SymIntExpr * SymbolManager::getSymIntExpr | ( | const SymExpr * | lhs, |
BinaryOperator::Opcode | op, | ||
const llvm::APSInt & | rhs, | ||
QualType | t | ||
) |
Definition at line 262 of file SymbolManager.cpp.
References clang::ento::BinarySymExprImpl< LHSTYPE, RHSTYPE, ClassKind >::Profile(), and v.
Referenced by doRearrangeUnchecked(), getSymIntExpr(), and clang::ento::SValBuilder::makeNonLoc().
const SymSymExpr * SymbolManager::getSymSymExpr | ( | const SymExpr * | lhs, |
BinaryOperator::Opcode | op, | ||
const SymExpr * | rhs, | ||
QualType | t | ||
) |
Definition at line 296 of file SymbolManager.cpp.
References clang::ento::BinarySymExprImpl< LHSTYPE, RHSTYPE, ClassKind >::Profile().
Referenced by clang::ento::RangedConstraintManager::assumeSym(), doRearrangeUnchecked(), and clang::ento::SValBuilder::makeNonLoc().
Definition at line 557 of file SymbolManager.h.
References clang::ento::SymExpr::getType().
const UnarySymExpr * SymbolManager::getUnarySymExpr | ( | const SymExpr * | operand, |
UnaryOperator::Opcode | op, | ||
QualType | t | ||
) |
Definition at line 313 of file SymbolManager.cpp.
References clang::ento::UnarySymExpr::Profile().
Referenced by clang::ento::SValBuilder::makeNonLoc().