clang 20.0.0git
|
#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. | |
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'. | |
const llvm::APSInt & | Convert (QualType T, const llvm::APSInt &From) |
const llvm::APSInt & | Convert (APSIntType TargetType, 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 & | getMaxValue (APSIntType T) |
const llvm::APSInt & | getMinValue (APSIntType 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 & | 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 NamedDecl *ND, 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 clang::CastKind &kind) |
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 113 of file BasicValueFactory.h.
|
inline |
Definition at line 135 of file BasicValueFactory.h.
BasicValueFactory::~BasicValueFactory | ( | ) |
Definition at line 79 of file BasicValueFactory.cpp.
const PointerToMemberData * BasicValueFactory::accumCXXBase | ( | llvm::iterator_range< CastExpr::path_const_iterator > | PathRange, |
const nonloc::PointerToMember & | PTM, | ||
const clang::CastKind & | kind | ||
) |
|
inline |
Definition at line 218 of file BasicValueFactory.h.
|
inline |
Definition at line 182 of file BasicValueFactory.h.
References clang::ento::APSIntType::convert().
|
inline |
Convert - Create a new persistent APSInt with the same value as 'From' but with the bitwidth and signedness of 'To'.
Definition at line 168 of file BasicValueFactory.h.
References clang::ento::APSIntType::convert().
Referenced by Convert(), clang::ento::ProgramState::getSVal(), and clang::ento::SMTConstraintManager::getSymVal().
|
inline |
Definition at line 177 of file BasicValueFactory.h.
References Convert(), getAPSIntType(), and clang::T.
const llvm::APSInt * BasicValueFactory::evalAPSInt | ( | BinaryOperator::Opcode | Op, |
const llvm::APSInt & | V1, | ||
const llvm::APSInt & | V2 | ||
) |
Definition at line 246 of file BasicValueFactory.cpp.
References getTruthValue().
Referenced by clang::ento::SMTConstraintManager::getSymVal().
|
inline |
Returns the type of the APSInt used to store values of the given QualType.
Definition at line 148 of file BasicValueFactory.h.
References clang::Type::getAs(), clang::ASTContext::getIntWidth(), clang::Type::isIntegralOrEnumerationType(), clang::ento::Loc::isLocType(), clang::Type::isSignedIntegerOrEnumerationType(), clang::Type::isUnsignedFixedPointType(), and clang::T.
Referenced by clang::ento::iterator::assumeNoOverflow(), clang::ento::RangedConstraintManager::assumeSymInclusiveRange(), clang::ento::RangedConstraintManager::assumeSymRel(), Convert(), doRearrangeUnchecked(), getMaxValue(), getMinValue(), getValue(), and isWithinConstantOverflowBounds().
const CompoundValData * BasicValueFactory::getCompoundValData | ( | QualType | T, |
llvm::ImmutableList< SVal > | Vals | ||
) |
Definition at line 125 of file BasicValueFactory.cpp.
References D, clang::ento::CompoundValData::Profile(), and clang::T.
Referenced by clang::ento::SValBuilder::makeCompoundVal().
|
inline |
Definition at line 141 of file BasicValueFactory.h.
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 262 of file BasicValueFactory.h.
|
inline |
Definition at line 254 of file BasicValueFactory.h.
Referenced by clang::ento::SValBuilder::makeZeroVal(), processArgument(), and clang::ento::ExprEngine::VisitInitListExpr().
|
inline |
Definition at line 189 of file BasicValueFactory.h.
References clang::ASTContext::IntTy, isUnsigned(), clang::T, clang::ASTContext::UnsignedIntTy, and X.
Referenced by getStartIndex(), and clang::ento::SValBuilder::makeIntVal().
const LazyCompoundValData * BasicValueFactory::getLazyCompoundValData | ( | const StoreRef & | store, |
const TypedValueRegion * | region | ||
) |
Definition at line 142 of file BasicValueFactory.cpp.
References D, and clang::ento::LazyCompoundValData::Profile().
Referenced by clang::ento::SValBuilder::makeLazyCompoundVal().
|
inline |
Definition at line 210 of file BasicValueFactory.h.
References clang::T.
|
inline |
Definition at line 194 of file BasicValueFactory.h.
References getMaxValue(), and v.
Referenced by getMaxValue().
|
inline |
Definition at line 202 of file BasicValueFactory.h.
References getAPSIntType(), getMaxValue(), and clang::T.
|
inline |
Definition at line 214 of file BasicValueFactory.h.
References clang::T.
|
inline |
Definition at line 198 of file BasicValueFactory.h.
References getMinValue(), and v.
Referenced by clang::ento::ProgramState::assumeInBoundDual(), and getMinValue().
|
inline |
Definition at line 206 of file BasicValueFactory.h.
References getAPSIntType(), getMinValue(), and clang::T.
Definition at line 380 of file BasicValueFactory.cpp.
References getPersistentSValWithData(), and X.
const std::pair< SVal, SVal > & BasicValueFactory::getPersistentSValPair | ( | const SVal & | V1, |
const SVal & | V2 | ||
) |
Definition at line 357 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 333 of file BasicValueFactory.cpp.
References clang::Data, P, and V.
Referenced by getPersistentSVal(), and clang::ento::SValBuilder::makeLocAsInteger().
const PointerToMemberData * BasicValueFactory::getPointerToMemberData | ( | const NamedDecl * | ND, |
llvm::ImmutableList< const CXXBaseSpecifier * > | L | ||
) |
Definition at line 159 of file BasicValueFactory.cpp.
References D, and clang::ento::PointerToMemberData::Profile().
Referenced by accumCXXBase().
|
inline |
Definition at line 240 of file BasicValueFactory.h.
References b, clang::ASTContext::getLogicalOperationType(), and getTruthValue().
Definition at line 235 of file BasicValueFactory.h.
References b, clang::ASTContext::getIntWidth(), clang::Type::isUnsignedIntegerOrEnumerationType(), and clang::T.
Referenced by evalAPSInt(), getTruthValue(), and clang::ento::SValBuilder::makeTruthVal().
const llvm::APSInt & BasicValueFactory::getValue | ( | const llvm::APInt & | X, |
bool | isUnsigned | ||
) |
Definition at line 107 of file BasicValueFactory.cpp.
References isUnsigned(), V, and X.
const llvm::APSInt & BasicValueFactory::getValue | ( | const llvm::APSInt & | X | ) |
Definition at line 90 of file BasicValueFactory.cpp.
const llvm::APSInt & BasicValueFactory::getValue | ( | uint64_t | X, |
QualType | T | ||
) |
Definition at line 120 of file BasicValueFactory.cpp.
References getAPSIntType(), clang::T, and X.
|
inline |
Definition at line 230 of file BasicValueFactory.h.
References clang::ASTContext::getTypeSize(), clang::Type::isScalarType(), and clang::T.
Referenced by clang::ento::SValBuilder::makeNullWithType().
|
inline |
Definition at line 266 of file BasicValueFactory.h.
Referenced by accumCXXBase().
|
inline |
Definition at line 258 of file BasicValueFactory.h.
References X.
Referenced by processArgument(), and clang::ento::ExprEngine::VisitInitListExpr().
|
inline |
Definition at line 224 of file BasicValueFactory.h.