clang
9.0.0
|
#include "clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h"
Public Member Functions | |
BasicValueFactory (ASTContext &ctx, llvm::BumpPtrAllocator &Alloc) | |
~BasicValueFactory () | |
ASTContext & | getContext () const |
const llvm::APSInt & | getValue (const llvm::APSInt &X) |
const llvm::APSInt & | getValue (const llvm::APInt &X, bool isUnsigned) |
const llvm::APSInt & | getValue (uint64_t X, QualType T) |
APSIntType | getAPSIntType (QualType T) const |
Returns the type of the APSInt used to store values of the given QualType. More... | |
const llvm::APSInt & | Convert (const llvm::APSInt &To, const llvm::APSInt &From) |
Convert - Create a new persistent APSInt with the same value as 'From' but with the bitwidth and signedness of 'To'. More... | |
const llvm::APSInt & | Convert (QualType T, const llvm::APSInt &From) |
const llvm::APSInt & | getIntValue (uint64_t X, bool isUnsigned) |
const llvm::APSInt & | getMaxValue (const llvm::APSInt &v) |
const llvm::APSInt & | getMinValue (const llvm::APSInt &v) |
const llvm::APSInt & | getMaxValue (QualType T) |
const llvm::APSInt & | getMinValue (QualType T) |
const llvm::APSInt & | Add1 (const llvm::APSInt &V) |
const llvm::APSInt & | Sub1 (const llvm::APSInt &V) |
const llvm::APSInt & | getZeroWithTypeSize (QualType T) |
const llvm::APSInt & | getZeroWithPtrWidth (bool isUnsigned=true) |
const llvm::APSInt & | getIntWithPtrWidth (uint64_t X, bool isUnsigned) |
const llvm::APSInt & | getTruthValue (bool b, QualType T) |
const llvm::APSInt & | getTruthValue (bool b) |
const CompoundValData * | getCompoundValData (QualType T, llvm::ImmutableList< SVal > Vals) |
const LazyCompoundValData * | getLazyCompoundValData (const StoreRef &store, const TypedValueRegion *region) |
const PointerToMemberData * | getPointerToMemberData (const DeclaratorDecl *DD, llvm::ImmutableList< const CXXBaseSpecifier *> L) |
llvm::ImmutableList< SVal > | getEmptySValList () |
llvm::ImmutableList< SVal > | prependSVal (SVal X, llvm::ImmutableList< SVal > L) |
llvm::ImmutableList< const CXXBaseSpecifier * > | getEmptyCXXBaseList () |
llvm::ImmutableList< const CXXBaseSpecifier * > | prependCXXBase (const CXXBaseSpecifier *CBS, llvm::ImmutableList< const CXXBaseSpecifier *> L) |
const PointerToMemberData * | accumCXXBase (llvm::iterator_range< CastExpr::path_const_iterator > PathRange, const nonloc::PointerToMember &PTM) |
const llvm::APSInt * | evalAPSInt (BinaryOperator::Opcode Op, const llvm::APSInt &V1, const llvm::APSInt &V2) |
const std::pair< SVal, uintptr_t > & | getPersistentSValWithData (const SVal &V, uintptr_t Data) |
const std::pair< SVal, SVal > & | getPersistentSValPair (const SVal &V1, const SVal &V2) |
const SVal * | getPersistentSVal (SVal X) |
Definition at line 106 of file BasicValueFactory.h.
|
inline |
Definition at line 128 of file BasicValueFactory.h.
BasicValueFactory::~BasicValueFactory | ( | ) |
Definition at line 78 of file BasicValueFactory.cpp.
const PointerToMemberData * BasicValueFactory::accumCXXBase | ( | llvm::iterator_range< CastExpr::path_const_iterator > | PathRange, |
const nonloc::PointerToMember & | PTM | ||
) |
Definition at line 179 of file BasicValueFactory.cpp.
References clang::ento::PointerToMemberData::getCXXBaseList(), clang::ento::PointerToMemberData::getDeclaratorDecl(), and clang::ento::nonloc::PointerToMember::getPTMData().
|
inline |
Definition at line 187 of file BasicValueFactory.h.
References getValue(), V, and X.
|
inline |
Convert - Create a new persistent APSInt with the same value as 'From' but with the bitwidth and signedness of 'To'.
Definition at line 149 of file BasicValueFactory.h.
References clang::ento::APSIntType::convert(), and getValue().
Referenced by clang::ento::ProgramState::getSValAsScalarOrLoc(), and clang::ento::SMTConstraintManager::getSymVal().
|
inline |
Definition at line 158 of file BasicValueFactory.h.
References clang::ento::APSIntType::convert(), and getValue().
const llvm::APSInt * BasicValueFactory::evalAPSInt | ( | BinaryOperator::Opcode | Op, |
const llvm::APSInt & | V1, | ||
const llvm::APSInt & | V2 | ||
) |
Definition at line 205 of file BasicValueFactory.cpp.
References getValue().
Referenced by clang::ento::nonloc::ConcreteInt::evalBinOp(), clang::ento::loc::ConcreteInt::evalBinOp(), and clang::ento::SMTConstraintManager::getSymVal().
|
inline |
Returns the type of the APSInt used to store values of the given QualType.
Definition at line 141 of file BasicValueFactory.h.
References clang::ASTContext::getIntWidth(), clang::Type::isIntegralOrEnumerationType(), clang::ento::Loc::isLocType(), and clang::Type::isSignedIntegerOrEnumerationType().
Referenced by clang::ento::RangedConstraintManager::assumeSymInclusiveRange(), clang::ento::RangedConstraintManager::assumeSymRel(), and clang::ento::CreateRangeConstraintManager().
const CompoundValData * BasicValueFactory::getCompoundValData | ( | QualType | T, |
llvm::ImmutableList< SVal > | Vals | ||
) |
Definition at line 125 of file BasicValueFactory.cpp.
References clang::ento::CompoundValData::CompoundValData(), and clang::ento::CompoundValData::Profile().
Referenced by clang::ento::SValBuilder::makeCompoundVal().
|
inline |
Definition at line 134 of file BasicValueFactory.h.
References getValue().
Referenced by clang::ento::SMTConstraintManager::assumeSym(), clang::ento::SMTConstraintManager::assumeSymInclusiveRange(), clang::ento::SMTConstraintManager::canReasonAbout(), clang::ento::SMTConstraintManager::checkNull(), and clang::ento::SMTConstraintManager::getSymVal().
|
inline |
Definition at line 239 of file BasicValueFactory.h.
|
inline |
Definition at line 231 of file BasicValueFactory.h.
Referenced by clang::ento::SValBuilder::makeZeroVal(), and clang::ento::ExprEngine::VisitInitListExpr().
|
inline |
Definition at line 166 of file BasicValueFactory.h.
References getValue(), clang::ASTContext::IntTy, and clang::ASTContext::UnsignedIntTy.
Referenced by clang::ento::SValBuilder::makeIntVal().
|
inline |
Definition at line 208 of file BasicValueFactory.h.
References clang::ASTContext::getTypeSize(), getValue(), and clang::ASTContext::VoidPtrTy.
Referenced by clang::ento::SValBuilder::makeIntValWithPtrWidth().
const LazyCompoundValData * BasicValueFactory::getLazyCompoundValData | ( | const StoreRef & | store, |
const TypedValueRegion * | region | ||
) |
Definition at line 143 of file BasicValueFactory.cpp.
References clang::ento::LazyCompoundValData::Profile().
Referenced by clang::ento::SValBuilder::makeLazyCompoundVal().
|
inline |
Definition at line 171 of file BasicValueFactory.h.
References getValue().
Referenced by clang::ento::RangeSet::Intersect(), and clang::ento::RangeSet::Negate().
|
inline |
Definition at line 179 of file BasicValueFactory.h.
References getValue().
|
inline |
Definition at line 175 of file BasicValueFactory.h.
References getValue().
Referenced by clang::ento::ProgramState::assumeInBound(), clang::ento::RangeSet::Intersect(), and clang::ento::RangeSet::Negate().
|
inline |
Definition at line 183 of file BasicValueFactory.h.
References getValue().
Definition at line 349 of file BasicValueFactory.cpp.
const std::pair< SVal, SVal > & BasicValueFactory::getPersistentSValPair | ( | const SVal & | V1, |
const SVal & | V2 | ||
) |
Definition at line 325 of file BasicValueFactory.cpp.
References P, and clang::ento::SVal::Profile().
const std::pair< SVal, uintptr_t > & BasicValueFactory::getPersistentSValWithData | ( | const SVal & | V, |
uintptr_t | Data | ||
) |
Definition at line 300 of file BasicValueFactory.cpp.
References P, and clang::ento::SVal::Profile().
Referenced by clang::ento::SValBuilder::makeLocAsInteger().
const PointerToMemberData * BasicValueFactory::getPointerToMemberData | ( | const DeclaratorDecl * | DD, |
llvm::ImmutableList< const CXXBaseSpecifier *> | L | ||
) |
Definition at line 161 of file BasicValueFactory.cpp.
References clang::ento::PointerToMemberData::Profile().
Definition at line 212 of file BasicValueFactory.h.
References clang::ASTContext::getIntWidth(), getValue(), and clang::Type::isUnsignedIntegerOrEnumerationType().
Referenced by clang::ento::SValBuilder::makeTruthVal().
|
inline |
Definition at line 217 of file BasicValueFactory.h.
References clang::ASTContext::getLogicalOperationType().
const llvm::APSInt & BasicValueFactory::getValue | ( | const llvm::APSInt & | X | ) |
Definition at line 89 of file BasicValueFactory.cpp.
References P.
const llvm::APSInt & BasicValueFactory::getValue | ( | const llvm::APInt & | X, |
bool | isUnsigned | ||
) |
Definition at line 107 of file BasicValueFactory.cpp.
References getValue(), V, and X.
const llvm::APSInt & BasicValueFactory::getValue | ( | uint64_t | X, |
QualType | T | ||
) |
Definition at line 120 of file BasicValueFactory.cpp.
References getValue().
|
inline |
Definition at line 204 of file BasicValueFactory.h.
References clang::ASTContext::getTypeSize(), getValue(), and clang::ASTContext::VoidPtrTy.
Referenced by clang::ento::SValBuilder::makeNull().
|
inline |
Definition at line 199 of file BasicValueFactory.h.
References clang::ASTContext::getTypeSize(), getValue(), and clang::Type::isScalarType().
Referenced by clang::ento::SValBuilder::makeNullWithType().
|
inline |
Definition at line 243 of file BasicValueFactory.h.
References V.
|
inline |
Definition at line 235 of file BasicValueFactory.h.
Referenced by clang::ento::ExprEngine::VisitInitListExpr().
|
inline |
Definition at line 193 of file BasicValueFactory.h.
References getValue(), V, and X.