62 SimpleSValBuilder(llvm::BumpPtrAllocator &alloc,
ASTContext &context,
65 ~SimpleSValBuilder()
override {}
82 const llvm::APSInt &RHS,
QualType resultTy);
89 return new SimpleSValBuilder(alloc, context, stateMgr);
96 const unsigned ValueBits =
Value.getSignificantBits();
113SVal SimpleSValBuilder::MakeSymIntVal(
const SymExpr *LHS,
115 const llvm::APSInt &RHS,
117 bool isIdempotent =
false;
127 return makeIntVal(0, resultTy);
145 return makeIntVal(0, resultTy);
159 return makeIntVal(0, resultTy);
160 else if (RHS.isAllOnes())
167 else if (RHS.isAllOnes()) {
168 const llvm::APSInt &Result = BasicVals.Convert(resultTy, RHS);
182 const llvm::APSInt *ConvertedRHS = &RHS;
189 uint64_t ValWidth = RHS.getBitWidth();
192 if (ValWidth < TypeWidth) {
194 ConvertedRHS = &BasicVals.Convert(SymbolType, RHS);
195 }
else if (ValWidth == TypeWidth) {
200 ConvertedRHS = &BasicVals.Convert(SymbolType, RHS);
206 APSIntType resultIntTy = BasicVals.getAPSIntType(resultTy);
209 op = (op == BO_Add) ? BO_Sub : BO_Add;
211 ConvertedRHS = &BasicVals.Convert(resultTy, RHS);
214 ConvertedRHS = &BasicVals.Convert(resultTy, RHS);
216 return makeNonLoc(LHS, op, *ConvertedRHS, resultTy);
222 SValBuilder &SVB = State->getStateManager().getSValBuilder();
227 return !State->assume(*DV,
false);
239 SValBuilder &SVB = State->getStateManager().getSValBuilder();
244 "This only works with signed integers!");
256 "This only works with signed integers!");
259 return (I <= Max) && (I >= -Max);
262static std::pair<SymbolRef, llvm::APSInt>
264 if (
const auto *SymInt = dyn_cast<SymIntExpr>(Sym))
266 return std::make_pair(SymInt->getLHS(),
267 (SymInt->getOpcode() == BO_Add) ?
269 (-SymInt->getRHS()));
272 return std::make_pair(Sym, BV.getValue(0, Sym->
getType()));
282 SValBuilder &SVB = State->getStateManager().getSValBuilder();
287 assert(SymTy == RSym->
getType() &&
288 "Symbols are not of the same type!");
290 "Integers are not of the same type as symbols!");
292 "Integers are not of the same type as symbols!");
300 llvm_unreachable(
"Operation not suitable for unchecked rearrangement!");
309 llvm::APSInt ResultInt;
317 ResultInt = LInt - RInt;
321 ResultInt = RInt - LInt;
325 ResultInt = (Op == BO_Add) ? (LInt + RInt) : (LInt - RInt);
329 ResultInt = -ResultInt;
331 }
else if (ResultInt == 0) {
336 const llvm::APSInt &PersistentResultInt = BV.getValue(ResultInt);
338 SymMgr.
getSymIntExpr(ResultSym, ResultOp, PersistentResultInt, ResultTy));
378 if (LSym->
getType() != SingleTy)
385 assert(!SingleTy.
isNull() &&
"We should have figured out the type by now!");
392 if (!RSym || RSym->
getType() != SingleTy)
396 llvm::APSInt LInt, RInt;
416 SVal simplifiedLhs = simplifySVal(state, lhs);
417 SVal simplifiedRhs = simplifySVal(state, rhs);
418 if (
auto simplifiedLhsAsNonLoc = simplifiedLhs.
getAs<
NonLoc>())
419 lhs = *simplifiedLhsAsNonLoc;
420 if (
auto simplifiedRhsAsNonLoc = simplifiedRhs.
getAs<
NonLoc>())
421 rhs = *simplifiedRhsAsNonLoc;
431 return makeTruthVal(
true, resultTy);
435 return makeTruthVal(
false, resultTy);
439 return makeIntVal(0, resultTy);
440 return evalCast(makeIntVal(0,
false), resultTy,
444 return evalCast(lhs, resultTy,
QualType{});
450 return makeSymExprValNN(op, lhs, rhs, resultTy);
451 case nonloc::PointerToMemberKind: {
452 assert(rhs.
getSubKind() == nonloc::PointerToMemberKind &&
453 "Both SVals should have pointer-to-member-type");
456 auto LPTMD = LPTM.
getPTMData(), RPTMD = RPTM.getPTMData();
459 return makeTruthVal(LPTMD == RPTMD, resultTy);
461 return makeTruthVal(LPTMD != RPTMD, resultTy);
466 case nonloc::LocAsIntegerKind: {
469 case nonloc::LocAsIntegerKind:
474 return evalBinOpLL(state, op, lhsL,
477 case nonloc::ConcreteIntKind: {
493 BasicVals.getAPSIntType(lSym->getType()).apply(i);
495 BasicVals.getAPSIntType(Context.
VoidPtrTy).apply(i);
496 return evalBinOpLL(state, op, lhsL, makeLoc(i), resultTy);
501 return makeTruthVal(
false, resultTy);
503 return makeTruthVal(
true, resultTy);
506 return makeSymExprValNN(op, InputLHS, InputRHS, resultTy);
510 case nonloc::ConcreteIntKind: {
514 if (
const llvm::APSInt *KnownRHSValue = getConstValue(state, rhs)) {
515 llvm::APSInt RHSValue = *KnownRHSValue;
522 CompareType.
apply(LHSValue);
523 CompareType.
apply(RHSValue);
525 APSIntType IntType = BasicVals.getAPSIntType(resultTy);
526 IntType.
apply(LHSValue);
527 IntType.
apply(RHSValue);
530 const llvm::APSInt *Result =
531 BasicVals.evalAPSInt(op, LHSValue, RHSValue);
560 if (LHSValue.isAllOnes() && LHSValue.isSigned())
561 return evalCast(lhs, resultTy,
QualType{});
566 return evalCast(lhs, resultTy,
QualType{});
567 return makeSymExprValNN(op, InputLHS, InputRHS, resultTy);
573 return makeZeroVal(resultTy);
576 return makeSymExprValNN(op, InputLHS, InputRHS, resultTy);
579 case nonloc::SymbolValKind: {
584 if (
const SymIntExpr *symIntExpr = dyn_cast<SymIntExpr>(Sym)) {
598 llvm_unreachable(
"Logical operators handled by branching logic.");
611 llvm_unreachable(
"'=' and ',' operators handled by ExprEngine.");
614 llvm_unreachable(
"Pointer arithmetic not handled here.");
622 resultTy == getConditionType());
623 assert(symIntExpr->getType()->isBooleanType() ||
624 getContext().hasSameUnqualifiedType(symIntExpr->getType(),
625 getConditionType()));
628 return makeNonLoc(symIntExpr->getLHS(), opc,
629 symIntExpr->getRHS(), resultTy);
634 if (
const llvm::APSInt *RHSValue = getConstValue(state, rhs)) {
647 APSIntType IntType = BasicVals.getAPSIntType(resultTy);
648 const llvm::APSInt &first = IntType.
convert(symIntExpr->getRHS());
649 const llvm::APSInt &second = IntType.
convert(*RHSValue);
658 const llvm::APSInt *newRHS;
660 newRHS = BasicVals.evalAPSInt(BO_Add, first, second);
661 }
else if (first >= second) {
662 newRHS = BasicVals.evalAPSInt(BO_Sub, first, second);
665 newRHS = BasicVals.evalAPSInt(BO_Sub, second, first);
668 assert(newRHS &&
"Invalid operation despite common type!");
676 return MakeSymIntVal(symIntExpr, op, *RHSValue, resultTy);
681 if (
const llvm::APSInt *RHSValue = getConstValue(state, rhs))
682 return MakeSymIntVal(Sym, op, *RHSValue, resultTy);
684 if (std::optional<NonLoc>
V =
tryRearrange(state, op, lhs, rhs, resultTy))
688 return makeSymExprValNN(op, InputLHS, InputRHS, resultTy);
698 SimpleSValBuilder &SVB) {
721 return SVB.makeTruthVal(
false, resultTy);
723 return SVB.makeTruthVal(
true, resultTy);
729 bool leftFirst = (op == BO_LT || op == BO_LE);
730 for (
const auto *I : RD->
fields()) {
732 return SVB.makeTruthVal(leftFirst, resultTy);
734 return SVB.makeTruthVal(!leftFirst, resultTy);
737 llvm_unreachable(
"Fields not found in parent record's definition");
750 ASTContext &Ctx = State->getStateManager().getContext();
751 uint64_t RhsBitwidth =
753 uint64_t LhsBitwidth =
755 if (RhsBitwidth && LhsBitwidth &&
757 assert(RhsBitwidth == LhsBitwidth &&
758 "RhsLoc and LhsLoc bitwidth must be same!");
788 llvm_unreachable(
"Unimplemented operation for two identical values");
790 return makeZeroVal(resultTy);
794 return makeTruthVal(
true, resultTy);
798 return makeTruthVal(
false, resultTy);
804 llvm_unreachable(
"Ordering not implemented for this Loc.");
806 case loc::GotoLabelKind:
813 return evalCast(lhs, resultTy,
QualType{});
817 return makeTruthVal(
false, resultTy);
821 return makeTruthVal(
true, resultTy);
831 case loc::ConcreteIntKind: {
843 return makeNonLoc(rSym, op, L.getValue(), resultTy);
850 if (
const auto *ResultInt =
851 BasicVals.evalAPSInt(op, L.getValue(), rInt->getValue()))
860 assert((isa<loc::MemRegionVal, loc::GotoLabel>(rhs)));
868 return makeTruthVal(
false, resultTy);
872 return makeTruthVal(
true, resultTy);
880 case loc::MemRegionValKind: {
886 return MakeSymIntVal(lSym, op, rInt->getValue(), resultTy);
893 if (rInt->isZeroConstant()) {
895 return evalCast(lhs, resultTy,
QualType{});
898 QualType boolType = getContext().BoolTy;
901 return evalBinOpNN(state, op, l, r, resultTy);
911 assert(LeftMR &&
"MemRegionValKind SVal doesn't have a region!");
929 if (LeftMS != RightMS &&
930 ((LeftMS != UnknownMS && RightMS != UnknownMS) ||
931 (isa<StackSpaceRegion>(LeftMS) || isa<StackSpaceRegion>(RightMS)))) {
936 return makeTruthVal(
false, resultTy);
938 return makeTruthVal(
true, resultTy);
952 if (LeftBase != RightBase &&
953 ((!isa<SymbolicRegion>(LeftBase) && !isa<SymbolicRegion>(RightBase)) ||
954 (isa<HeapSpaceRegion>(LeftMS) || isa<HeapSpaceRegion>(RightMS))) ){
959 return makeTruthVal(
false, resultTy);
961 return makeTruthVal(
true, resultTy);
966 const ElementRegion *RightER = dyn_cast<ElementRegion>(RightMR);
967 const ElementRegion *LeftER = dyn_cast<ElementRegion>(LeftMR);
968 if (RightER && LeftER) {
978 std::optional<NonLoc> LeftIndex = LeftIndexVal.
getAs<
NonLoc>();
981 LeftIndexVal = evalCast(*LeftIndex, ArrayIndexTy,
QualType{});
988 std::optional<NonLoc> RightIndex = RightIndexVal.
getAs<
NonLoc>();
991 RightIndexVal = evalCast(*RightIndex, ArrayIndexTy,
QualType{});
998 return evalBinOpNN(state, op, *LeftIndex, *RightIndex, resultTy);
1003 const FieldRegion *RightFR = dyn_cast<FieldRegion>(RightMR);
1004 const FieldRegion *LeftFR = dyn_cast<FieldRegion>(LeftMR);
1005 if (RightFR && LeftFR) {
1016 if (LeftOffset.
getRegion() !=
nullptr &&
1026 return makeTruthVal(left < right, resultTy);
1028 return makeTruthVal(left > right, resultTy);
1030 return makeTruthVal(left <= right, resultTy);
1032 return makeTruthVal(left >= right, resultTy);
1034 return makeTruthVal(left == right, resultTy);
1036 return makeTruthVal(left != right, resultTy);
1044 if (LHSSym && RHSSym)
1045 return makeNonLoc(LHSSym, op, RHSSym, resultTy);
1056 if (op >= BO_PtrMemD && op <= BO_PtrMemI) {
1058 if (PTMSV->isNullMemberPointer())
1061 auto getFieldLValue = [&](
const auto *FD) ->
SVal {
1064 for (
const auto &I : *PTMSV)
1065 Result = StateMgr.getStoreManager().evalDerivedToBase(
1066 Result, I->getType(), I->isVirtual());
1068 return state->getLValue(FD, Result);
1071 if (
const auto *FD = PTMSV->getDeclAs<
FieldDecl>()) {
1072 return getFieldLValue(FD);
1075 return getFieldLValue(FD);
1083 "arguments to comparison ops must be of the same type");
1096 if (std::optional<nonloc::ConcreteInt> rhsInt =
1098 if (std::optional<loc::ConcreteInt> lhsInt =
1100 const llvm::APSInt &leftI = lhsInt->getValue();
1101 assert(leftI.isUnsigned());
1102 llvm::APSInt rightI(rhsInt->getValue(),
true);
1106 rightI = rightI.extOrTrunc(leftI.getBitWidth());
1109 llvm::APSInt Multiplicand(rightI.getBitWidth(),
true);
1111 Multiplicand = getContext().getTypeSizeInChars(pointeeType).getQuantity();
1112 rightI *= Multiplicand;
1117 rightI = leftI + rightI;
1120 rightI = leftI - rightI;
1123 llvm_unreachable(
"Invalid pointer arithmetic operation");
1138 if (
const ElementRegion *elemReg = dyn_cast<ElementRegion>(region)) {
1139 assert(op == BO_Add || op == BO_Sub);
1140 index = evalBinOpNN(state, op, elemReg->getIndex(), rhs,
1141 getArrayIndexType());
1142 superR = cast<SubRegion>(elemReg->getSuperRegion());
1143 elementType = elemReg->getElementType();
1145 else if (isa<SubRegion>(region)) {
1146 assert(op == BO_Add || op == BO_Sub);
1147 index = (op == BO_Add) ? rhs : evalMinus(rhs);
1148 superR = cast<SubRegion>(region);
1161 elementType = getContext().CharTy;
1163 if (std::optional<NonLoc> indexV = index.getAs<
NonLoc>()) {
1165 superR, getContext()));
1171const llvm::APSInt *SimpleSValBuilder::getConstValue(
ProgramStateRef state,
1173 if (
V.isUnknownOrUndef())
1177 return &
X->getValue();
1180 return &
X->getValue();
1183 return state->getConstraintManager().getSymVal(state, Sym);
1188const llvm::APSInt *SimpleSValBuilder::getKnownValue(
ProgramStateRef state,
1190 return getConstValue(state, simplifySVal(state,
V));
1194 SVal SimplifiedVal = simplifySValOnce(State, Val);
1195 while (SimplifiedVal != Val) {
1196 Val = SimplifiedVal;
1197 SimplifiedVal = simplifySValOnce(State, Val);
1199 return SimplifiedVal;
1203 return simplifyUntilFixpoint(State,
V);
1219 llvm::DenseMap<SymbolRef, SVal> Cached;
1237 const llvm::APSInt *
Const =
1238 State->getConstraintManager().getSymVal(State, Sym);
1246 const SVal Ret = getConst(Sym);
1254 : State(State), SVB(State->getStateManager().getSValBuilder()) {}
1258 if (
const llvm::APSInt *I =
1259 State->getConstraintManager().getSymVal(State, S))
1266 auto I = Cached.find(S);
1267 if (I != Cached.end())
1270 SVal LHS = getConstOrVisit(S->getLHS());
1271 if (isUnchanged(S->getLHS(), LHS))
1294 S, SVB.
evalBinOp(State, S->getOpcode(), LHS, RHS, S->getType()));
1298 auto I = Cached.find(S);
1299 if (I != Cached.end())
1302 SVal RHS = getConstOrVisit(S->getRHS());
1303 if (isUnchanged(S->getRHS(), RHS))
1308 S, SVB.
evalBinOp(State, S->getOpcode(), LHS, RHS, S->getType()));
1312 auto I = Cached.find(S);
1313 if (I != Cached.end())
1324 SVal LHS = getConstOrVisit(S->getLHS());
1325 SVal RHS = getConstOrVisit(S->getRHS());
1327 if (isUnchanged(S->getLHS(), LHS) && isUnchanged(S->getRHS(), RHS))
1331 S, SVB.
evalBinOp(State, S->getOpcode(), LHS, RHS, S->getType()));
1335 auto I = Cached.find(S);
1336 if (I != Cached.end())
1338 const SymExpr *OpSym = S->getOperand();
1339 SVal OpVal = getConstOrVisit(OpSym);
1340 if (isUnchanged(OpSym, OpVal))
1347 auto I = Cached.find(S);
1348 if (I != Cached.end())
1350 SVal Op = getConstOrVisit(S->getOperand());
1351 if (isUnchanged(S->getOperand(), Op))
1355 S, SVB.
evalUnaryOp(State, S->getOpcode(), Op, S->getType()));
1365 return Visit(
V.getSymbol());
1371 SVal SimplifiedV = Simplifier(State).Visit(
V);
static SVal getValue(SVal val, SValBuilder &svalBuilder)
static CompilationDatabasePluginRegistry::Add< FixedCompilationDatabasePlugin > X("fixed-compilation-database", "Reads plain-text flags file")
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 std::pair< SymbolRef, llvm::APSInt > decomposeSymbol(SymbolRef Sym, BasicValueFactory &BV)
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 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 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 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)
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
unsigned getSubKind() 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 SymIntExpr * getSymIntExpr(const SymExpr *lhs, BinaryOperator::Opcode op, const llvm::APSInt &rhs, QualType t)
const SymSymExpr * getSymSymExpr(const SymExpr *lhs, BinaryOperator::Opcode op, const SymExpr *rhs, QualType t)
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 Ret(InterpState &S, CodePtr &PC, APValue &Result)
bool Const(InterpState &S, CodePtr OpPC, const T &Arg)