clang API Documentation
#include <SValBuilder.h>
Definition at line 31 of file SValBuilder.h.
clang::ento::SValBuilder::SValBuilder | ( | llvm::BumpPtrAllocator & | alloc, |
ASTContext & | context, | ||
ProgramStateManager & | stateMgr | ||
) | [inline] |
Definition at line 62 of file SValBuilder.h.
virtual clang::ento::SValBuilder::~SValBuilder | ( | ) | [inline, virtual] |
Definition at line 71 of file SValBuilder.h.
const SymbolConjured* clang::ento::SValBuilder::conjureSymbol | ( | const Stmt * | stmt, |
const LocationContext * | LCtx, | ||
QualType | type, | ||
unsigned | visitCount, | ||
const void * | symbolTag = nullptr |
||
) | [inline] |
Definition at line 145 of file SValBuilder.h.
References clang::ento::SymbolManager::conjureSymbol(), and SymMgr.
const SymbolConjured* clang::ento::SValBuilder::conjureSymbol | ( | const Expr * | expr, |
const LocationContext * | LCtx, | ||
unsigned | visitCount, | ||
const void * | symbolTag = nullptr |
||
) | [inline] |
Definition at line 153 of file SValBuilder.h.
References clang::ento::SymbolManager::conjureSymbol(), and SymMgr.
DefinedOrUnknownSVal SValBuilder::conjureSymbolVal | ( | const void * | symbolTag, |
const Expr * | expr, | ||
const LocationContext * | LCtx, | ||
unsigned | count | ||
) |
Create a new symbol with a unique 'name'.
We resort to conjured symbols when we cannot construct a derived symbol. The advantage of symbols derived/built from other symbols is that we preserve the relation between related(or even equivalent) expressions, so conjured symbols should be used sparingly.
Definition at line 109 of file SValBuilder.cpp.
References clang::LocationContext::getAnalysisDeclContext(), clang::AnalysisDeclContext::getASTContext(), clang::ASTContext::getPointerType(), clang::Expr::getType(), and clang::Expr::isGLValue().
Referenced by clang::ento::ExprEngine::bindReturnValue(), clang::ento::ExprEngine::ProcessInitializer(), clang::ento::ExprEngine::Visit(), clang::ento::ExprEngine::VisitBinaryOperator(), clang::ento::ExprEngine::VisitCast(), clang::ento::ExprEngine::VisitCommonDeclRefExpr(), clang::ento::ExprEngine::VisitCXXCatchStmt(), clang::ento::ExprEngine::VisitCXXNewExpr(), clang::ento::ExprEngine::VisitDeclStmt(), clang::ento::ExprEngine::VisitGuardedExpr(), and clang::ento::ExprEngine::VisitIncrementDecrementOperator().
DefinedOrUnknownSVal SValBuilder::conjureSymbolVal | ( | const void * | symbolTag, |
const Expr * | expr, | ||
const LocationContext * | LCtx, | ||
QualType | type, | ||
unsigned | count | ||
) |
Definition at line 124 of file SValBuilder.cpp.
References clang::ento::SymbolManager::canSymbolicate(), clang::ento::SymbolManager::conjureSymbol(), clang::ento::MemRegionManager::getSymbolicRegion(), clang::ento::Loc::isLocType(), MemMgr, and SymMgr.
DefinedOrUnknownSVal SValBuilder::conjureSymbolVal | ( | const Stmt * | stmt, |
const LocationContext * | LCtx, | ||
QualType | type, | ||
unsigned | visitCount | ||
) |
Definition at line 141 of file SValBuilder.cpp.
References clang::ento::SymbolManager::canSymbolicate(), clang::ento::SymbolManager::conjureSymbol(), clang::ento::MemRegionManager::getSymbolicRegion(), clang::ento::Loc::isLocType(), MemMgr, and SymMgr.
Definition at line 76 of file SValBuilder.cpp.
References ArrayIndexTy, ArrayIndexWidth, clang::ento::SVal::castAs(), evalCastFromNonLoc(), clang::ento::SVal::getAs(), and clang::ento::SVal::isUnknownOrUndef().
Referenced by clang::ento::StoreManager::getLValueElement().
virtual SVal clang::ento::SValBuilder::dispatchCast | ( | SVal | val, |
QualType | castTy | ||
) | [pure virtual] |
Referenced by clang::ento::StoreManager::CastRetrievedVal(), and evalCast().
SVal SValBuilder::evalBinOp | ( | ProgramStateRef | state, |
BinaryOperator::Opcode | op, | ||
SVal | lhs, | ||
SVal | rhs, | ||
QualType | type | ||
) |
Definition at line 333 of file SValBuilder.cpp.
References clang::BO_Add, clang::ento::SVal::castAs(), evalBinOpLL(), evalBinOpLN(), evalBinOpNN(), clang::ento::SVal::getAs(), clang::ento::SVal::isUndef(), and clang::ento::SVal::isUnknown().
Referenced by assumeCollectionNonEmpty(), clang::ento::ExprEngine::evalBinOp(), and evalEQ().
virtual SVal clang::ento::SValBuilder::evalBinOpLL | ( | ProgramStateRef | state, |
BinaryOperator::Opcode | op, | ||
Loc | lhs, | ||
Loc | rhs, | ||
QualType | resultTy | ||
) | [pure virtual] |
Create a new value which represents a binary expression with two memory location operands.
Referenced by evalBinOp().
virtual SVal clang::ento::SValBuilder::evalBinOpLN | ( | ProgramStateRef | state, |
BinaryOperator::Opcode | op, | ||
Loc | lhs, | ||
NonLoc | rhs, | ||
QualType | resultTy | ||
) | [pure virtual] |
Create a new value which represents a binary expression with a memory location and non-location operands. For example, this would be used to evaluate a pointer arithmetic operation.
Referenced by evalBinOp().
virtual SVal clang::ento::SValBuilder::evalBinOpNN | ( | ProgramStateRef | state, |
BinaryOperator::Opcode | op, | ||
NonLoc | lhs, | ||
NonLoc | rhs, | ||
QualType | resultTy | ||
) | [pure virtual] |
Create a new value which represents a binary expression with two non- location operands.
Referenced by addValue(), clang::ento::ProgramState::assumeInBound(), evalBinOp(), clang::ento::ExprEngine::evalBinOp(), and scaleValue().
SVal SValBuilder::evalCast | ( | SVal | val, |
QualType | castTy, | ||
QualType | originalType | ||
) |
Definition at line 399 of file SValBuilder.cpp.
References clang::ento::ProgramStateManager::ArrayToPointer(), clang::BO_NE, clang::ento::SVal::castAs(), clang::ento::StoreManager::castRegion(), Context, dispatchCast(), evalCastFromLoc(), clang::ento::SVal::getAs(), clang::ento::SVal::getAsRegion(), clang::ento::SVal::getAsSymbol(), getBasicValueFactory(), clang::QualType::getCanonicalType(), clang::ASTContext::getCanonicalType(), clang::ASTContext::getPointerType(), clang::ento::ProgramStateManager::getStoreManager(), clang::Type::isBlockPointerType(), clang::Type::isBooleanType(), clang::ento::SVal::isConstant(), clang::Type::isFunctionPointerType(), clang::Type::isFunctionType(), clang::Type::isIntegralOrEnumerationType(), clang::ento::Loc::isLocType(), clang::Type::isMemberPointerType(), clang::Type::isPointerType(), clang::Type::isReferenceType(), clang::ento::SVal::isUnknownOrUndef(), clang::Type::isVariableArrayType(), clang::ento::SVal::isZeroConstant(), makeNonLoc(), makeTruthVal(), shouldBeModeledWithNoOp(), and StateMgr.
Referenced by clang::ento::SimpleConstraintManager::assume(), getConstantVal(), clang::ento::ExprEngine::VisitBinaryOperator(), clang::ento::ExprEngine::VisitCast(), clang::ento::ExprEngine::VisitCXXNewExpr(), and clang::ento::ExprEngine::VisitLogicalExpr().
virtual SVal clang::ento::SValBuilder::evalCastFromLoc | ( | Loc | val, |
QualType | castTy | ||
) | [protected, pure virtual] |
Referenced by evalCast().
virtual SVal clang::ento::SValBuilder::evalCastFromNonLoc | ( | NonLoc | val, |
QualType | castTy | ||
) | [protected, pure virtual] |
Referenced by convertToArrayIndex().
virtual SVal clang::ento::SValBuilder::evalComplement | ( | NonLoc | val | ) | [pure virtual] |
Referenced by clang::ento::ExprEngine::evalComplement().
DefinedOrUnknownSVal SValBuilder::evalEQ | ( | ProgramStateRef | state, |
DefinedOrUnknownSVal | lhs, | ||
DefinedOrUnknownSVal | rhs | ||
) |
Definition at line 362 of file SValBuilder.cpp.
References clang::BO_EQ, clang::ento::SVal::castAs(), evalBinOp(), and getConditionType().
Referenced by clang::ento::ExprEngine::processSwitch(), and clang::ento::ExprEngine::VisitIncrementDecrementOperator().
virtual SVal clang::ento::SValBuilder::evalMinus | ( | NonLoc | val | ) | [pure virtual] |
Referenced by clang::ento::ExprEngine::evalMinus().
QualType clang::ento::SValBuilder::getArrayIndexType | ( | ) | const [inline] |
Definition at line 130 of file SValBuilder.h.
References ArrayIndexTy.
Referenced by addValue(), clang::ento::TypedValueRegion::getExtent(), clang::ento::StringRegion::getExtent(), and scaleValue().
Definition at line 134 of file SValBuilder.h.
References BasicVals.
Referenced by clang::ento::ProgramState::assumeInBound(), clang::ento::nonloc::ConcreteInt::evalBinOp(), evalCast(), clang::ento::SimpleConstraintManager::getBasicVals(), and clang::ento::StoreManager::getLValueElement().
const BasicValueFactory& clang::ento::SValBuilder::getBasicValueFactory | ( | ) | const [inline] |
Definition at line 135 of file SValBuilder.h.
References BasicVals.
DefinedSVal SValBuilder::getBlockPointer | ( | const BlockDecl * | block, |
CanQualType | locTy, | ||
const LocationContext * | locContext, | ||
unsigned | blockCount | ||
) |
Definition at line 203 of file SValBuilder.cpp.
References clang::LocationContext::getAnalysisDeclContext(), clang::ento::MemRegionManager::getBlockDataRegion(), clang::ento::MemRegionManager::getBlockTextRegion(), and MemMgr.
Referenced by clang::ento::ExprEngine::VisitBlockExpr().
QualType clang::ento::SValBuilder::getConditionType | ( | ) | const [inline] |
Definition at line 126 of file SValBuilder.h.
References clang::ASTContext::BoolTy, Context, clang::ASTContext::getLangOpts(), and clang::ASTContext::IntTy.
Referenced by assumeCollectionNonEmpty(), evalEQ(), and clang::ento::ExprEngine::getInitialState().
DefinedOrUnknownSVal SValBuilder::getConjuredHeapSymbolVal | ( | const Expr * | E, |
const LocationContext * | LCtx, | ||
unsigned | Count | ||
) |
Conjure a symbol representing heap allocated memory region.
Note, the expression should represent a location.
Definition at line 157 of file SValBuilder.cpp.
References clang::ento::SymbolManager::canSymbolicate(), clang::ento::SymbolManager::conjureSymbol(), clang::ento::MemRegionManager::getSymbolicHeapRegion(), clang::Expr::getType(), clang::ento::Loc::isLocType(), MemMgr, and SymMgr.
Referenced by clang::ento::ExprEngine::VisitCXXNewExpr().
Optional< SVal > SValBuilder::getConstantVal | ( | const Expr * | E | ) |
Returns the value of E
, if it can be determined in a non-path-sensitive manner.
If E
is not a constant or cannot be modeled, returns None
.
Definition at line 229 of file SValBuilder.cpp.
References AttributeLangSupport::C, clang::CK_ArrayToPointerDecay, evalCast(), clang::Expr::EvaluateAsInt(), clang::CastExpr::getCastKind(), getContext(), getRegionManager(), clang::Stmt::getStmtClass(), clang::CastExpr::getSubExpr(), clang::Expr::getType(), clang::CharacterLiteral::getValue(), clang::Expr::IgnoreParens(), clang::Expr::isGLValue(), clang::ento::Loc::isLocType(), clang::Expr::isNullPointerConstant(), makeBoolVal(), makeIntVal(), makeLoc(), makeNull(), makeZeroVal(), and clang::Expr::NPC_ValueDependentIsNotNull.
Referenced by clang::ento::Environment::getSVal(), and clang::ento::ExprEngine::Visit().
ASTContext& clang::ento::SValBuilder::getContext | ( | ) | [inline] |
Definition at line 121 of file SValBuilder.h.
References Context.
Referenced by clang::ento::SimpleConstraintManager::assume(), clang::ento::ProgramState::assumeInBound(), clang::ento::StoreManager::CastRetrievedVal(), collectSubRegionBindings(), getConstantVal(), getCXXThis(), getExistingLazyBinding(), clang::ento::TypedValueRegion::getExtent(), clang::ento::FieldRegion::getExtent(), clang::CXXInstanceCall::getInitialStackFrameContents(), clang::ento::StoreManager::MakeElementRegion(), and makeZeroElementRegion().
const ASTContext& clang::ento::SValBuilder::getContext | ( | ) | const [inline] |
Definition at line 122 of file SValBuilder.h.
References Context.
loc::MemRegionVal SValBuilder::getCXXThis | ( | const CXXMethodDecl * | D, |
const StackFrameContext * | SFC | ||
) |
Return a memory region for the 'this' object reference.
Definition at line 215 of file SValBuilder.cpp.
References getContext(), getRegionManager(), and clang::CXXMethodDecl::getThisType().
Referenced by clang::CallEventManager::getCaller(), clang::CXXInstanceCall::getInitialStackFrameContents(), clang::CXXConstructorCall::getInitialStackFrameContents(), clang::ento::ExprEngine::getInitialState(), getRegionForConstructedObject(), clang::ento::ExprEngine::ProcessBaseDtor(), clang::ento::ExprEngine::processCallExit(), clang::ento::ExprEngine::ProcessInitializer(), clang::ento::ExprEngine::ProcessMemberDtor(), and clang::ento::ExprEngine::VisitCXXConstructExpr().
loc::MemRegionVal SValBuilder::getCXXThis | ( | const CXXRecordDecl * | D, |
const StackFrameContext * | SFC | ||
) |
Return a memory region for the 'this' object reference.
Definition at line 222 of file SValBuilder.cpp.
References getContext(), clang::ASTContext::getPointerType(), getRegionManager(), and clang::TypeDecl::getTypeForDecl().
DefinedOrUnknownSVal SValBuilder::getDerivedRegionValueSymbolVal | ( | SymbolRef | parentSymbol, |
const TypedValueRegion * | region | ||
) |
Definition at line 184 of file SValBuilder.cpp.
References clang::ento::SymbolManager::canSymbolicate(), clang::ento::SymbolManager::getDerivedSymbol(), clang::ento::MemRegionManager::getSymbolicRegion(), clang::ento::TypedValueRegion::getValueType(), clang::ento::Loc::isLocType(), MemMgr, and SymMgr.
DefinedSVal SValBuilder::getFunctionPointer | ( | const FunctionDecl * | func | ) |
Definition at line 199 of file SValBuilder.cpp.
References clang::ento::MemRegionManager::getFunctionTextRegion(), and MemMgr.
Referenced by clang::ento::ExprEngine::VisitCommonDeclRefExpr(), and clang::ento::ExprEngine::VisitMemberExpr().
virtual const llvm::APSInt* clang::ento::SValBuilder::getKnownValue | ( | ProgramStateRef | state, |
SVal | val | ||
) | [pure virtual] |
DefinedSVal SValBuilder::getMetadataSymbolVal | ( | const void * | symbolTag, |
const MemRegion * | region, | ||
const Expr * | expr, | ||
QualType | type, | ||
unsigned | count | ||
) |
Definition at line 168 of file SValBuilder.cpp.
References clang::ento::SymbolManager::canSymbolicate(), clang::ento::SymbolManager::getMetadataSymbol(), clang::ento::MemRegionManager::getSymbolicRegion(), clang::ento::Loc::isLocType(), MemMgr, and SymMgr.
MemRegionManager& clang::ento::SValBuilder::getRegionManager | ( | ) | [inline] |
Definition at line 140 of file SValBuilder.h.
References MemMgr.
Referenced by addParameterValuesToBindings(), getConstantVal(), getCXXThis(), getRegionForConstructedObject(), and clang::ento::ExprEngine::VisitCXXThisExpr().
const MemRegionManager& clang::ento::SValBuilder::getRegionManager | ( | ) | const [inline] |
Definition at line 141 of file SValBuilder.h.
References MemMgr.
DefinedOrUnknownSVal SValBuilder::getRegionValueSymbolVal | ( | const TypedValueRegion * | region | ) |
Make a unique symbol for value of region.
Definition at line 95 of file SValBuilder.cpp.
References clang::ento::SymbolManager::canSymbolicate(), clang::ento::SymbolManager::getRegionValueSymbol(), clang::ento::MemRegionManager::getSymbolicRegion(), clang::ento::TypedValueRegion::getValueType(), clang::ento::Loc::isLocType(), MemMgr, and SymMgr.
ProgramStateManager& clang::ento::SValBuilder::getStateManager | ( | ) | [inline] |
Definition at line 124 of file SValBuilder.h.
References StateMgr.
Referenced by clang::ento::SimpleConstraintManager::assume(), clang::CallEventManager::getCaller(), clang::BlockCall::getInitialStackFrameContents(), clang::CXXConstructorCall::getInitialStackFrameContents(), clang::ObjCMethodCall::getInitialStackFrameContents(), and makeZeroElementRegion().
SymbolManager& clang::ento::SValBuilder::getSymbolManager | ( | ) | [inline] |
Definition at line 137 of file SValBuilder.h.
References SymMgr.
Referenced by clang::ento::AllocaRegion::getExtent(), clang::ento::TypedValueRegion::getExtent(), clang::ento::SymbolicRegion::getExtent(), clang::ento::SimpleConstraintManager::getSymbolManager(), and clang::ento::CheckerContext::getSymbolManager().
const SymbolManager& clang::ento::SValBuilder::getSymbolManager | ( | ) | const [inline] |
Definition at line 138 of file SValBuilder.h.
References SymMgr.
bool clang::ento::SValBuilder::haveSameType | ( | const SymExpr * | Sym1, |
const SymExpr * | Sym2 | ||
) | [inline] |
Definition at line 73 of file SValBuilder.h.
References clang::ento::SymExpr::getType().
bool clang::ento::SValBuilder::haveSameType | ( | QualType | Ty1, |
QualType | Ty2 | ||
) | [inline] |
Definition at line 77 of file SValBuilder.h.
References Context, clang::ASTContext::getCanonicalType(), and clang::Type::isIntegralOrEnumerationType().
NonLoc clang::ento::SValBuilder::makeArrayIndex | ( | uint64_t | idx | ) | [inline] |
Definition at line 226 of file SValBuilder.h.
References ArrayIndexTy, and BasicVals.
Referenced by getValue(), clang::ento::StoreManager::MakeElementRegion(), scaleValue(), and clang::ento::ExprEngine::VisitIncrementDecrementOperator().
nonloc::ConcreteInt clang::ento::SValBuilder::makeBoolVal | ( | const ObjCBoolLiteralExpr * | boolean | ) | [inline] |
Definition at line 238 of file SValBuilder.h.
References clang::ObjCBoolLiteralExpr::getValue(), and makeTruthVal().
Referenced by getConstantVal().
nonloc::ConcreteInt SValBuilder::makeBoolVal | ( | const CXXBoolLiteralExpr * | boolean | ) |
Definition at line 90 of file SValBuilder.cpp.
References clang::CXXBoolLiteralExpr::getValue(), and makeTruthVal().
NonLoc clang::ento::SValBuilder::makeCompoundVal | ( | QualType | type, |
llvm::ImmutableList< SVal > | vals | ||
) | [inline] |
Definition at line 212 of file SValBuilder.h.
References BasicVals, and clang::ento::BasicValueFactory::getCompoundValData().
Referenced by clang::ento::ExprEngine::VisitInitListExpr().
loc::ConcreteInt clang::ento::SValBuilder::makeIntLocVal | ( | const llvm::APSInt & | integer | ) | [inline] |
Definition at line 248 of file SValBuilder.h.
References BasicVals.
nonloc::ConcreteInt clang::ento::SValBuilder::makeIntVal | ( | const IntegerLiteral * | integer | ) | [inline] |
Definition at line 232 of file SValBuilder.h.
References BasicVals, clang::Expr::getType(), clang::APIntStorage::getValue(), and clang::Type::isUnsignedIntegerOrEnumerationType().
Referenced by assumeCollectionNonEmpty(), clang::ento::nonloc::ConcreteInt::evalComplement(), clang::ento::ExprEngine::evalEagerlyAssumeBinOpBifurcation(), clang::ento::nonloc::ConcreteInt::evalMinus(), getConstantVal(), clang::ento::TypedValueRegion::getExtent(), clang::ento::StringRegion::getExtent(), makeZeroVal(), clang::ento::ExprEngine::VisitCommonDeclRefExpr(), clang::ento::ExprEngine::VisitIncrementDecrementOperator(), clang::ento::ExprEngine::VisitLogicalExpr(), clang::ento::ExprEngine::VisitObjCForCollectionStmt(), clang::ento::ExprEngine::VisitOffsetOfExpr(), and clang::ento::ExprEngine::VisitUnaryExprOrTypeTraitExpr().
nonloc::ConcreteInt clang::ento::SValBuilder::makeIntVal | ( | const llvm::APSInt & | integer | ) | [inline] |
Definition at line 244 of file SValBuilder.h.
References BasicVals.
NonLoc clang::ento::SValBuilder::makeIntVal | ( | const llvm::APInt & | integer, |
bool | isUnsigned | ||
) | [inline] |
Definition at line 252 of file SValBuilder.h.
References BasicVals.
DefinedSVal clang::ento::SValBuilder::makeIntVal | ( | uint64_t | integer, |
QualType | type | ||
) | [inline] |
Definition at line 256 of file SValBuilder.h.
References BasicVals, and clang::ento::Loc::isLocType().
NonLoc clang::ento::SValBuilder::makeIntVal | ( | uint64_t | integer, |
bool | isUnsigned | ||
) | [inline] |
Definition at line 263 of file SValBuilder.h.
References BasicVals, and clang::ento::BasicValueFactory::getIntValue().
NonLoc clang::ento::SValBuilder::makeIntValWithPtrWidth | ( | uint64_t | integer, |
bool | isUnsigned | ||
) | [inline] |
Definition at line 267 of file SValBuilder.h.
References BasicVals, and clang::ento::BasicValueFactory::getIntWithPtrWidth().
Referenced by clang::ento::ExprEngine::Visit().
NonLoc clang::ento::SValBuilder::makeLazyCompoundVal | ( | const StoreRef & | store, |
const TypedValueRegion * | region | ||
) | [inline] |
Definition at line 216 of file SValBuilder.h.
References BasicVals, and clang::ento::BasicValueFactory::getLazyCompoundValData().
Loc clang::ento::SValBuilder::makeLoc | ( | SymbolRef | sym | ) | [inline] |
Definition at line 300 of file SValBuilder.h.
References clang::ento::MemRegionManager::getSymbolicRegion(), and MemMgr.
Referenced by addParameterValuesToBindings(), getConstantVal(), clang::ento::StoreManager::getLValueVar(), and clang::ento::ExprEngine::VisitObjCForCollectionStmt().
Loc clang::ento::SValBuilder::makeLoc | ( | const MemRegion * | region | ) | [inline] |
Definition at line 304 of file SValBuilder.h.
Loc clang::ento::SValBuilder::makeLoc | ( | const AddrLabelExpr * | expr | ) | [inline] |
Definition at line 308 of file SValBuilder.h.
References clang::AddrLabelExpr::getLabel().
Loc clang::ento::SValBuilder::makeLoc | ( | const llvm::APSInt & | integer | ) | [inline] |
Definition at line 312 of file SValBuilder.h.
References BasicVals.
NonLoc clang::ento::SValBuilder::makeLocAsInteger | ( | Loc | loc, |
unsigned | bits | ||
) | [inline] |
Definition at line 272 of file SValBuilder.h.
References BasicVals, and clang::ento::BasicValueFactory::getPersistentSValWithData().
NonLoc SValBuilder::makeNonLoc | ( | const SymExpr * | lhs, |
BinaryOperator::Opcode | op, | ||
const llvm::APSInt & | rhs, | ||
QualType | type | ||
) |
Definition at line 44 of file SValBuilder.cpp.
References clang::ento::SymbolManager::getSymIntExpr(), clang::ento::Loc::isLocType(), and SymMgr.
Referenced by evalCast(), and makeSymExprValNN().
NonLoc SValBuilder::makeNonLoc | ( | const llvm::APSInt & | rhs, |
BinaryOperator::Opcode | op, | ||
const SymExpr * | lhs, | ||
QualType | type | ||
) |
Definition at line 54 of file SValBuilder.cpp.
References clang::ento::SymbolManager::getIntSymExpr(), clang::ento::Loc::isLocType(), and SymMgr.
NonLoc SValBuilder::makeNonLoc | ( | const SymExpr * | lhs, |
BinaryOperator::Opcode | op, | ||
const SymExpr * | rhs, | ||
QualType | type | ||
) |
Definition at line 62 of file SValBuilder.cpp.
References clang::ento::SymbolManager::getSymSymExpr(), clang::ento::Loc::isLocType(), and SymMgr.
NonLoc SValBuilder::makeNonLoc | ( | const SymExpr * | operand, |
QualType | fromTy, | ||
QualType | toTy | ||
) |
Create a NonLoc value for cast.
Definition at line 69 of file SValBuilder.cpp.
References clang::ento::SymbolManager::getCastSymbol(), clang::ento::Loc::isLocType(), and SymMgr.
Loc clang::ento::SValBuilder::makeNull | ( | ) | [inline] |
Definition at line 296 of file SValBuilder.h.
References BasicVals, and clang::ento::BasicValueFactory::getZeroWithPtrWidth().
Referenced by getConstantVal(), makeZeroVal(), clang::ento::ExprEngine::VisitCast(), and clang::ento::ExprEngine::VisitUnaryOperator().
SVal SValBuilder::makeSymExprValNN | ( | ProgramStateRef | state, |
BinaryOperator::Opcode | op, | ||
NonLoc | lhs, | ||
NonLoc | rhs, | ||
QualType | resultTy | ||
) |
Constructs a symbolic expression for two non-location values.
Definition at line 304 of file SValBuilder.cpp.
References clang::ento::SymExpr::computeComplexity(), clang::ento::SVal::getAs(), clang::ento::SVal::getAsSymExpr(), and makeNonLoc().
nonloc::ConcreteInt clang::ento::SValBuilder::makeTruthVal | ( | bool | b, |
QualType | type | ||
) | [inline] |
Definition at line 288 of file SValBuilder.h.
References BasicVals, and clang::ento::BasicValueFactory::getTruthValue().
Referenced by evalCast(), makeBoolVal(), and clang::ento::ExprEngine::VisitObjCForCollectionStmt().
nonloc::ConcreteInt clang::ento::SValBuilder::makeTruthVal | ( | bool | b | ) | [inline] |
Definition at line 292 of file SValBuilder.h.
References BasicVals, and clang::ento::BasicValueFactory::getTruthValue().
NonLoc clang::ento::SValBuilder::makeZeroArrayIndex | ( | ) | [inline] |
Definition at line 222 of file SValBuilder.h.
References ArrayIndexTy, and BasicVals.
Referenced by computeExtentBegin(), clang::ento::StoreManager::GetElementZeroRegion(), and makeZeroElementRegion().
Construct an SVal representing '0' for the specified type.
Definition at line 32 of file SValBuilder.cpp.
References clang::Type::isIntegralOrEnumerationType(), clang::ento::Loc::isLocType(), makeIntVal(), and makeNull().
Referenced by getConstantVal(), clang::ento::ExprEngine::getInitialState(), clang::ento::ExprEngine::VisitCXXConstructExpr(), clang::ento::ExprEngine::VisitIncrementDecrementOperator(), clang::ento::ExprEngine::VisitInitListExpr(), and clang::ento::ExprEngine::VisitUnaryOperator().
const QualType clang::ento::SValBuilder::ArrayIndexTy [protected] |
The scalar type to use for array indices.
Definition at line 48 of file SValBuilder.h.
Referenced by convertToArrayIndex(), getArrayIndexType(), makeArrayIndex(), and makeZeroArrayIndex().
const unsigned clang::ento::SValBuilder::ArrayIndexWidth [protected] |
The width of the scalar type used for array indices.
Definition at line 51 of file SValBuilder.h.
Referenced by convertToArrayIndex().
BasicValueFactory clang::ento::SValBuilder::BasicVals [protected] |
Manager of APSInt values.
Definition at line 37 of file SValBuilder.h.
Referenced by getBasicValueFactory(), makeArrayIndex(), makeCompoundVal(), makeIntLocVal(), makeIntVal(), makeIntValWithPtrWidth(), makeLazyCompoundVal(), makeLoc(), makeLocAsInteger(), makeNull(), makeTruthVal(), and makeZeroArrayIndex().
ASTContext& clang::ento::SValBuilder::Context [protected] |
Definition at line 34 of file SValBuilder.h.
Referenced by evalCast(), getConditionType(), getContext(), and haveSameType().
MemRegionManager clang::ento::SValBuilder::MemMgr [protected] |
Manages the creation of memory regions.
Definition at line 43 of file SValBuilder.h.
Referenced by conjureSymbolVal(), getBlockPointer(), getConjuredHeapSymbolVal(), getDerivedRegionValueSymbolVal(), getFunctionPointer(), getMetadataSymbolVal(), getRegionManager(), getRegionValueSymbolVal(), and makeLoc().
ProgramStateManager& clang::ento::SValBuilder::StateMgr [protected] |
Definition at line 45 of file SValBuilder.h.
Referenced by evalCast(), and getStateManager().
SymbolManager clang::ento::SValBuilder::SymMgr [protected] |
Manages the creation of symbols.
Definition at line 40 of file SValBuilder.h.
Referenced by conjureSymbol(), conjureSymbolVal(), getConjuredHeapSymbolVal(), getDerivedRegionValueSymbolVal(), getMetadataSymbolVal(), getRegionValueSymbolVal(), getSymbolManager(), and makeNonLoc().