Home
last modified time | relevance | path

Searched refs:APSInt (Results 1 – 25 of 176) sorted by relevance

12345678

/freebsd-12-stable/contrib/llvm-project/llvm/include/llvm/ADT/
DAPSInt.h22 class LLVM_NODISCARD APSInt : public APInt {
27 explicit APSInt() : IsUnsigned(false) {} in APSInt() function
30 explicit APSInt(uint32_t BitWidth, bool isUnsigned = true)
33 explicit APSInt(APInt I, bool isUnsigned = true)
43 explicit APSInt(StringRef Str);
63 APSInt &operator=(APInt RHS) {
69 APSInt &operator=(uint64_t RHS) {
93 APSInt trunc(uint32_t width) const { in trunc()
94 return APSInt(APInt::trunc(width), IsUnsigned); in trunc()
97 APSInt extend(uint32_t width) const { in extend()
[all …]
DAPFixedPoint.h114 APSInt getValue() const { return APSInt(Val, !Sema.isSigned()); } in getValue()
156 APSInt getIntPart() const { in getIntPart()
168 APSInt convertToInt(unsigned DstWidth, bool DstSign,
210 static APFixedPoint getFromIntValue(const APSInt &Value,
226 APSInt Val;
/freebsd-12-stable/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/
DRangedConstraintManager.h31 Range(const llvm::APSInt &From, const llvm::APSInt &To) : Impl(&From, &To) { in Range()
35 Range(const llvm::APSInt &Point) : Range(Point, Point) {} in Range()
37 bool Includes(const llvm::APSInt &Point) const { in Includes()
40 const llvm::APSInt &From() const { return *Impl.first; } in From()
41 const llvm::APSInt &To() const { return *Impl.second; } in To()
42 const llvm::APSInt *getConcreteValue() const { in getConcreteValue()
60 std::pair<const llvm::APSInt *, const llvm::APSInt *> Impl;
141 RangeSet add(RangeSet Original, const llvm::APSInt &Point);
148 RangeSet getRangeSet(const llvm::APSInt &From, const llvm::APSInt &To) { in getRangeSet()
151 RangeSet getRangeSet(const llvm::APSInt &Origin) { in getRangeSet()
[all …]
DBasicValueFactory.h110 llvm::FoldingSet<llvm::FoldingSetNodeWrapper<llvm::APSInt>>;
127 const llvm::APSInt& getValue(uint64_t X, unsigned BitWidth, bool isUnsigned);
138 const llvm::APSInt& getValue(const llvm::APSInt& X);
139 const llvm::APSInt& getValue(const llvm::APInt& X, bool isUnsigned);
140 const llvm::APSInt& getValue(uint64_t X, QualType T);
157 const llvm::APSInt &Convert(const llvm::APSInt& To, in Convert()
158 const llvm::APSInt& From) { in Convert()
166 const llvm::APSInt &Convert(QualType T, const llvm::APSInt &From) { in Convert()
171 const llvm::APSInt &Convert(APSIntType TargetType, const llvm::APSInt &From) { in Convert()
178 const llvm::APSInt &getIntValue(uint64_t X, bool isUnsigned) { in getIntValue()
[all …]
DAPSIntType.h27 /* implicit */ APSIntType(const llvm::APSInt &Value) in APSIntType()
37 void apply(llvm::APSInt &Value) const { in apply()
48 llvm::APSInt convert(const llvm::APSInt &Value) const LLVM_READONLY { in convert()
49 llvm::APSInt Result(Value, Value.isUnsigned()); in convert()
55 llvm::APSInt getZeroValue() const LLVM_READONLY { in getZeroValue()
56 return llvm::APSInt(BitWidth, IsUnsigned); in getZeroValue()
60 llvm::APSInt getMinValue() const LLVM_READONLY { in getMinValue()
61 return llvm::APSInt::getMinValue(BitWidth, IsUnsigned); in getMinValue()
65 llvm::APSInt getMaxValue() const LLVM_READONLY { in getMaxValue()
66 return llvm::APSInt::getMaxValue(BitWidth, IsUnsigned); in getMaxValue()
[all …]
DConstraintManager.h27 class APSInt; variable
118 const llvm::APSInt &From,
119 const llvm::APSInt &To,
124 const llvm::APSInt &From, in assumeInclusiveRangeDual()
125 const llvm::APSInt &To) { in assumeInclusiveRangeDual()
151 virtual const llvm::APSInt* getSymVal(ProgramStateRef state, in getSymVal()
DSimpleConstraintManager.h43 const llvm::APSInt &From,
44 const llvm::APSInt &To,
63 const llvm::APSInt &From,
64 const llvm::APSInt &To,
DSMTConv.h274 Exp, Solver->mkBitvector(llvm::APSInt("1"), ToBitWidth), in fromCast()
275 Solver->mkBitvector(llvm::APSInt("0"), ToBitWidth)); in fromCast()
313 static inline llvm::APSInt castAPSInt(llvm::SMTSolverRef &Solver, in castAPSInt()
314 const llvm::APSInt &V, QualType ToTy, in castAPSInt()
392 llvm::APSInt NewRInt; in getSymBinExpr()
400 llvm::APSInt NewLInt; in getSymBinExpr()
498 Solver->mkBitvector(llvm::APSInt("0"), Ctx.getTypeSize(Ty)), in getZeroExpr()
509 const llvm::APSInt &From, const llvm::APSInt &To, bool InRange) { in getRangeExpr()
512 llvm::APSInt NewFromInt; in getRangeExpr()
527 llvm::APSInt NewToInt; in getRangeExpr()
[all …]
DSMTConstraintManager.h64 const llvm::APSInt &From, in REGISTER_TRAIT_WITH_PROGRAMSTATE()
65 const llvm::APSInt &To, in REGISTER_TRAIT_WITH_PROGRAMSTATE()
110 const llvm::APSInt *getSymVal(ProgramStateRef State, in REGISTER_TRAIT_WITH_PROGRAMSTATE()
118 llvm::APSInt Value(Ctx.getTypeSize(Ty), in REGISTER_TRAIT_WITH_PROGRAMSTATE()
163 const llvm::APSInt *Value; in REGISTER_TRAIT_WITH_PROGRAMSTATE()
170 const llvm::APSInt *LHS, *RHS; in REGISTER_TRAIT_WITH_PROGRAMSTATE()
188 llvm::APSInt ConvertedLHS, ConvertedRHS; in REGISTER_TRAIT_WITH_PROGRAMSTATE()
192 SMTConv::doIntTypeConversion<llvm::APSInt, &SMTConv::castAPSInt>( in REGISTER_TRAIT_WITH_PROGRAMSTATE()
DSymbolManager.h344 static unsigned computeOperandComplexity(const llvm::APSInt &Value) { in computeOperandComplexity()
348 static const llvm::APSInt *getPointer(const llvm::APSInt &Value) { in getPointer()
354 static void dumpToStreamImpl(raw_ostream &os, const llvm::APSInt &Value);
406 using SymIntExpr = BinarySymExprImpl<const SymExpr *, const llvm::APSInt &,
410 using IntSymExpr = BinarySymExprImpl<const llvm::APSInt &, const SymExpr *,
475 const llvm::APSInt& rhs, QualType t);
478 const llvm::APSInt& rhs, QualType t) { in getSymIntExpr()
482 const IntSymExpr *getIntSymExpr(const llvm::APSInt& lhs,
/freebsd-12-stable/contrib/llvm-project/llvm/lib/Support/
DAPFixedPoint.cpp21 APSInt NewVal = Val; in convert()
65 APSInt ThisVal = getValue(); in compare()
66 APSInt OtherVal = Other.getValue(); in compare()
117 auto Val = APSInt::getMaxValue(Sema.getWidth(), IsUnsigned); in getMax()
124 auto Val = APSInt::getMinValue(Sema.getWidth(), !Sema.isSigned()); in getMin()
138 APSInt MaxInt = APFixedPoint::getMax(*this).getValue(); in fitsInFloatSemantics()
145 APSInt MinInt = APFixedPoint::getMin(*this).getValue(); in fitsInFloatSemantics()
181 APSInt ThisVal = ConvertedThis.getValue(); in add()
182 APSInt OtherVal = ConvertedOther.getValue(); in add()
185 APSInt Result; in add()
[all …]
DAPSInt.cpp21 APSInt::APSInt(StringRef Str) { in APSInt() function in APSInt
31 *this = APSInt(Tmp, /*isUnsigned=*/false); in APSInt()
37 *this = APSInt(Tmp, /*isUnsigned=*/true); in APSInt()
40 void APSInt::Profile(FoldingSetNodeID& ID) const { in Profile()
/freebsd-12-stable/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/
DRangeConstraintManager.cpp125 RangeSet RangeSet::Factory::add(RangeSet Original, const llvm::APSInt &Point) { in add()
165 const llvm::APSInt &RangeSet::getMinValue() const { in getMinValue()
170 const llvm::APSInt &RangeSet::getMaxValue() const { in getMaxValue()
175 bool RangeSet::containsImpl(llvm::APSInt &Point) const { in containsImpl()
187 bool RangeSet::pin(llvm::APSInt &Point) const { in pin()
196 bool RangeSet::pin(llvm::APSInt &Lower, llvm::APSInt &Upper) const { in pin()
277 RangeSet RangeSet::Factory::intersect(RangeSet What, llvm::APSInt Lower, in intersect()
278 llvm::APSInt Upper) { in intersect()
368 const llvm::APSInt &IntersectionStart = Second->From(); in intersect()
412 RangeSet RangeSet::Factory::intersect(RangeSet LHS, llvm::APSInt Point) { in intersect()
[all …]
DRangedConstraintManager.cpp63 const llvm::APSInt &Zero = getBasicVals().getValue(0, DiffTy); in assumeSym()
80 const llvm::APSInt &Zero = getBasicVals().getValue(0, ExprType); in assumeSym()
96 ProgramStateRef State, SymbolRef Sym, const llvm::APSInt &From, in assumeSymInclusiveRange()
97 const llvm::APSInt &To, bool InRange) { in assumeSymInclusiveRange()
105 llvm::APSInt Adjustment = WraparoundType.getZeroValue(); in assumeSymInclusiveRange()
111 llvm::APSInt ConvertedFrom = ComparisonType.convert(From); in assumeSymInclusiveRange()
112 llvm::APSInt ConvertedTo = ComparisonType.convert(To); in assumeSymInclusiveRange()
139 const llvm::APSInt &Zero = BVF.getValue(0, T); in assumeSymUnsupported()
149 const llvm::APSInt &Int) { in assumeSymRel()
175 llvm::APSInt Adjustment = WraparoundType.getZeroValue(); in assumeSymRel()
[all …]
DSimpleSValBuilder.cpp42 const llvm::APSInt *getKnownValue(ProgramStateRef state, SVal V) override;
49 const llvm::APSInt &RHS, QualType resultTy);
87 const llvm::APSInt &RHS, in MakeSymIntVal()
140 const llvm::APSInt &Result = BasicVals.Convert(resultTy, RHS); in MakeSymIntVal()
154 const llvm::APSInt *ConvertedRHS = &RHS; in MakeSymIntVal()
182 llvm::APSInt Bound, ProgramStateRef State) { in isInRelation()
208 llvm::APSInt Max = AT.getMaxValue() / AT.getValue(4), Min = -Max; in isWithinConstantOverflowBounds()
214 static bool isWithinConstantOverflowBounds(llvm::APSInt I) { in isWithinConstantOverflowBounds()
219 llvm::APSInt Max = AT.getMaxValue() / AT.getValue(4), Min = -Max; in isWithinConstantOverflowBounds()
223 static std::pair<SymbolRef, llvm::APSInt>
[all …]
DBasicValueFactory.cpp84 I.getValue().~APSInt(); in ~BasicValueFactory()
90 const llvm::APSInt& BasicValueFactory::getValue(const llvm::APSInt& X) { in getValue()
94 using FoldNodeTy = llvm::FoldingSetNodeWrapper<llvm::APSInt>; in getValue()
108 const llvm::APSInt& BasicValueFactory::getValue(const llvm::APInt& X, in getValue()
110 llvm::APSInt V(X, isUnsigned); in getValue()
114 const llvm::APSInt& BasicValueFactory::getValue(uint64_t X, unsigned BitWidth, in getValue()
116 llvm::APSInt V(BitWidth, isUnsigned); in getValue()
121 const llvm::APSInt& BasicValueFactory::getValue(uint64_t X, QualType T) { in getValue()
249 const llvm::APSInt*
251 const llvm::APSInt& V1, const llvm::APSInt& V2) { in evalAPSInt()
DSimpleConstraintManager.cpp95 ProgramStateRef State, NonLoc Value, const llvm::APSInt &From, in assumeInclusiveRange()
96 const llvm::APSInt &To, bool InRange) { in assumeInclusiveRange()
122 const llvm::APSInt &IntVal = Value.castAs<nonloc::ConcreteInt>().getValue(); in assumeInclusiveRange()
/freebsd-12-stable/contrib/llvm-project/llvm/lib/DebugInfo/CodeView/
DRecordSerialization.cpp36 Error llvm::codeview::consume(BinaryStreamReader &Reader, APSInt &Num) { in consume()
44 Num = APSInt(APInt(/*numBits=*/16, Short, /*isSigned=*/false), in consume()
54 Num = APSInt(APInt(8, N, true), false); in consume()
61 Num = APSInt(APInt(16, N, true), false); in consume()
68 Num = APSInt(APInt(16, N, false), true); in consume()
75 Num = APSInt(APInt(32, N, true), false); in consume()
82 Num = APSInt(APInt(32, N, FalseVal), true); in consume()
89 Num = APSInt(APInt(64, N, true), false); in consume()
96 Num = APSInt(APInt(64, N, false), true); in consume()
104 Error llvm::codeview::consume(StringRef &Data, APSInt &Num) { in consume()
[all …]
/freebsd-12-stable/contrib/llvm-project/clang/include/clang/AST/
DAPValue.h124 typedef llvm::APSInt APSInt;
261 APSInt Real, Imag;
301 typedef llvm::AlignedCharArrayUnion<void *, APSInt, APFloat, ComplexAPSInt,
310 explicit APValue(APSInt I) : Kind(None) {
322 APValue(APSInt R, APSInt I) : Kind(None) {
415 APSInt &getInt() {
417 return *(APSInt *)(char *)&Data;
419 const APSInt &getInt() const {
426 bool toIntegralConstant(APSInt &Result, QualType SrcTy,
445 APSInt &getComplexIntReal() {
[all …]
/freebsd-12-stable/contrib/llvm-project/clang/lib/AST/Interp/
DIntegral.h28 using APSInt = llvm::APSInt; variable
80 explicit Integral(const APSInt &V)
106 APSInt toAPSInt() const {
107 return APSInt(APInt(Bits, static_cast<uint64_t>(V), Signed), !Signed);
109 APSInt toAPSInt(unsigned NumBits) const {
111 return APSInt(toAPSInt().sextOrTrunc(NumBits), !Signed);
113 return APSInt(toAPSInt().zextOrTrunc(NumBits), !Signed);
DInterpState.cpp22 using APSInt = llvm::APSInt; typedef
51 bool InterpState::reportOverflow(const Expr *E, const llvm::APSInt &Value) { in reportOverflow()
DBoolean.h53 APSInt toAPSInt() const { in toAPSInt()
54 return APSInt(APInt(1, static_cast<uint64_t>(V), false), true); in toAPSInt()
56 APSInt toAPSInt(unsigned NumBits) const { in toAPSInt()
57 return APSInt(toAPSInt().zextOrTrunc(NumBits), true); in toAPSInt()
/freebsd-12-stable/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/
DUndefResultChecker.cpp70 const llvm::APSInt *LHS = SB.getKnownValue(State, C.getSVal(B->getLHS())); in isLeftShiftResultUnrepresentable()
71 const llvm::APSInt *RHS = SB.getKnownValue(State, C.getSVal(B->getRHS())); in isLeftShiftResultUnrepresentable()
138 const llvm::APSInt *I = in checkPostStmt()
158 const llvm::APSInt *LHS = in checkPostStmt()
160 const llvm::APSInt *RHS = in checkPostStmt()
DDebugIteratorModeling.cpp106 }, nonloc::ConcreteInt(BVF.getValue(llvm::APSInt::get(0)))); in analyzerIteratorPosition()
114 }, loc::ConcreteInt(BVF.getValue(llvm::APSInt::get(0)))); in analyzerIteratorContainer()
122 nonloc::ConcreteInt(BVF.getValue(llvm::APSInt::get((P->isValid())))); in analyzerIteratorValidity()
123 }, nonloc::ConcreteInt(BVF.getValue(llvm::APSInt::get(0)))); in analyzerIteratorValidity()
DMallocOverflowSecurityChecker.cpp31 using llvm::APSInt;
37 APSInt maxVal;
39 MallocOverflowCheck(const BinaryOperator *m, const Expr *v, APSInt val) in MallocOverflowCheck()
60 static inline bool EvaluatesToZero(APSInt &Val, BinaryOperatorKind op) { in EvaluatesToZero()
76 APSInt maxVal; in CheckMallocArgument()
178 APSInt denomVal; in CheckAssignmentExpr()

12345678