clang 20.0.0git
|
#include "clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h"
Public Member Functions | |
BasicValueFactory (ASTContext &ctx, llvm::BumpPtrAllocator &Alloc) | |
~BasicValueFactory () | |
ASTContext & | getContext () const |
APSIntPtr | getValue (const llvm::APSInt &X) |
APSIntPtr | getValue (const llvm::APInt &X, bool isUnsigned) |
APSIntPtr | 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. | |
APSIntPtr | 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'. | |
APSIntPtr | Convert (QualType T, const llvm::APSInt &From) |
APSIntPtr | Convert (APSIntType TargetType, const llvm::APSInt &From) |
APSIntPtr | getIntValue (uint64_t X, bool isUnsigned) |
APSIntPtr | getMaxValue (const llvm::APSInt &v) |
APSIntPtr | getMinValue (const llvm::APSInt &v) |
APSIntPtr | getMaxValue (QualType T) |
APSIntPtr | getMinValue (QualType T) |
APSIntPtr | getMaxValue (APSIntType T) |
APSIntPtr | getMinValue (APSIntType T) |
APSIntPtr | Add1 (const llvm::APSInt &V) |
APSIntPtr | Sub1 (const llvm::APSInt &V) |
APSIntPtr | getZeroWithTypeSize (QualType T) |
APSIntPtr | getTruthValue (bool b, QualType T) |
APSIntPtr | 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) |
std::optional< APSIntPtr > | 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 114 of file BasicValueFactory.h.
|
inline |
Definition at line 136 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 | ||
) |
Definition at line 188 of file BasicValueFactory.cpp.
References getPointerToMemberData(), clang::ento::nonloc::PointerToMember::getPTMData(), hasNoRepeatedElements(), and prependCXXBase().
|
inline |
Definition at line 210 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 169 of file BasicValueFactory.h.
References clang::ento::APSIntType::convert().
Referenced by Convert(), clang::ento::ProgramState::getSVal(), and clang::ento::SMTConstraintManager::getSymVal().
Definition at line 177 of file BasicValueFactory.h.
References Convert(), getAPSIntType(), and clang::T.
std::optional< APSIntPtr > 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 149 of file BasicValueFactory.h.
References clang::Type::getAs(), 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 142 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 254 of file BasicValueFactory.h.
|
inline |
Definition at line 246 of file BasicValueFactory.h.
Referenced by clang::ento::SValBuilder::makeZeroVal(), processArgument(), and clang::ento::ExprEngine::VisitInitListExpr().
Definition at line 189 of file BasicValueFactory.h.
References isUnsigned(),