clang  6.0.0svn
Public Member Functions | List of all members
clang::ento::BasicValueFactory Class Reference

#include "clang/StaticAnalyzer/Core/PathSensitive/BasicValueFactory.h"

Public Member Functions

 BasicValueFactory (ASTContext &ctx, llvm::BumpPtrAllocator &Alloc)
 
 ~BasicValueFactory ()
 
ASTContextgetContext () 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 CompoundValDatagetCompoundValData (QualType T, llvm::ImmutableList< SVal > Vals)
 
const LazyCompoundValDatagetLazyCompoundValData (const StoreRef &store, const TypedValueRegion *region)
 
const PointerToMemberDatagetPointerToMemberData (const DeclaratorDecl *DD, llvm::ImmutableList< const CXXBaseSpecifier *> L)
 
llvm::ImmutableList< SValgetEmptySValList ()
 
llvm::ImmutableList< SValprependSVal (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 clang::ento::PointerToMemberDataaccumCXXBase (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 SValgetPersistentSVal (SVal X)
 

Detailed Description

Definition at line 89 of file BasicValueFactory.h.

Constructor & Destructor Documentation

◆ BasicValueFactory()

clang::ento::BasicValueFactory::BasicValueFactory ( ASTContext ctx,
llvm::BumpPtrAllocator &  Alloc 
)
inline

Definition at line 111 of file BasicValueFactory.h.

◆ ~BasicValueFactory()

BasicValueFactory::~BasicValueFactory ( )

Definition at line 68 of file BasicValueFactory.cpp.

Member Function Documentation

◆ accumCXXBase()

const clang::ento::PointerToMemberData * BasicValueFactory::accumCXXBase ( llvm::iterator_range< CastExpr::path_const_iterator PathRange,
const nonloc::PointerToMember PTM 
)

◆ Add1()

const llvm::APSInt& clang::ento::BasicValueFactory::Add1 ( const llvm::APSInt &  V)
inline

Definition at line 171 of file BasicValueFactory.h.

References getValue(), and X.

◆ Convert() [1/2]

const llvm::APSInt& clang::ento::BasicValueFactory::Convert ( const llvm::APSInt &  To,
const llvm::APSInt &  From 
)
inline

Convert - Create a new persistent APSInt with the same value as 'From' but with the bitwidth and signedness of 'To'.

Definition at line 133 of file BasicValueFactory.h.

References clang::ento::APSIntType::convert(), and getValue().

Referenced by clang::ento::ProgramState::getSVal().

◆ Convert() [2/2]

const llvm::APSInt& clang::ento::BasicValueFactory::Convert ( QualType  T,
const llvm::APSInt &  From 
)
inline

Definition at line 142 of file BasicValueFactory.h.

References clang::ento::APSIntType::convert(), and getValue().

◆ evalAPSInt()

const llvm::APSInt * BasicValueFactory::evalAPSInt ( BinaryOperator::Opcode  Op,
const llvm::APSInt &  V1,
const llvm::APSInt &  V2 
)

◆ getAPSIntType()

APSIntType clang::ento::BasicValueFactory::getAPSIntType ( QualType  T) const
inline

◆ getCompoundValData()

const CompoundValData * BasicValueFactory::getCompoundValData ( QualType  T,
llvm::ImmutableList< SVal Vals 
)

◆ getContext()

ASTContext& clang::ento::BasicValueFactory::getContext ( ) const
inline

Definition at line 118 of file BasicValueFactory.h.

References getValue(), and clang::T.

◆ getEmptyCXXBaseList()

llvm::ImmutableList<const CXXBaseSpecifier *> clang::ento::BasicValueFactory::getEmptyCXXBaseList ( )
inline

Definition at line 222 of file BasicValueFactory.h.

◆ getEmptySValList()

llvm::ImmutableList<SVal> clang::ento::BasicValueFactory::getEmptySValList ( )
inline

◆ getIntValue()

const llvm::APSInt& clang::ento::BasicValueFactory::getIntValue ( uint64_t  X,
bool  isUnsigned 
)
inline

◆ getIntWithPtrWidth()

const llvm::APSInt& clang::ento::BasicValueFactory::getIntWithPtrWidth ( uint64_t  X,
bool  isUnsigned 
)
inline

◆ getLazyCompoundValData()

const LazyCompoundValData * BasicValueFactory::getLazyCompoundValData ( const StoreRef store,
const TypedValueRegion region 
)

◆ getMaxValue() [1/2]

const llvm::APSInt& clang::ento::BasicValueFactory::getMaxValue ( const llvm::APSInt &  v)
inline

Definition at line 155 of file BasicValueFactory.h.

References getValue().

◆ getMaxValue() [2/2]

const llvm::APSInt& clang::ento::BasicValueFactory::getMaxValue ( QualType  T)
inline

Definition at line 163 of file BasicValueFactory.h.

References getValue().

◆ getMinValue() [1/2]

const llvm::APSInt& clang::ento::BasicValueFactory::getMinValue ( const llvm::APSInt &  v)
inline

Definition at line 159 of file BasicValueFactory.h.

References getValue().

Referenced by clang::ento::ProgramState::assumeInBound().

◆ getMinValue() [2/2]

const llvm::APSInt& clang::ento::BasicValueFactory::getMinValue ( QualType  T)
inline

Definition at line 167 of file BasicValueFactory.h.

References getValue().

◆ getPersistentSVal()

const SVal * BasicValueFactory::getPersistentSVal ( SVal  X)

Definition at line 342 of file BasicValueFactory.cpp.

◆ getPersistentSValPair()

const std::pair< SVal, SVal > & BasicValueFactory::getPersistentSValPair ( const SVal V1,
const SVal V2 
)

Definition at line 318 of file BasicValueFactory.cpp.

References P, and clang::ento::SVal::Profile().

◆ getPersistentSValWithData()

const std::pair< SVal, uintptr_t > & BasicValueFactory::getPersistentSValWithData ( const SVal V,
uintptr_t  Data 
)

Definition at line 293 of file BasicValueFactory.cpp.

References P, and clang::ento::SVal::Profile().

Referenced by clang::ento::SValBuilder::makeLocAsInteger().

◆ getPointerToMemberData()

const PointerToMemberData * BasicValueFactory::getPointerToMemberData ( const DeclaratorDecl DD,
llvm::ImmutableList< const CXXBaseSpecifier *>  L 
)

◆ getTruthValue() [1/2]

const llvm::APSInt& clang::ento::BasicValueFactory::getTruthValue ( bool  b,
QualType  T 
)
inline

◆ getTruthValue() [2/2]

const llvm::APSInt& clang::ento::BasicValueFactory::getTruthValue ( bool  b)
inline

Definition at line 200 of file BasicValueFactory.h.

References clang::ASTContext::getLogicalOperationType().

◆ getValue() [1/3]

const llvm::APSInt & BasicValueFactory::getValue ( const llvm::APSInt &  X)

Definition at line 79 of file BasicValueFactory.cpp.

References P.

◆ getValue() [2/3]

const llvm::APSInt & BasicValueFactory::getValue ( const llvm::APInt &  X,
bool  isUnsigned 
)

Definition at line 96 of file BasicValueFactory.cpp.

References getValue(), and X.

◆ getValue() [3/3]

const llvm::APSInt & BasicValueFactory::getValue ( uint64_t  X,
QualType  T 
)

Definition at line 109 of file BasicValueFactory.cpp.

References getValue().

◆ getZeroWithPtrWidth()

const llvm::APSInt& clang::ento::BasicValueFactory::getZeroWithPtrWidth ( bool  isUnsigned = true)
inline

◆ getZeroWithTypeSize()

const llvm::APSInt& clang::ento::BasicValueFactory::getZeroWithTypeSize ( QualType  T)
inline

◆ prependCXXBase()

llvm::ImmutableList<const CXXBaseSpecifier *> clang::ento::BasicValueFactory::prependCXXBase ( const CXXBaseSpecifier CBS,
llvm::ImmutableList< const CXXBaseSpecifier *>  L 
)
inline

Definition at line 226 of file BasicValueFactory.h.

◆ prependSVal()

llvm::ImmutableList<SVal> clang::ento::BasicValueFactory::prependSVal ( SVal  X,
llvm::ImmutableList< SVal L 
)
inline

Definition at line 218 of file BasicValueFactory.h.

Referenced by clang::ento::ExprEngine::VisitInitListExpr().

◆ Sub1()

const llvm::APSInt& clang::ento::BasicValueFactory::Sub1 ( const llvm::APSInt &  V)
inline

Definition at line 177 of file BasicValueFactory.h.

References getValue(), and X.


The documentation for this class was generated from the following files: