66 SimpleSValBuilder(llvm::BumpPtrAllocator &alloc,
ASTContext &context,
69 ~SimpleSValBuilder()
override {}
96 const llvm::APSInt &RHS,
QualType resultTy);
103 return new SimpleSValBuilder(alloc, context, stateMgr);
110 const unsigned ValueBits =
Value.getSignificantBits();
127SVal SimpleSValBuilder::MakeSymIntVal(
const SymExpr *LHS,
129 const llvm::APSInt &RHS,
131 bool isIdempotent =
false;
141 return makeIntVal(0, resultTy);
159 return makeIntVal(0, resultTy);
173 return makeIntVal(0, resultTy);
174 else if (RHS.isAllOnes())
181 else if (RHS.isAllOnes()) {
182 const llvm::APSInt &Result = BasicVals.Convert(resultTy, RHS);
196 const llvm::APSInt *ConvertedRHS = &RHS;
203 uint64_t ValWidth = RHS.getBitWidth();
206 if (ValWidth < TypeWidth) {
208 ConvertedRHS = &BasicVals.Convert(SymbolType, RHS);
209 }
else if (ValWidth == TypeWidth) {
214 ConvertedRHS = &BasicVals.Convert(SymbolType, RHS);
220 APSIntType resultIntTy = BasicVals.getAPSIntType(resultTy);
223 op = (op == BO_Add) ? BO_Sub : BO_Add;
225 ConvertedRHS = &BasicVals.Convert(resultTy, RHS);
228 ConvertedRHS = &BasicVals.Convert(resultTy, RHS);
230 return makeNonLoc(LHS, op, *ConvertedRHS, resultTy);
236 SValBuilder &SVB = State->getStateManager().getSValBuilder();
241 return !State->assume(*DV,
false);
253 SValBuilder &SVB = State->getStateManager().getSValBuilder();
258 "This only works with signed integers!");
270 "This only works with signed integers!");
273 return (I <=
Max) && (I >= -
Max);
276static std::pair<SymbolRef, llvm::APSInt>
278 if (
const auto *SymInt = dyn_cast<SymIntExpr>(Sym))
280 return std::make_pair(SymInt->getLHS(),
281 (SymInt->getOpcode() == BO_Add) ?
283 (-SymInt->getRHS()));
286 return std::make_pair(Sym, BV.getValue(0, Sym->
getType()));
296 SValBuilder &SVB = State->getStateManager().getSValBuilder();
301 assert(SymTy == RSym->
getType() &&
302 "Symbols are not of the same type!");
304 "Integers are not of the same type as symbols!");
306 "Integers are not of the same type as symbols!");
314 llvm_unreachable(
"Operation not suitable for unchecked rearrangement!");
323 llvm::APSInt ResultInt;
331 ResultInt = LInt - RInt;
335 ResultInt = RInt - LInt;
339 ResultInt = (Op == BO_Add) ? (LInt + RInt) : (LInt - RInt);
343 ResultInt = -ResultInt;
345 }
else if (ResultInt == 0) {
350 const llvm::APSInt &PersistentResultInt = BV.getValue(ResultInt);
352 SymMgr.
getSymIntExpr(ResultSym, ResultOp, PersistentResultInt, ResultTy));
392 if (LSym->
getType() != SingleTy)
399 assert(!SingleTy.
isNull() &&
"We should have figured out the type by now!");
406 if (!RSym || RSym->
getType() != SingleTy)
410 llvm::APSInt LInt, RInt;
430 SVal simplifiedLhs = simplifySVal(state, lhs);
431 SVal simplifiedRhs = simplifySVal(state, rhs);
432 if (
auto simplifiedLhsAsNonLoc = simplifiedLhs.
getAs<
NonLoc>())
433 lhs = *simplifiedLhsAsNonLoc;
434 if (
auto simplifiedRhsAsNonLoc = simplifiedRhs.
getAs<
NonLoc>())
435 rhs = *simplifiedRhsAsNonLoc;
445 return makeTruthVal(
true, resultTy);
449 return makeTruthVal(
false, resultTy);
453 return makeIntVal(0, resultTy);
454 return evalCast(makeIntVal(0,
false), resultTy,
458 return evalCast(lhs, resultTy,
QualType{});
464 return makeSymExprValNN(op, lhs, rhs, resultTy);
465 case nonloc::PointerToMemberKind: {
466 assert(rhs.
getKind() == nonloc::PointerToMemberKind &&
467 "Both SVals should have pointer-to-member-type");
470 auto LPTMD = LPTM.
getPTMData(), RPTMD = RPTM.getPTMData();
473 return makeTruthVal(LPTMD == RPTMD, resultTy);
475 return makeTruthVal(LPTMD != RPTMD, resultTy);
480 case nonloc::LocAsIntegerKind: {
483 case nonloc::LocAsIntegerKind:
488 return evalBinOpLL(state, op, lhsL,
491 case nonloc::ConcreteIntKind: {
507 BasicVals.getAPSIntType(lSym->getType()).apply(i);
509 BasicVals.getAPSIntType(Context.
VoidPtrTy).apply(i);
510 return evalBinOpLL(state, op, lhsL, makeLoc(i), resultTy);
515 return makeTruthVal(
false, resultTy);
517 return makeTruthVal(
true, resultTy);
520 return makeSymExprValNN(op, InputLHS, InputRHS, resultTy);
524 case nonloc::ConcreteIntKind: {
528 if (
const llvm::APSInt *KnownRHSValue = getConstValue(state, rhs)) {
529 llvm::APSInt RHSValue = *KnownRHSValue;
536 CompareType.
apply(LHSValue);
537 CompareType.
apply(RHSValue);
539 APSIntType IntType = BasicVals.getAPSIntType(resultTy);
540 IntType.
apply(LHSValue);
541 IntType.
apply(RHSValue);
544 const llvm::APSInt *Result =
545 BasicVals.evalAPSInt(op, LHSValue, RHSValue);
547 if (op == BO_Shl || op == BO_Shr) {
587 if (LHSValue.isAllOnes() && LHSValue.isSigned())
588 return evalCast(lhs, resultTy,
QualType{});
593 return evalCast(lhs, resultTy,
QualType{});
594 return makeSymExprValNN(op, InputLHS, InputRHS, resultTy);
600 return makeZeroVal(resultTy);
603 return makeSymExprValNN(op, InputLHS, InputRHS, resultTy);
606 case nonloc::SymbolValKind: {
611 if (
const SymIntExpr *symIntExpr = dyn_cast<SymIntExpr>(Sym)) {
625 llvm_unreachable(
"Logical operators handled by branching logic.");
638 llvm_unreachable(
"'=' and ',' operators handled by ExprEngine.");
641 llvm_unreachable(
"Pointer arithmetic not handled here.");
649 resultTy == getConditionType());
650 assert(symIntExpr->getType()->isBooleanType() ||
651 getContext().hasSameUnqualifiedType(symIntExpr->getType(),
652 getConditionType()));
655 return makeNonLoc(symIntExpr->getLHS(), opc,
656 symIntExpr->getRHS(), resultTy);
661 if (
const llvm::APSInt *RHSValue = getConstValue(state, rhs)) {
674 APSIntType IntType = BasicVals.getAPSIntType(resultTy);
675 const llvm::APSInt &first = IntType.
convert(symIntExpr->getRHS());
676 const llvm::APSInt &second = IntType.
convert(*RHSValue);
685 const llvm::APSInt *newRHS;
687 newRHS = BasicVals.evalAPSInt(BO_Add, first, second);
688 }
else if (first >= second) {
689 newRHS = BasicVals.evalAPSInt(BO_Sub, first, second);
692 newRHS = BasicVals.evalAPSInt(BO_Sub, second, first);
695 assert(newRHS &&
"Invalid operation despite common type!");
703 return MakeSymIntVal(symIntExpr, op, *RHSValue, resultTy);
708 if (
const llvm::APSInt *RHSValue = getConstValue(state, rhs))
709 return MakeSymIntVal(Sym, op, *RHSValue, resultTy);
711 if (std::optional<NonLoc>
V =
tryRearrange(state, op, lhs, rhs, resultTy))
715 return makeSymExprValNN(op, InputLHS, InputRHS, resultTy);
725 SimpleSValBuilder &SVB) {
748 return SVB.makeTruthVal(
false, resultTy);
750 return SVB.makeTruthVal(
true, resultTy);
756 bool leftFirst = (op == BO_LT || op == BO_LE);
757 for (
const auto *I : RD->
fields()) {
759 return SVB.makeTruthVal(leftFirst, resultTy);
761 return SVB.makeTruthVal(!leftFirst, resultTy);
764 llvm_unreachable(
"Fields not found in parent record's definition");
777 ASTContext &Ctx = State->getStateManager().getContext();
778 uint64_t RhsBitwidth =
780 uint64_t LhsBitwidth =
782 if (RhsBitwidth && LhsBitwidth && (LhsLoc.
getKind() == RhsLoc.
getKind())) {
783 assert(RhsBitwidth == LhsBitwidth &&
784 "RhsLoc and LhsLoc bitwidth must be same!");
814 llvm_unreachable(
"Unimplemented operation for two identical values");
816 return makeZeroVal(resultTy);
820 return makeTruthVal(
true, resultTy);
824 return makeTruthVal(
false, resultTy);
830 llvm_unreachable(
"Ordering not implemented for this Loc.");
832 case loc::GotoLabelKind:
839 return evalCast(lhs, resultTy,
QualType{});
843 return makeTruthVal(
false, resultTy);
847 return makeTruthVal(
true, resultTy);
857 case loc::ConcreteIntKind: {
869 return makeNonLoc(rSym, op, L.getValue(), resultTy);
876 if (
const auto *ResultInt =
877 BasicVals.evalAPSInt(op, L.getValue(), rInt->getValue()))
886 assert((isa<loc::MemRegionVal, loc::GotoLabel>(rhs)));
894 return makeTruthVal(
false, resultTy);
898 return makeTruthVal(
true, resultTy);
906 case loc::MemRegionValKind: {
912 return MakeSymIntVal(lSym, op, rInt->getValue(), resultTy);
919 if (rInt->isZeroConstant()) {
921 return evalCast(lhs, resultTy,
QualType{});
924 QualType boolType = getContext().BoolTy;
927 return evalBinOpNN(state, op, l, r, resultTy);
937 assert(LeftMR &&
"MemRegionValKind SVal doesn't have a region!");
955 if (LeftMS != RightMS &&
956 ((LeftMS != UnknownMS && RightMS != UnknownMS) ||
957 (isa<StackSpaceRegion>(LeftMS) || isa<StackSpaceRegion>(RightMS)))) {
962 return makeTruthVal(
false, resultTy);
964 return makeTruthVal(
true, resultTy);
978 if (LeftBase != RightBase &&
979 ((!isa<SymbolicRegion>(LeftBase) && !isa<SymbolicRegion>(RightBase)) ||
980 (isa<HeapSpaceRegion>(LeftMS) || isa<HeapSpaceRegion>(RightMS))) ){
985 return makeTruthVal(
false, resultTy);
987 return makeTruthVal(
true, resultTy);
992 const ElementRegion *RightER = dyn_cast<ElementRegion>(RightMR);
993 const ElementRegion *LeftER = dyn_cast<ElementRegion>(LeftMR);
994 if (RightER && LeftER) {
1004 std::optional<NonLoc> LeftIndex = LeftIndexVal.
getAs<
NonLoc>();
1007 LeftIndexVal = evalCast(*LeftIndex, ArrayIndexTy,
QualType{});
1014 std::optional<NonLoc> RightIndex = RightIndexVal.
getAs<
NonLoc>();
1017 RightIndexVal = evalCast(*RightIndex, ArrayIndexTy,
QualType{});
1024 return evalBinOpNN(state, op, *LeftIndex, *RightIndex, resultTy);
1029 const FieldRegion *RightFR = dyn_cast<FieldRegion>(RightMR);
1030 const FieldRegion *LeftFR = dyn_cast<FieldRegion>(LeftMR);
1031 if (RightFR && LeftFR) {
1042 if (LeftOffset.
getRegion() !=
nullptr &&
1052 return makeTruthVal(left < right, resultTy);
1054 return makeTruthVal(left > right, resultTy);
1056 return makeTruthVal(left <= right, resultTy);
1058 return makeTruthVal(left >= right, resultTy);
1060 return makeTruthVal(left == right, resultTy);
1062 return makeTruthVal(left != right, resultTy);
1070 if (LHSSym && RHSSym)
1071 return makeNonLoc(LHSSym, op, RHSSym, resultTy);
1082 if (op >= BO_PtrMemD && op <= BO_PtrMemI) {
1084 if (PTMSV->isNullMemberPointer())
1087 auto getFieldLValue = [&](
const auto *FD) ->
SVal {
1090 for (
const auto &I : *PTMSV)
1091 Result = StateMgr.getStoreManager().evalDerivedToBase(
1092 Result, I->getType(), I->isVirtual());
1094 return state->getLValue(FD, Result);
1097 if (
const auto *FD = PTMSV->getDeclAs<
FieldDecl>()) {
1098 return getFieldLValue(FD);
1101 return getFieldLValue(FD);
1109 "arguments to comparison ops must be of the same type");
1122 if (std::optional<nonloc::ConcreteInt> rhsInt =
1124 if (std::optional<loc::ConcreteInt> lhsInt =
1126 const llvm::APSInt &leftI = lhsInt->getValue();
1127 assert(leftI.isUnsigned());
1128 llvm::APSInt rightI(rhsInt->getValue(),
true);
1132 rightI = rightI.extOrTrunc(leftI.getBitWidth());
1135 llvm::APSInt Multiplicand(rightI.getBitWidth(),
true);
1137 Multiplicand = getContext().getTypeSizeInChars(pointeeType).getQuantity();
1138 rightI *= Multiplicand;
1143 rightI = leftI + rightI;
1146 rightI = leftI - rightI;
1149 llvm_unreachable(
"Invalid pointer arithmetic operation");
1164 if (
const ElementRegion *elemReg = dyn_cast<ElementRegion>(region)) {
1165 assert(op == BO_Add || op == BO_Sub);
1166 index = evalBinOpNN(state, op, elemReg->getIndex(), rhs,
1167 getArrayIndexType());
1168 superR = cast<SubRegion>(elemReg->getSuperRegion());
1169 elementType = elemReg->getElementType();
1171 else if (isa<SubRegion>(region)) {
1172 assert(op == BO_Add || op == BO_Sub);
1173 index = (op == BO_Add) ? rhs : evalMinus(rhs);
1174 superR = cast<SubRegion>(region);
1187 elementType = getContext().CharTy;
1189 if (std::optional<NonLoc> indexV = index.getAs<
NonLoc>()) {
1191 superR, getContext()));
1197const llvm::APSInt *SimpleSValBuilder::getConstValue(
ProgramStateRef state,
1203 return state->getConstraintManager().getSymVal(state, Sym);
1208const llvm::APSInt *SimpleSValBuilder::getConcreteValue(
SVal V) {
1210 return &
X->getValue();
1213 return &
X->getValue();
1218const llvm::APSInt *SimpleSValBuilder::getKnownValue(
ProgramStateRef state,
1220 return getConstValue(state, simplifySVal(state,
V));
1223const llvm::APSInt *SimpleSValBuilder::getMinValue(
ProgramStateRef state,
1225 V = simplifySVal(state,
V);
1231 return state->getConstraintManager().getSymMinVal(state, Sym);
1236const llvm::APSInt *SimpleSValBuilder::getMaxValue(
ProgramStateRef state,
1238 V = simplifySVal(state,
V);
1244 return state->getConstraintManager().getSymMaxVal(state, Sym);
1250 SVal SimplifiedVal = simplifySValOnce(State, Val);
1251 while (SimplifiedVal != Val) {
1252 Val = SimplifiedVal;
1253 SimplifiedVal = simplifySValOnce(State, Val);
1255 return SimplifiedVal;
1259 return simplifyUntilFixpoint(State,
V);
1275 llvm::DenseMap<SymbolRef, SVal> Cached;
1293 const llvm::APSInt *
Const =
1294 State->getConstraintManager().getSymVal(State, Sym);
1302 const SVal Ret = getConst(Sym);
1310 : State(State), SVB(State->getStateManager().getSValBuilder()) {}
1314 if (
const llvm::APSInt *I =
1315 State->getConstraintManager().getSymVal(State, S))
1322 auto I = Cached.find(S);
1323 if (I != Cached.end())
1326 SVal LHS = getConstOrVisit(S->getLHS());
1327 if (isUnchanged(S->getLHS(), LHS))
1350 S, SVB.
evalBinOp(State, S->getOpcode(), LHS, RHS, S->getType()));
1354 auto I = Cached.find(S);
1355 if (I != Cached.end())
1358 SVal RHS = getConstOrVisit(S->getRHS());
1359 if (isUnchanged(S->getRHS(), RHS))
1364 S, SVB.
evalBinOp(State, S->getOpcode(), LHS, RHS, S->getType()));
1368 auto I = Cached.find(S);
1369 if (I != Cached.end())
1380 SVal LHS = getConstOrVisit(S->getLHS());
1381 SVal RHS = getConstOrVisit(S->getRHS());
1383 if (isUnchanged(S->getLHS(), LHS) && isUnchanged(S->getRHS(), RHS))
1387 S, SVB.
evalBinOp(State, S->getOpcode(), LHS, RHS, S->getType()));
1391 auto I = Cached.find(S);
1392 if (I != Cached.end())
1394 const SymExpr *OpSym = S->getOperand();
1395 SVal OpVal = getConstOrVisit(OpSym);
1396 if (isUnchanged(OpSym, OpVal))
1403 auto I = Cached.find(S);
1404 if (I != Cached.end())
1406 SVal Op = getConstOrVisit(S->getOperand());
1407 if (isUnchanged(S->getOperand(), Op))
1411 S, SVB.
evalUnaryOp(State, S->getOpcode(), Op, S->getType()));
1421 return Visit(
V.getSymbol());
1427 SVal SimplifiedV = 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 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 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 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)
The JSON file list parser is used to communicate input to InstallAPI.
const FunctionProtoType * T