clang
6.0.0
|
#include "clang/StaticAnalyzer/Core/PathSensitive/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. More... | |
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. More... | |
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. More... | |
const SymbolRefSmallVectorTy * | getDependentSymbols (const SymbolRef Primary) |
ASTContext & | getContext () |
BasicValueFactory & | getBasicVals () |
Static Public Member Functions | |
static bool | canSymbolicate (QualType T) |
Definition at line 431 of file SymbolManager.h.
|
inline |
Definition at line 445 of file SymbolManager.h.
References clang::T.
SymbolManager::~SymbolManager | ( | ) |
Definition at line 336 of file SymbolManager.cpp.
Add artificial symbol dependency.
The dependent symbol should stay alive as long as the primary is alive.
Definition at line 355 of file SymbolManager.cpp.
Referenced by getAsPointeeSymbol().
const SymbolConjured * SymbolManager::conjureSymbol | ( | const Stmt * | E, |
const LocationContext * | LCtx, | ||
QualType | T, | ||
unsigned | VisitCount, | ||
const void * | SymbolTag = nullptr |
||
) |
Definition at line 173 of file SymbolManager.cpp.
Referenced by clang::ento::SValBuilder::conjureSymbol(), and clang::ento::SValBuilder::conjureSymbolVal().
|
inline |
Definition at line 463 of file SymbolManager.h.
References clang::Expr::getType().
|
inline |
Definition at line 515 of file SymbolManager.h.
const SymbolCast * SymbolManager::getCastSymbol | ( | const SymExpr * | Operand, |
QualType | From, | ||
QualType | To | ||
) |
Definition at line 246 of file SymbolManager.cpp.
Referenced by clang::ento::SValBuilder::makeNonLoc().
|
inline |
Definition at line 514 of file SymbolManager.h.
Referenced by clang::ento::RangedConstraintManager::assumeSym().
const SymbolRefSmallVectorTy * SymbolManager::getDependentSymbols | ( | const SymbolRef | Primary | ) |
Definition at line 368 of file SymbolManager.cpp.
const SymbolDerived * SymbolManager::getDerivedSymbol | ( | SymbolRef | parentSymbol, |
const TypedValueRegion * | R | ||
) |
Definition at line 193 of file SymbolManager.cpp.
Referenced by clang::ento::SValBuilder::getDerivedRegionValueSymbolVal().
const SymbolExtent * SymbolManager::getExtentSymbol | ( | const SubRegion * | R | ) |
Definition at line 211 of file SymbolManager.cpp.
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 279 of file SymbolManager.cpp.
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 227 of file SymbolManager.cpp.
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 158 of file SymbolManager.cpp.
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 261 of file SymbolManager.cpp.
Referenced by clang::ento::SValBuilder::makeNonLoc().
|
inline |
Definition at line 491 of file SymbolManager.h.
const SymSymExpr * SymbolManager::getSymSymExpr | ( | const SymExpr * | lhs, |
BinaryOperator::Opcode | op, | ||
const SymExpr * | rhs, | ||
QualType | t | ||
) |
Definition at line 297 of file SymbolManager.cpp.
Referenced by clang::ento::RangedConstraintManager::assumeSym(), and clang::ento::SValBuilder::makeNonLoc().
Definition at line 503 of file SymbolManager.h.
References clang::ento::SymExpr::getType().