Home
last modified time | relevance | path

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

12345678910

/freebsd/contrib/llvm-project/llvm/include/llvm/ADT/
H A DAPSInt.h24 class [[nodiscard]] APSInt : public APInt {
29 explicit APSInt() = default;
32 explicit APSInt(uint32_t BitWidth, bool isUnsigned = true)
35 explicit APSInt(APInt I, bool isUnsigned = true)
45 LLVM_ABI explicit APSInt(StringRef Str);
65 APSInt &operator=(APInt RHS) {
71 APSInt &operator=(uint64_t RHS) {
109 APSInt trunc(uint32_t width) const { in trunc()
110 return APSInt(APInt::trunc(width), IsUnsigned); in trunc()
113 APSInt extend(uint32_t width) const { in extend()
[all …]
H A DAPFixedPoint.h179 APSInt getValue() const { return APSInt(Val, !Sema.isSigned()); }
227 APSInt getIntPart() const {
229 return APSInt(APInt::getZero(getWidth()), Val.isUnsigned());
230 APSInt ExtVal =
242 LLVM_ABI APSInt convertToInt(unsigned DstWidth, bool DstSign,
293 getFromIntValue(const APSInt &Value, const FixedPointSemantics &DstFXSema,
308 APSInt Val;
/freebsd/contrib/llvm-project/clang/include/clang/StaticAnalyzer/Core/PathSensitive/
H A 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()
61 std::pair<const llvm::APSInt *, const llvm::APSInt *> Impl;
142 RangeSet add(RangeSet Original, const llvm::APSInt &Point);
160 RangeSet unite(RangeSet Original, llvm::APSInt Point);
166 RangeSet unite(RangeSet Original, llvm::APSInt From, llvm::APSInt To);
[all …]
H A 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 …]
H A DAPSIntPtr.h20 using APSInt = llvm::APSInt; variable
31 static APSIntPtr unsafeConstructor(const APSInt *Ptr) { in unsafeConstructor()
36 const APSInt *get() const { return Ptr; } in get()
37 /*implicit*/ operator const APSInt &() const { return *get(); }
39 APSInt operator-() const { return -*Ptr; }
40 APSInt operator~() const { return ~*Ptr; }
52 const APSInt &operator*() const { return *Ptr; }
53 const APSInt *operator->() const { return Ptr; }
56 explicit APSIntPtr(const APSInt *Ptr) : Ptr(Ptr) {} in APSIntPtr()
59 const APSInt *Ptr;
H A DBasicValueFactory.h116 llvm::FoldingSet<llvm::FoldingSetNodeWrapper<llvm::APSInt>>;
144 APSIntPtr getValue(const llvm::APSInt &X);
169 APSIntPtr Convert(const llvm::APSInt &To, const llvm::APSInt &From) { in Convert()
177 APSIntPtr Convert(QualType T, const llvm::APSInt &From) { in Convert()
182 APSIntPtr Convert(APSIntType TargetType, const llvm::APSInt &From) { in Convert()
194 APSIntPtr getMaxValue(const llvm::APSInt &v) { in getMaxValue()
198 APSIntPtr getMinValue(const llvm::APSInt &v) { in getMinValue()
210 APSIntPtr Add1(const llvm::APSInt &V) { in Add1()
211 llvm::APSInt X = V; in Add1()
216 APSIntPtr Sub1(const llvm::APSInt &V) { in Sub1()
[all …]
H A DSimpleConstraintManager.h53 const llvm::APSInt &From,
54 const llvm::APSInt &To,
74 const llvm::APSInt &From,
75 const llvm::APSInt &To,
H A DSMTConstraintManager.h69 const llvm::APSInt &From, in REGISTER_TRAIT_WITH_PROGRAMSTATE()
70 const llvm::APSInt &To, in REGISTER_TRAIT_WITH_PROGRAMSTATE()
115 const llvm::APSInt *getSymVal(ProgramStateRef State, in REGISTER_TRAIT_WITH_PROGRAMSTATE()
123 llvm::APSInt Value(Ctx.getTypeSize(Ty), in REGISTER_TRAIT_WITH_PROGRAMSTATE()
168 const llvm::APSInt *Value; in REGISTER_TRAIT_WITH_PROGRAMSTATE()
175 const llvm::APSInt *LHS, *RHS; in REGISTER_TRAIT_WITH_PROGRAMSTATE()
193 llvm::APSInt ConvertedLHS, ConvertedRHS; in REGISTER_TRAIT_WITH_PROGRAMSTATE()
197 SMTConv::doIntTypeConversion<llvm::APSInt, &SMTConv::castAPSInt>( in REGISTER_TRAIT_WITH_PROGRAMSTATE()
H A DSMTConv.h276 Exp, Solver->mkBitvector(llvm::APSInt("1"), ToBitWidth), in fromCast()
277 Solver->mkBitvector(llvm::APSInt("0"), ToBitWidth)); in fromCast()
315 static inline llvm::APSInt castAPSInt(llvm::SMTSolverRef &Solver, in castAPSInt()
316 const llvm::APSInt &V, QualType ToTy, in castAPSInt()
394 llvm::APSInt NewRInt; in getSymBinExpr()
402 llvm::APSInt NewLInt; in getSymBinExpr()
524 Solver->mkBitvector(llvm::APSInt("0"), Ctx.getTypeSize(Ty)), in getZeroExpr()
535 const llvm::APSInt &From, const llvm::APSInt &To, bool InRange) { in getRangeExpr()
538 llvm::APSInt NewFromInt; in getRangeExpr()
553 llvm::APSInt NewToInt; in getRangeExpr()
[all …]
/freebsd/contrib/llvm-project/llvm/lib/Support/
H A DAPFixedPoint.cpp44 APSInt NewVal = Val; in convert()
84 APSInt ThisVal = getValue(); in compare()
85 APSInt OtherVal = Other.getValue(); in compare()
131 auto Val = APSInt::getMaxValue(Sema.getWidth(), IsUnsigned); in getMax()
138 auto Val = APSInt::getMinValue(Sema.getWidth(), !Sema.isSigned()); in getMin()
143 APSInt Val(Sema.getWidth(), !Sema.isSigned()); in getEpsilon()
158 APSInt MaxInt = APFixedPoint::getMax(*this).getValue(); in fitsInFloatSemantics()
165 APSInt MinInt = APFixedPoint::getMin(*this).getValue(); in fitsInFloatSemantics()
202 APSInt ThisVal = ConvertedThis.getValue(); in add()
203 APSInt OtherVal = ConvertedOther.getValue(); in add()
[all …]
H A 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/contrib/llvm-project/clang/lib/StaticAnalyzer/Core/
H A DRangeConstraintManager.cpp134 RangeSet RangeSet::Factory::add(RangeSet Original, const llvm::APSInt &Point) { in add()
150 RangeSet RangeSet::Factory::unite(RangeSet Original, llvm::APSInt Point) { in unite()
154 RangeSet RangeSet::Factory::unite(RangeSet Original, llvm::APSInt From, in unite()
155 llvm::APSInt To) { in unite()
173 using llvm::APSInt; in unite()
181 const APSInt Min = Ty.getMinValue(); in unite()
218 const APSInt One = Ty.getValue(1); in unite()
241 const llvm::APSInt &UnionStart = First->From(); in unite()
347 const llvm::APSInt &RangeSet::getMinValue() const { in getMinValue()
352 const llvm::APSInt &RangeSet::getMaxValue() const { in getMaxValue()
[all …]
H A DRangedConstraintManager.cpp45 const llvm::APSInt &Zero = getBasicVals().getValue(0, SIE->getType()); in assumeSym()
68 const llvm::APSInt &Zero = getBasicVals().getValue(0, DiffTy); in assumeSym()
85 const llvm::APSInt &Zero = getBasicVals().getValue(0, ExprType); in assumeSym()
102 ProgramStateRef State, SymbolRef Sym, const llvm::APSInt &From, in assumeSymInclusiveRange()
103 const llvm::APSInt &To, bool InRange) { in assumeSymInclusiveRange()
111 llvm::APSInt Adjustment = WraparoundType.getZeroValue(); in assumeSymInclusiveRange()
117 llvm::APSInt ConvertedFrom = ComparisonType.convert(From); in assumeSymInclusiveRange()
118 llvm::APSInt ConvertedTo = ComparisonType.convert(To); in assumeSymInclusiveRange()
145 const llvm::APSInt &Zero = BVF.getValue(0, T); in assumeSymUnsupported()
155 const llvm::APSInt &Int) { in assumeSymRel()
[all …]
H A DSimpleSValBuilder.cpp32 static const llvm::APSInt *getConstValue(ProgramStateRef state, SVal V);
36 static const llvm::APSInt *getConcreteValue(SVal V);
82 const llvm::APSInt *getKnownValue(ProgramStateRef state, SVal V) override;
87 const llvm::APSInt *getMinValue(ProgramStateRef state, SVal V) override;
92 const llvm::APSInt *getMaxValue(ProgramStateRef state, SVal V) override;
97 const llvm::APSInt &RHS, QualType resultTy);
109 static bool isNegationValuePreserving(const llvm::APSInt &Value, in isNegationValuePreserving()
130 const llvm::APSInt &RHS, in MakeSymIntVal()
235 llvm::APSInt Bound, ProgramStateRef State) { in isInRelation()
262 llvm::APSInt Max = AT.getMaxValue() / AT.getValue(4), Min = -Max; in isWithinConstantOverflowBounds()
[all …]
H A DBasicValueFactory.cpp84 I.getValue().~APSInt(); in ~BasicValueFactory()
90 APSIntPtr BasicValueFactory::getValue(const llvm::APSInt &X) { in getValue()
94 using FoldNodeTy = llvm::FoldingSetNodeWrapper<llvm::APSInt>; in getValue()
109 llvm::APSInt V(X, isUnsigned); in getValue()
115 llvm::APSInt V(BitWidth, isUnsigned); in getValue()
246 BasicValueFactory::evalAPSInt(BinaryOperator::Opcode Op, const llvm::APSInt &V1, in evalAPSInt()
247 const llvm::APSInt &V2) { in evalAPSInt()
/freebsd/contrib/llvm-project/llvm/lib/DebugInfo/CodeView/
H A DRecordSerialization.cpp15 #include "llvm/ADT/APSInt.h"
36 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(APIn in consume()
[all...]
/freebsd/contrib/llvm-project/clang/include/clang/AST/
H A DAPValue.h124 typedef llvm::APSInt APSInt;
262 APSInt Real, Imag;
310 typedef llvm::AlignedCharArrayUnion<void *, APSInt, APFloat, ComplexAPSInt,
327 explicit APValue(APSInt I) : Kind(None), AllowConstexprUnknown(false) {
346 APValue(APSInt R, APSInt I) : Kind(None), AllowConstexprUnknown(false) {
489 APSInt &getInt() {
491 return *(APSInt *)(char *)&Data;
493 const APSInt &getInt() const {
500 bool toIntegralConstant(APSInt &Result, QualType SrcTy,
519 APSInt &getComplexIntReal() {
[all …]
/freebsd/contrib/llvm-project/clang/lib/AST/ByteCode/
H A DInterpBuiltin.cpp49 static APSInt popToAPSInt(InterpStack &Stk, PrimType T) { in popToAPSInt()
54 static void pushInteger(InterpState &S, const APSInt &Val, QualType QT) { in pushInteger()
89 pushInteger(S, APSInt(Val, !std::is_signed_v<T>), QT); in pushInteger()
90 else if constexpr (std::is_same_v<T, APSInt>) in pushInteger()
94 APSInt(APInt(sizeof(T) * 8, static_cast<uint64_t>(Val), in pushInteger()
101 const APSInt &Value) { in assignInteger()
556 APSInt FPClassArg = popToAPSInt(S.Stk, FPClassArgT); in interp__builtin_isfpclass()
574 APSInt Values[5]; in interp__builtin_fpclassify()
626 APSInt Val = popToAPSInt(S.Stk, ArgT); in interp__builtin_abs()
628 APSInt(APInt::getSignedMinValue(Val.getBitWidth()), /*IsUnsigned=*/false)) in interp__builtin_abs()
[all …]
H A DIntegralAP.h30 using APSInt = llvm::APSInt; variable
143 APSInt toAPSInt(unsigned Bits = 0) const {
149 return APSInt(getValue().sext(Bits), !Signed);
151 return APSInt(getValue().zext(Bits), !Signed);
235 APSInt One(APInt(A.bitWidth(), 1ull, Signed), !Signed); in increment()
240 APSInt One(APInt(A.bitWidth(), 1ull, Signed), !Signed); in decrement()
359 const APSInt &LHS = A.toAPSInt(); in CheckAddSubMulUB()
360 const APSInt &RHS = B.toAPSInt(); in CheckAddSubMulUB()
361 APSInt Value = Op<APSInt>{}(LHS.extend(BitWidth), RHS.extend(BitWidth)); in CheckAddSubMulUB()
362 APSInt Result = Value.trunc(LHS.getBitWidth()); in CheckAddSubMulUB()
H A DBoolean.h49 APSInt toAPSInt() const { in toAPSInt()
50 return APSInt(APInt(1, static_cast<uint64_t>(V), false), true); in toAPSInt()
52 APSInt toAPSInt(unsigned NumBits) const { in toAPSInt()
53 return APSInt(toAPSInt().zextOrTrunc(NumBits), true); in toAPSInt()
H A DFixedPoint.h20 using APSInt = llvm::APSInt; variable
40 static FixedPoint from(const APSInt &I, llvm::FixedPointSemantics Sem, in from()
53 APSInt toAPSInt(unsigned BitWidth = 0) const { return V.getValue(); }
77 llvm::APSInt toInt(unsigned BitWidth, bool Signed, bool *Overflow) const { in toInt()
H A DIntegral.h30 using APSInt = llvm::APSInt; variable
93 explicit Integral(const APSInt &V)
126 APSInt toAPSInt() const {
127 return APSInt(APInt(Bits, static_cast<uint64_t>(V), Signed), !Signed);
129 APSInt toAPSInt(unsigned BitWidth) const {
130 return APSInt(toAPInt(BitWidth), !Signed);
H A DFloating.h28 using APSInt = llvm::APSInt; variable
70 APFloat::opStatus convertToInteger(APSInt &Result) const { in convertToInteger()
85 APSInt toAPSInt(unsigned NumBits = 0) const {
86 return APSInt(getValue().bitcastToAPInt());
171 static APFloat::opStatus fromIntegral(APSInt Val, in fromIntegral()
/freebsd/contrib/llvm-project/clang/lib/StaticAnalyzer/Checkers/
H A DDebugIteratorModeling.cpp100 }, nonloc::ConcreteInt(BVF.getValue(llvm::APSInt::get(0)))); in analyzerIteratorPosition()
108 }, loc::ConcreteInt(BVF.getValue(llvm::APSInt::get(0)))); in analyzerIteratorContainer()
116 nonloc::ConcreteInt(BVF.getValue(llvm::APSInt::get((P->isValid())))); in analyzerIteratorValidity()
117 }, nonloc::ConcreteInt(BVF.getValue(llvm::APSInt::get(0)))); in analyzerIteratorValidity()
/freebsd/contrib/llvm-project/lldb/include/lldb/Utility/
H A DScalar.h36 static llvm::APSInt MakeAPSInt(T v) { in MakeAPSInt()
39 return llvm::APSInt( in MakeAPSInt()
72 Scalar(llvm::APSInt v) in Scalar()
184 llvm::APSInt GetAPSInt() const { return m_integer; } in GetAPSInt()
200 llvm::APSInt m_integer;

12345678910