;
67SimpleSValBuilder(llvm::BumpPtrAllocator &alloc,
ASTContext&context,
70~SimpleSValBuilder()
override{}
97 constllvm::APSInt &RHS,
QualTyperesultTy);
104 return newSimpleSValBuilder(alloc, context, stateMgr);
111 const unsignedValueBits =
Value.getSignificantBits();
128SValSimpleSValBuilder::MakeSymIntVal(
const SymExpr*LHS,
130 constllvm::APSInt &RHS,
132 boolisIdempotent =
false;
142 returnmakeIntVal(0, resultTy);
144isIdempotent =
true;
152isIdempotent =
true;
160 returnmakeIntVal(0, resultTy);
169isIdempotent =
true;
174 returnmakeIntVal(0, resultTy);
175 else if(RHS.isAllOnes())
176isIdempotent =
true;
181isIdempotent =
true;
182 else if(RHS.isAllOnes()) {
196std::optional<APSIntPtr> ConvertedRHS = BasicVals.getValue(RHS);
203 uint64_tValWidth = RHS.getBitWidth();
206 if(ValWidth < TypeWidth) {
208ConvertedRHS = BasicVals.Convert(SymbolType, RHS);
209}
else if(ValWidth == TypeWidth) {
214ConvertedRHS = BasicVals.Convert(SymbolType, RHS);
220 APSIntTyperesultIntTy = BasicVals.getAPSIntType(resultTy);
223op = (op == BO_Add) ? BO_Sub : BO_Add;
225ConvertedRHS = BasicVals.Convert(resultTy, RHS);
228ConvertedRHS = BasicVals.Convert(resultTy, RHS);
230 returnmakeNonLoc(LHS, op, *ConvertedRHS, resultTy);
236 SValBuilder&SVB = State->getStateManager().getSValBuilder();
242 return!State->assume(*DV,
false);
254 SValBuilder&SVB = State->getStateManager().getSValBuilder();
259 "This only works with signed integers!");
271 "This only works with signed integers!");
274 return(I <=
Max) && (I >= -
Max);
279 if(
const auto*SymInt = dyn_cast<SymIntExpr>(Sym))
281 returnstd::make_pair(SymInt->getLHS(),
282(SymInt->getOpcode() == BO_Add)
283? BV.getValue(SymInt->getRHS())
284: BV.getValue(-SymInt->getRHS()));
287 returnstd::make_pair(Sym, BV.getValue(0, Sym->
getType()));
297 SValBuilder&SVB = State->getStateManager().getSValBuilder();
302assert(SymTy == RSym->
getType() &&
303 "Symbols are not of the same type!");
305 "Integers are not of the same type as symbols!");
307 "Integers are not of the same type as symbols!");
315llvm_unreachable(
"Operation not suitable for unchecked rearrangement!");
325llvm::APSInt ResultInt;
333ResultInt = LInt - RInt;
337ResultInt = RInt - LInt;
341ResultInt = (Op == BO_Add) ? (LInt + RInt) : (LInt - RInt);
345ResultInt = -ResultInt;
347}
else if(ResultInt == 0) {
352 APSIntPtrPersistentResultInt = BV.getValue(ResultInt);
354ResultSym, ResultOp, PersistentResultInt, ResultTy));
362 returnSym->
getType() == Ty &&
394 if(LSym->
getType() != SingleTy)
401assert(!SingleTy.
isNull() &&
"We should have figured out the type by now!");
408 if(!RSym || RSym->
getType() != SingleTy)
412llvm::APSInt LInt, RInt;
432 SValsimplifiedLhs = simplifySVal(state, lhs);
433 SValsimplifiedRhs = simplifySVal(state, rhs);
434 if(
autosimplifiedLhsAsNonLoc = simplifiedLhs.
getAs<
NonLoc>())
435lhs = *simplifiedLhsAsNonLoc;
436 if(
autosimplifiedRhsAsNonLoc = simplifiedRhs.
getAs<
NonLoc>())
437rhs = *simplifiedRhsAsNonLoc;
447 returnmakeTruthVal(
true, resultTy);
451 returnmakeTruthVal(
false, resultTy);
455 returnmakeIntVal(0, resultTy);
456 returnevalCast(makeIntVal(0,
false), resultTy,
460 returnevalCast(lhs, resultTy,
QualType{});
466 returnmakeSymExprValNN(op, lhs, rhs, resultTy);
467 casenonloc::PointerToMemberKind: {
468assert(rhs.
getKind() == nonloc::PointerToMemberKind &&
469 "Both SVals should have pointer-to-member-type");
472 autoLPTMD = LPTM.
getPTMData(), RPTMD = RPTM.getPTMData();
475 returnmakeTruthVal(LPTMD == RPTMD, resultTy);
477 returnmakeTruthVal(LPTMD != RPTMD, resultTy);
482 casenonloc::LocAsIntegerKind: {
485 casenonloc::LocAsIntegerKind:
490 returnevalBinOpLL(state, op, lhsL,
493 casenonloc::ConcreteIntKind: {
509BasicVals.getAPSIntType(lSym->getType()).apply(i);
511BasicVals.getAPSIntType(Context.
VoidPtrTy).apply(i);
512 returnevalBinOpLL(state, op, lhsL, makeLoc(i), resultTy);
517 returnmakeTruthVal(
false, resultTy);
519 returnmakeTruthVal(
true, resultTy);
522 returnmakeSymExprValNN(op, InputLHS, InputRHS, resultTy);
526 casenonloc::ConcreteIntKind: {
530 if(
constllvm::APSInt *KnownRHSValue = getConstValue(state, rhs)) {
531llvm::APSInt RHSValue = *KnownRHSValue;
538CompareType.
apply(LHSValue);
539CompareType.
apply(RHSValue);
541 APSIntTypeIntType = BasicVals.getAPSIntType(resultTy);
542IntType.
apply(LHSValue);
543IntType.
apply(RHSValue);
546std::optional<APSIntPtr> Result =
547BasicVals.evalAPSInt(op, LHSValue, RHSValue);
549 if(op == BO_Shl || op == BO_Shr) {
589 if(LHSValue.isAllOnes() && LHSValue.isSigned())
590 returnevalCast(lhs, resultTy,
QualType{});
595 returnevalCast(lhs, resultTy,
QualType{});
596 returnmakeSymExprValNN(op, InputLHS, InputRHS, resultTy);
602 returnmakeZeroVal(resultTy);
605 returnmakeSymExprValNN(op, InputLHS, InputRHS, resultTy);
608 casenonloc::SymbolValKind: {
613 if(
const SymIntExpr*symIntExpr = dyn_cast<SymIntExpr>(Sym)) {
627llvm_unreachable(
"Logical operators handled by branching logic.");
640llvm_unreachable(
"'=' and ',' operators handled by ExprEngine.");
643llvm_unreachable(
"Pointer arithmetic not handled here.");
651resultTy == getConditionType());
652assert(symIntExpr->getType()->isBooleanType() ||
653getContext().hasSameUnqualifiedType(symIntExpr->getType(),
654getConditionType()));
657 returnmakeNonLoc(symIntExpr->getLHS(), opc,
658symIntExpr->getRHS(), resultTy);
663 if(
constllvm::APSInt *RHSValue = getConstValue(state, rhs)) {
676 APSIntTypeIntType = BasicVals.getAPSIntType(resultTy);
677 constllvm::APSInt &first = IntType.
convert(symIntExpr->getRHS());
678 constllvm::APSInt &second = IntType.
convert(*RHSValue);
687std::optional<APSIntPtr> newRHS;
689newRHS = BasicVals.evalAPSInt(BO_Add, first, second);
690}
else if(first >= second) {
691newRHS = BasicVals.evalAPSInt(BO_Sub, first, second);
694newRHS = BasicVals.evalAPSInt(BO_Sub, second, first);
697assert(newRHS &&
"Invalid operation despite common type!");
705 returnMakeSymIntVal(symIntExpr, op, *RHSValue, resultTy);
710 if(
constllvm::APSInt *RHSValue = getConstValue(state, rhs))
711 returnMakeSymIntVal(Sym, op, *RHSValue, resultTy);
713 if(std::optional<NonLoc>
V=
tryRearrange(state, op, lhs, rhs, resultTy))
717 returnmakeSymExprValNN(op, InputLHS, InputRHS, resultTy);
727SimpleSValBuilder &SVB) {
750 returnSVB.makeTruthVal(
false, resultTy);
752 returnSVB.makeTruthVal(
true, resultTy);
758 boolleftFirst = (op == BO_LT || op == BO_LE);
759 for(
const auto*I : RD->
fields()) {
761 returnSVB.makeTruthVal(leftFirst, resultTy);
763 returnSVB.makeTruthVal(!leftFirst, resultTy);
766llvm_unreachable(
"Fields not found in parent record's definition");
779 ASTContext&Ctx = State->getStateManager().getContext();
780uint64_t RhsBitwidth =
782uint64_t LhsBitwidth =
784 if(RhsBitwidth && LhsBitwidth && (LhsLoc.
getKind() == RhsLoc.
getKind())) {
785assert(RhsBitwidth == LhsBitwidth &&
786 "RhsLoc and LhsLoc bitwidth must be same!");
816llvm_unreachable(
"Unimplemented operation for two identical values");
818 returnmakeZeroVal(resultTy);
822 returnmakeTruthVal(
true, resultTy);
826 returnmakeTruthVal(
false, resultTy);
832llvm_unreachable(
"Ordering not implemented for this Loc.");
834 caseloc::GotoLabelKind:
841 returnevalCast(lhs, resultTy,
QualType{});
845 returnmakeTruthVal(
false, resultTy);
849 returnmakeTruthVal(
true, resultTy);
859 caseloc::ConcreteIntKind: {
869 returnmakeNonLoc(L.getValue(), op, rSym, resultTy);
872 returnmakeNonLoc(rSym, op, L.getValue(), resultTy);
879 if(std::optional<APSIntPtr> ResultInt =
880BasicVals.evalAPSInt(op, L.getValue(), rInt->getValue()))
889assert((isa<loc::MemRegionVal, loc::GotoLabel>(rhs)));
897 returnmakeTruthVal(
false, resultTy);
901 returnmakeTruthVal(
true, resultTy);
909 caseloc::MemRegionValKind: {
915 returnMakeSymIntVal(lSym, op, rInt->getValue(), resultTy);
922 if(rInt->isZeroConstant()) {
924 returnevalCast(lhs, resultTy,
QualType{});
927 QualTypeboolType = getContext().BoolTy;
930 returnevalBinOpNN(state, op, l, r, resultTy);
940assert(LeftMR &&
"MemRegionValKind SVal doesn't have a region!");
958 if(LeftMS != RightMS &&
959((LeftMS != UnknownMS && RightMS != UnknownMS) ||
960(isa<StackSpaceRegion>(LeftMS) || isa<StackSpaceRegion>(RightMS)))) {
965 returnmakeTruthVal(
false, resultTy);
967 returnmakeTruthVal(
true, resultTy);
981 if(LeftBase != RightBase &&
982((!isa<SymbolicRegion>(LeftBase) && !isa<SymbolicRegion>(RightBase)) ||
983(isa<HeapSpaceRegion>(LeftMS) || isa<HeapSpaceRegion>(RightMS))) ){
988 returnmakeTruthVal(
false, resultTy);
990 returnmakeTruthVal(
true, resultTy);
995 const ElementRegion*RightER = dyn_cast<ElementRegion>(RightMR);
996 const ElementRegion*LeftER = dyn_cast<ElementRegion>(LeftMR);
997 if(RightER && LeftER) {
1007std::optional<NonLoc> LeftIndex = LeftIndexVal.
getAs<
NonLoc>();
1010LeftIndexVal = evalCast(*LeftIndex, ArrayIndexTy,
QualType{});
1017std::optional<NonLoc> RightIndex = RightIndexVal.
getAs<
NonLoc>();
1020RightIndexVal = evalCast(*RightIndex, ArrayIndexTy,
QualType{});
1027 returnevalBinOpNN(state, op, *LeftIndex, *RightIndex, resultTy);
1032 const FieldRegion*RightFR = dyn_cast<FieldRegion>(RightMR);
1033 const FieldRegion*LeftFR = dyn_cast<FieldRegion>(LeftMR);
1034 if(RightFR && LeftFR) {
1045 if(LeftOffset.
getRegion() !=
nullptr&&
1055 returnmakeTruthVal(left < right, resultTy);
1057 returnmakeTruthVal(left > right, resultTy);
1059 returnmakeTruthVal(left <= right, resultTy);
1061 returnmakeTruthVal(left >= right, resultTy);
1063 returnmakeTruthVal(left == right, resultTy);
1065 returnmakeTruthVal(left != right, resultTy);
1073 if(LHSSym && RHSSym)
1074 returnmakeNonLoc(LHSSym, op, RHSSym, resultTy);
1085 if(op >= BO_PtrMemD && op <= BO_PtrMemI) {
1087 if(PTMSV->isNullMemberPointer())
1090 autogetFieldLValue = [&](
const auto*FD) ->
SVal{
1093 for(
const auto&I : *PTMSV)
1094Result = StateMgr.getStoreManager().evalDerivedToBase(
1095Result, I->getType(), I->isVirtual());
1097 returnstate->getLValue(FD, Result);
1100 if(
const auto*FD = PTMSV->getDeclAs<
FieldDecl>()) {
1101 returngetFieldLValue(FD);
1104 returngetFieldLValue(FD);
1112 "arguments to comparison ops must be of the same type");
1125 if(std::optional<nonloc::ConcreteInt> rhsInt =
1127 if(std::optional<loc::ConcreteInt> lhsInt =
1129 constllvm::APSInt &leftI = lhsInt->getValue();
1130assert(leftI.isUnsigned());
1131llvm::APSInt rightI(rhsInt->getValue(),
true);
1135rightI = rightI.extOrTrunc(leftI.getBitWidth());
1138llvm::APSInt Multiplicand(rightI.getBitWidth(),
true);
1140Multiplicand = getContext().getTypeSizeInChars(pointeeType).getQuantity();
1141rightI *= Multiplicand;
1146rightI = leftI + rightI;
1149rightI = leftI - rightI;
1152llvm_unreachable(
"Invalid pointer arithmetic operation");
1167 if(
const ElementRegion*elemReg = dyn_cast<ElementRegion>(region)) {
1168assert(op == BO_Add || op == BO_Sub);
1169index = evalBinOpNN(state, op, elemReg->getIndex(), rhs,
1170getArrayIndexType());
1171superR = cast<SubRegion>(elemReg->getSuperRegion());
1172elementType = elemReg->getElementType();
1174 else if(isa<SubRegion>(region)) {
1175assert(op == BO_Add || op == BO_Sub);
1176index = (op == BO_Add) ? rhs : evalMinus(rhs);
1177superR = cast<SubRegion>(region);
1190elementType = getContext().CharTy;
1192 if(std::optional<NonLoc> indexV = index.getAs<
NonLoc>()) {
1194superR, getContext()));
1200constllvm::APSInt *SimpleSValBuilder::getConstValue(
ProgramStateRefstate,
1206 returnstate->getConstraintManager().getSymVal(state, Sym);
1211constllvm::APSInt *SimpleSValBuilder::getConcreteValue(
SVal V) {
1213 return X->getValue().get();
1216 return X->getValue().get();
1221constllvm::APSInt *SimpleSValBuilder::getKnownValue(
ProgramStateRefstate,
1223 returngetConstValue(state, simplifySVal(state,
V));
1226constllvm::APSInt *SimpleSValBuilder::getMinValue(
ProgramStateRefstate,
1228 V= simplifySVal(state,
V);
1234 returnstate->getConstraintManager().getSymMinVal(state, Sym);
1239constllvm::APSInt *SimpleSValBuilder::getMaxValue(
ProgramStateRefstate,
1241 V= simplifySVal(state,
V);
1247 returnstate->getConstraintManager().getSymMaxVal(state, Sym);
1253 SValSimplifiedVal = simplifySValOnce(State, Val);
1254 while(SimplifiedVal != Val) {
1255Val = SimplifiedVal;
1256SimplifiedVal = simplifySValOnce(State, Val);
1258 returnSimplifiedVal;
1262 returnsimplifyUntilFixpoint(State,
V);
1278llvm::DenseMap<SymbolRef, SVal> Cached;
1296 constllvm::APSInt *
Const=
1297State->getConstraintManager().getSymVal(State, Sym);
1305 const SVal Ret= getConst(Sym);
1306 if(
Ret.isUndef())
1313: State(State), SVB(State->getStateManager().getSValBuilder()) {}
1317 if(
constllvm::APSInt *I =
1318State->getConstraintManager().getSymVal(State, S))
1325 autoI = Cached.find(S);
1326 if(I != Cached.end())
1329 SValLHS = getConstOrVisit(S->getLHS());
1330 if(isUnchanged(S->getLHS(), LHS))
1353S, SVB.
evalBinOp(State, S->getOpcode(), LHS, RHS, S->getType()));
1357 autoI = Cached.find(S);
1358 if(I != Cached.end())
1361 SValRHS = getConstOrVisit(S->getRHS());
1362 if(isUnchanged(S->getRHS(), RHS))
1367S, SVB.
evalBinOp(State, S->getOpcode(), LHS, RHS, S->getType()));
1371 autoI = Cached.find(S);
1372 if(I != Cached.end())
1383 SValLHS = getConstOrVisit(S->getLHS());
1384 SValRHS = getConstOrVisit(S->getRHS());
1386 if(isUnchanged(S->getLHS(), LHS) && isUnchanged(S->getRHS(), RHS))
1390S, SVB.
evalBinOp(State, S->getOpcode(), LHS, RHS, S->getType()));
1394 autoI = Cached.find(S);
1395 if(I != Cached.end())
1397 const SymExpr*OpSym = S->getOperand();
1398 SValOpVal = getConstOrVisit(OpSym);
1399 if(isUnchanged(OpSym, OpVal))
1402 returncache(S, SVB.
evalCast(OpVal, S->getType(), OpSym->
getType()));
1406 autoI = Cached.find(S);
1407 if(I != Cached.end())
1409 SValOp = getConstOrVisit(S->getOperand());
1410 if(isUnchanged(S->getOperand(), Op))
1414S, SVB.
evalUnaryOp(State, S->getOpcode(), Op, S->getType()));
1424 return Visit(
V.getSymbol());
1430 SValSimplifiedV = Simplifier(State).Visit(
V);
static std::optional< int64_t > getConcreteValue(NonLoc SV)
static bool isInRelation(BinaryOperator::Opcode Rel, SymbolRef Sym, llvm::APSInt Bound, ProgramStateRef State)
static NonLoc doRearrangeUnchecked(ProgramStateRef State, BinaryOperator::Opcode Op, SymbolRef LSym, llvm::APSInt LInt, SymbolRef RSym, llvm::APSInt RInt)
static bool isNegationValuePreserving(const llvm::APSInt &Value, APSIntType ResultType)
static std::optional< NonLoc > tryRearrange(ProgramStateRef State, BinaryOperator::Opcode Op, NonLoc Lhs, NonLoc Rhs, QualType ResultTy)
static bool shouldRearrange(ProgramStateRef State, BinaryOperator::Opcode Op, SymbolRef Sym, llvm::APSInt Int, QualType Ty)
static SVal evalBinOpFieldRegionFieldRegion(const FieldRegion *LeftFR, const FieldRegion *RightFR, BinaryOperator::Opcode op, QualType resultTy, SimpleSValBuilder &SVB)
static bool isWithinConstantOverflowBounds(SymbolRef Sym, ProgramStateRef State)
static std::pair< SymbolRef, APSIntPtr > decomposeSymbol(SymbolRef Sym, BasicValueFactory &BV)
static void assertEqualBitWidths(ProgramStateRef State, Loc RhsLoc, Loc LhsLoc)
Holds long-lived AST nodes (such as types and decls) that can be referred to throughout the semantic ...
uint64_t getTypeSize(QualType T) const
Return the size of the specified (complete) type T, in bits.
bool isComparisonOp() const
static Opcode negateComparisonOp(Opcode Opc)
static Opcode reverseComparisonOp(Opcode Opc)
bool isAdditiveOp() const
Represents a member of a struct/union/class.
const RecordDecl * getParent() const
Returns the parent of this field declaration, which is the struct in which this field is defined.
Represents a field injected from an anonymous union/struct into the parent scope.
A (possibly-)qualified type.
bool isNull() const
Return true if this QualType doesn't point to a type yet.
Represents a struct/union/class.
field_range fields() const
bool isBooleanType() const
bool isSignedIntegerOrEnumerationType() const
Determines whether this is an integer type that is signed or an enumeration types whose underlying ty...
QualType getPointeeType() const
If this is a pointer, ObjC object pointer, or block pointer, this returns the respective pointee.
bool isIntegralOrEnumerationType() const
Determine whether this type is an integral or enumeration type.
bool isAnyPointerType() const
A safe wrapper around APSInt objects allocated and owned by BasicValueFactory.
A record of the "type" of an APSInt, used for conversions.
uint32_t getBitWidth() const
llvm::APSInt getMaxValue() const LLVM_READONLY
Returns the maximum value for this type.
void apply(llvm::APSInt &Value) const
Convert a given APSInt, in place, to match this type.
llvm::APSInt convert(const llvm::APSInt &Value) const LLVM_READONLY
Convert and return a new APSInt with the given value, but this type's bit width and signedness.
llvm::APSInt getValue(uint64_t RawValue) const LLVM_READONLY
APSIntType getAPSIntType(QualType T) const
Returns the type of the APSInt used to store values of the given QualType.
Template implementation for all binary symbolic expressions.
ElementRegion is used to represent both array elements and casts.
QualType getElementType() const
LLVM_ATTRIBUTE_RETURNS_NONNULL const FieldDecl * getDecl() const override
FullSValVisitor - a convenient mixed visitor for all three: SVal, SymExpr and MemRegion subclasses.
static bool isLocType(QualType T)
RetTy VisitMemRegion(const MemRegion *R)
MemRegion - The root abstract class for all memory regions.
LLVM_ATTRIBUTE_RETURNS_NONNULL const MemSpaceRegion * getMemorySpace() const
RegionOffset getAsOffset() const
Compute the offset within the top level memory object.
LLVM_ATTRIBUTE_RETURNS_NONNULL const MemRegion * getBaseRegion() const
MemSpaceRegion - A memory region that represents a "memory space"; for example, the set of global var...
SValBuilder & getSValBuilder()
Represent a region's offset within the top level base region.
bool hasSymbolicOffset() const
const MemRegion * getRegion() const
It might return null.
int64_t getOffset() const
virtual const llvm::APSInt * getKnownValue(ProgramStateRef state, SVal val)=0
Evaluates a given SVal.
BasicValueFactory & getBasicValueFactory()
virtual SVal evalBinOpLN(ProgramStateRef state, BinaryOperator::Opcode op, Loc lhs, NonLoc rhs, QualType resultTy)=0
Create a new value which represents a binary expression with a memory location and non-location opera...
virtual SVal evalBinOpLL(ProgramStateRef state, BinaryOperator::Opcode op, Loc lhs, Loc rhs, QualType resultTy)=0
Create a new value which represents a binary expression with two memory location operands.
nonloc::ConcreteInt makeIntVal(const IntegerLiteral *integer)
loc::MemRegionVal makeLoc(SymbolRef sym)
virtual const llvm::APSInt * getMinValue(ProgramStateRef state, SVal val)=0
Tries to get the minimal possible (integer) value of a given SVal.
virtual SVal evalBinOpNN(ProgramStateRef state, BinaryOperator::Opcode op, NonLoc lhs, NonLoc rhs, QualType resultTy)=0
Create a new value which represents a binary expression with two non- location operands.
DefinedSVal makeSymbolVal(SymbolRef Sym)
Make an SVal that represents the given symbol.
SVal evalCast(SVal V, QualType CastTy, QualType OriginalTy)
Cast a given SVal to another SVal using given QualType's.
const AnalyzerOptions & getAnalyzerOptions() const
virtual SVal simplifySVal(ProgramStateRef State, SVal Val)=0
Simplify symbolic expressions within a given SVal.
QualType getConditionType() const
SVal evalUnaryOp(ProgramStateRef state, UnaryOperator::Opcode opc, SVal operand, QualType type)
virtual const llvm::APSInt * getMaxValue(ProgramStateRef state, SVal val)=0
Tries to get the maximal possible (integer) value of a given SVal.
SymbolManager & getSymbolManager()
SVal evalBinOp(ProgramStateRef state, BinaryOperator::Opcode op, SVal lhs, SVal rhs, QualType type)
loc::ConcreteInt makeIntLocVal(const llvm::APSInt &integer)
SVal - This represents a symbolic expression, which can be either an L-value or an R-value.
bool isZeroConstant() const
SymbolRef getAsSymbol(bool IncludeBaseRegions=false) const
If this SVal wraps a symbol return that SymbolRef.
std::optional< T > getAs() const
Convert to the specified SVal type, returning std::nullopt if this SVal is not of the desired type.
QualType getType(const ASTContext &) const
Try to get a reasonable type for the given value.
SymbolRef getAsLocSymbol(bool IncludeBaseRegions=false) const
If this SVal is a location and wraps a symbol, return that SymbolRef.
const MemRegion * getAsRegion() const
T castAs() const
Convert to the specified SVal type, asserting that this SVal is of the desired type.
SubRegion - A region that subsets another larger region.
LLVM_ATTRIBUTE_RETURNS_NONNULL const MemRegion * getSuperRegion() const
RetTy VisitSymExpr(SymbolRef S)
virtual QualType getType() const =0
Represents a cast expression.
A symbol representing data which can be stored in a memory location (region).
const SymExprT * acquire(Args &&...args)
Create or retrieve a SymExpr of type SymExprT for the given arguments.
Represents a symbolic expression involving a unary operator.
Value representing integer constant.
Value representing pointer-to-member.
const PTMDataType getPTMData() const
Represents symbolic expression that isn't a location.
SValBuilder * createSimpleSValBuilder(llvm::BumpPtrAllocator &alloc, ASTContext &context, ProgramStateManager &stateMgr)
bool Const(InterpState &S, CodePtr OpPC, const T &Arg)
bool Ret(InterpState &S, CodePtr &PC)
The JSON file list parser is used to communicate input to InstallAPI.
const FunctionProtoType * T
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4