/external/llvm/unittests/ADT/ |
D | APSIntTest.cpp | 18 APSInt A(32, true); in TEST() 21 APSInt B(128, false); in TEST() 25 APSInt C(B); in TEST() 30 APSInt D(std::move(Wide)); in TEST() 34 A = APSInt(64, true); in TEST() 45 EXPECT_TRUE(APSInt::get(7).isSigned()); in TEST() 46 EXPECT_EQ(64u, APSInt::get(7).getBitWidth()); in TEST() 47 EXPECT_EQ(7u, APSInt::get(7).getZExtValue()); in TEST() 48 EXPECT_EQ(7, APSInt::get(7).getSExtValue()); in TEST() 49 EXPECT_TRUE(APSInt::get(-7).isSigned()); in TEST() [all …]
|
/external/llvm/include/llvm/ADT/ |
D | APSInt.h | 22 class APSInt : public APInt { 27 explicit APSInt() : IsUnsigned(false) {} in APSInt() function 31 explicit APSInt(uint32_t BitWidth, bool isUnsigned = true) 34 explicit APSInt(APInt I, bool isUnsigned = true) 44 explicit APSInt(StringRef Str); 46 APSInt &operator=(APInt RHS) { 52 APSInt &operator=(uint64_t RHS) { 81 APSInt LLVM_ATTRIBUTE_UNUSED_RESULT trunc(uint32_t width) const { in trunc() 82 return APSInt(APInt::trunc(width), IsUnsigned); in trunc() 85 APSInt LLVM_ATTRIBUTE_UNUSED_RESULT extend(uint32_t width) const { in extend() [all …]
|
/external/clang/lib/StaticAnalyzer/Core/ |
D | RangeConstraintManager.cpp | 31 class Range : public std::pair<const llvm::APSInt*, 32 const llvm::APSInt*> { 34 Range(const llvm::APSInt &from, const llvm::APSInt &to) in Range() 35 : std::pair<const llvm::APSInt*, const llvm::APSInt*>(&from, &to) { in Range() 38 bool Includes(const llvm::APSInt &v) const { in Includes() 41 const llvm::APSInt &From() const { in From() 44 const llvm::APSInt &To() const { in To() 47 const llvm::APSInt *getConcreteValue() const { in getConcreteValue() 99 RangeSet(Factory &F, const llvm::APSInt &from, const llvm::APSInt &to) in RangeSet() 109 const llvm::APSInt* getConcreteValue() const { in getConcreteValue() [all …]
|
D | SimpleConstraintManager.h | 43 const llvm::APSInt &From, 44 const llvm::APSInt &To, 50 const llvm::APSInt& Int); 54 const llvm::APSInt &From, 55 const llvm::APSInt &To, 68 const llvm::APSInt& V, 69 const llvm::APSInt& Adjustment) = 0; 72 const llvm::APSInt& V, 73 const llvm::APSInt& Adjustment) = 0; 76 const llvm::APSInt& V, [all …]
|
D | BasicValueFactory.cpp | 66 I->getValue().~APSInt(); in ~BasicValueFactory() 72 const llvm::APSInt& BasicValueFactory::getValue(const llvm::APSInt& X) { in getValue() 75 typedef llvm::FoldingSetNodeWrapper<llvm::APSInt> FoldNodeTy; in getValue() 89 const llvm::APSInt& BasicValueFactory::getValue(const llvm::APInt& X, in getValue() 91 llvm::APSInt V(X, isUnsigned); in getValue() 95 const llvm::APSInt& BasicValueFactory::getValue(uint64_t X, unsigned BitWidth, in getValue() 97 llvm::APSInt V(BitWidth, isUnsigned); in getValue() 102 const llvm::APSInt& BasicValueFactory::getValue(uint64_t X, QualType T) { in getValue() 145 const llvm::APSInt* 147 const llvm::APSInt& V1, const llvm::APSInt& V2) { in evalAPSInt()
|
D | SimpleConstraintManager.cpp | 107 const llvm::APSInt &zero = BVF.getValue(0, T); in assumeAuxForSymbol() 169 const llvm::APSInt &Zero = getBasicVals().getValue(0, DiffTy); in assumeAux() 194 ProgramStateRef State, NonLoc Value, const llvm::APSInt &From, in assumeWithinInclusiveRange() 195 const llvm::APSInt &To, bool InRange) { in assumeWithinInclusiveRange() 221 const llvm::APSInt &IntVal = Value.castAs<nonloc::ConcreteInt>().getValue(); in assumeWithinInclusiveRange() 229 static void computeAdjustment(SymbolRef &Sym, llvm::APSInt &Adjustment) { in computeAdjustment() 249 const llvm::APSInt& Int) { in assumeSymRel() 265 llvm::APSInt Adjustment = WraparoundType.getZeroValue(); in assumeSymRel() 270 llvm::APSInt ConvertedInt = ComparisonType.convert(Int); in assumeSymRel() 304 const llvm::APSInt &From, in assumeSymWithinInclusiveRange() [all …]
|
D | SimpleSValBuilder.cpp | 45 const llvm::APSInt *getKnownValue(ProgramStateRef state, SVal V) override; 48 const llvm::APSInt &RHS, QualType resultTy); 115 llvm::APSInt i = val.castAs<nonloc::ConcreteInt>().getValue(); in evalCastFromNonLoc() 172 llvm::APSInt i = val.castAs<loc::ConcreteInt>().getValue(); in evalCastFromLoc() 211 const llvm::APSInt &RHS, in MakeSymIntVal() 264 const llvm::APSInt &Result = BasicVals.Convert(resultTy, RHS); in MakeSymIntVal() 278 const llvm::APSInt *ConvertedRHS = &RHS; in MakeSymIntVal() 347 llvm::APSInt i = rhs.castAs<nonloc::ConcreteInt>().getValue(); in evalBinOpNN() 364 llvm::APSInt LHSValue = lhs.castAs<nonloc::ConcreteInt>().getValue(); in evalBinOpNN() 367 if (const llvm::APSInt *KnownRHSValue = getKnownValue(state, rhs)) { in evalBinOpNN() [all …]
|
D | SVals.cpp | 21 using llvm::APSInt; 198 const llvm::APSInt* X = in evalBinOp() 227 const llvm::APSInt *X = BasicVals.evalAPSInt(Op, getValue(), R.getValue()); in evalBinOp()
|
/external/clang/include/clang/StaticAnalyzer/Core/PathSensitive/ |
D | BasicValueFactory.h | 63 typedef llvm::FoldingSet<llvm::FoldingSetNodeWrapper<llvm::APSInt> > 79 const llvm::APSInt& getValue(uint64_t X, unsigned BitWidth, bool isUnsigned); 90 const llvm::APSInt& getValue(const llvm::APSInt& X); 91 const llvm::APSInt& getValue(const llvm::APInt& X, bool isUnsigned); 92 const llvm::APSInt& getValue(uint64_t X, QualType T); 103 const llvm::APSInt &Convert(const llvm::APSInt& To, in Convert() 104 const llvm::APSInt& From) { in Convert() 112 const llvm::APSInt &Convert(QualType T, const llvm::APSInt &From) { in Convert() 120 const llvm::APSInt& getIntValue(uint64_t X, bool isUnsigned) { in getIntValue() 125 inline const llvm::APSInt& getMaxValue(const llvm::APSInt &v) { in getMaxValue() [all …]
|
D | APSIntType.h | 28 /* implicit */ APSIntType(const llvm::APSInt &Value) in APSIntType() 38 void apply(llvm::APSInt &Value) const { in apply() 49 llvm::APSInt convert(const llvm::APSInt &Value) const LLVM_READONLY { in convert() 50 llvm::APSInt Result(Value, Value.isUnsigned()); in convert() 56 llvm::APSInt getZeroValue() const LLVM_READONLY { in getZeroValue() 57 return llvm::APSInt(BitWidth, IsUnsigned); in getZeroValue() 61 llvm::APSInt getMinValue() const LLVM_READONLY { in getMinValue() 62 return llvm::APSInt::getMinValue(BitWidth, IsUnsigned); in getMinValue() 66 llvm::APSInt getMaxValue() const LLVM_READONLY { in getMaxValue() 67 return llvm::APSInt::getMaxValue(BitWidth, IsUnsigned); in getMaxValue() [all …]
|
D | ConstraintManager.h | 22 class APSInt; variable 104 const llvm::APSInt &From, 105 const llvm::APSInt &To, 109 ProgramStateRef State, NonLoc Value, const llvm::APSInt &From, in assumeWithinInclusiveRangeDual() 110 const llvm::APSInt &To) { in assumeWithinInclusiveRangeDual() 136 virtual const llvm::APSInt* getSymVal(ProgramStateRef state, in getSymVal()
|
D | SymbolManager.h | 370 const llvm::APSInt& RHS; 374 const llvm::APSInt& rhs, QualType t) in SymIntExpr() 380 const llvm::APSInt &getRHS() const { return RHS; } in getRHS() 383 BinaryOperator::Opcode op, const llvm::APSInt& rhs, in Profile() 404 const llvm::APSInt& LHS; 408 IntSymExpr(const llvm::APSInt& lhs, BinaryOperator::Opcode op, in IntSymExpr() 415 const llvm::APSInt &getLHS() const { return LHS; } in getLHS() 417 static void Profile(llvm::FoldingSetNodeID& ID, const llvm::APSInt& lhs, in Profile() 527 const llvm::APSInt& rhs, QualType t); 530 const llvm::APSInt& rhs, QualType t) { in getSymIntExpr() [all …]
|
D | SValBuilder.h | 109 virtual const llvm::APSInt *getKnownValue(ProgramStateRef state, SVal val) = 0; 244 nonloc::ConcreteInt makeIntVal(const llvm::APSInt& integer) { in makeIntVal() 248 loc::ConcreteInt makeIntLocVal(const llvm::APSInt &integer) { in makeIntLocVal() 277 const llvm::APSInt& rhs, QualType type); 279 NonLoc makeNonLoc(const llvm::APSInt& rhs, BinaryOperator::Opcode op, 312 Loc makeLoc(const llvm::APSInt& integer) { in makeLoc()
|
D | ProgramState.h | 31 class APSInt; variable 75 typedef llvm::ImmutableSet<llvm::APSInt*> IntSetTy; 201 const llvm::APSInt &From, 202 const llvm::APSInt &To, 211 assumeWithinInclusiveRange(DefinedOrUnknownSVal Val, const llvm::APSInt &From, 212 const llvm::APSInt &To) const; 662 const llvm::APSInt &From, in assumeWithinInclusiveRange() 663 const llvm::APSInt &To, in assumeWithinInclusiveRange() 676 const llvm::APSInt &From, in assumeWithinInclusiveRange() 677 const llvm::APSInt &To) const { in assumeWithinInclusiveRange()
|
D | SVals.h | 341 explicit ConcreteInt(const llvm::APSInt& V) : NonLoc(ConcreteIntKind, &V) {} in ConcreteInt() 343 const llvm::APSInt& getValue() const { in getValue() 344 return *static_cast<const llvm::APSInt*>(Data); in getValue() 531 explicit ConcreteInt(const llvm::APSInt& V) : Loc(ConcreteIntKind, &V) {} in ConcreteInt() 533 const llvm::APSInt& getValue() const { in getValue() 534 return *static_cast<const llvm::APSInt*>(Data); in getValue()
|
/external/clang/test/SemaCXX/ |
D | unused.cpp | 8 class APSInt : public APInt { class 11 APSInt &operator=(const APSInt &RHS); 14 APSInt& APSInt::operator=(const APSInt &RHS) { in operator =()
|
/external/clang/include/clang/AST/ |
D | APValue.h | 39 typedef llvm::APSInt APSInt; typedef 72 APSInt Real, Imag; 112 typedef llvm::AlignedCharArrayUnion<void *, APSInt, APFloat, ComplexAPSInt, 121 explicit APValue(APSInt I) : Kind(Uninitialized) { in APValue() 130 APValue(APSInt R, APSInt I) : Kind(Uninitialized) { in APValue() 200 APSInt &getInt() { in getInt() 202 return *(APSInt*)(char*)Data.buffer; in getInt() 204 const APSInt &getInt() const { in getInt() 216 APSInt &getComplexIntReal() { in getComplexIntReal() 220 const APSInt &getComplexIntReal() const { in getComplexIntReal() [all …]
|
/external/llvm/lib/Support/ |
D | APSInt.cpp | 20 APSInt::APSInt(StringRef Str) { in APSInt() function in APSInt 30 *this = APSInt(Tmp, /*IsUnsigned=*/false); in APSInt() 36 *this = APSInt(Tmp, /*IsUnsigned=*/true); in APSInt() 39 void APSInt::Profile(FoldingSetNodeID& ID) const { in Profile()
|
/external/clang/lib/StaticAnalyzer/Checkers/ |
D | MallocOverflowSecurityChecker.cpp | 32 using llvm::APSInt; 38 APSInt maxVal; 40 MallocOverflowCheck(const BinaryOperator *m, const Expr *v, APSInt val) in MallocOverflowCheck() 61 static inline bool EvaluatesToZero(APSInt &Val, BinaryOperatorKind op) { in EvaluatesToZero() 77 APSInt maxVal; in CheckMallocArgument() 138 llvm::APSInt Result; in isIntZeroExpr() 179 APSInt denomVal; in CheckAssignmentExpr()
|
/external/llvm/lib/CodeGen/MIRParser/ |
D | MILexer.h | 127 APSInt IntVal; 136 MIToken &setIntegerValue(APSInt IntVal); 174 const APSInt &integerValue() const { return IntVal; } in integerValue()
|
D | MILexer.cpp | 75 MIToken &MIToken::setIntegerValue(APSInt IntVal) { in setIntegerValue() 272 .setIntegerValue(APSInt(Number)) in maybeLexMachineBasicBlock() 286 Token.reset(Kind, Range.upto(C)).setIntegerValue(APSInt(NumberRange.upto(C))); in maybeLexIndex() 308 .setIntegerValue(APSInt(Number)) in maybeLexIndexAndName() 358 .setIntegerValue(APSInt(NumberRange.upto(C))); in lexVirtualRegister() 390 .setIntegerValue(APSInt(NumberRange.upto(C))); in maybeLexGlobalValue() 446 Token.reset(MIToken::IntegerLiteral, StrVal).setIntegerValue(APSInt(StrVal)); in maybeLexNumericalLiteral()
|
/external/clang/lib/AST/ |
D | ExprConstant.cpp | 52 using llvm::APSInt; 380 OptionalDiagnostic &operator<<(const APSInt &I) { in operator <<() 957 APSInt IntReal, IntImag; 969 APSInt &getComplexIntReal() { return IntReal; } in getComplexIntReal() 970 APSInt &getComplexIntImag() { return IntImag; } in getComplexIntImag() 1183 static bool EvaluateInteger(const Expr *E, APSInt &Result, EvalInfo &Info); 1244 static int64_t getExtValue(const APSInt &Value) { in getExtValue() 1583 QualType DestType, APSInt &Result) { in HandleFloatToIntCast() 1588 Result = APSInt(DestWidth, !DestSigned); in HandleFloatToIntCast() 1608 static APSInt HandleIntToIntCast(EvalInfo &Info, const Expr *E, in HandleIntToIntCast() [all …]
|
/external/clang/lib/Lex/ |
D | PPExpressions.cpp | 37 llvm::APSInt Val; 303 llvm::APSInt Val(NumBits); in EvaluateValue() 537 llvm::APSInt Res(LHS.getBitWidth()); in EvaluateDirectiveSubExpr() 581 Res = llvm::APSInt(LHS.Val.sdiv_ov(RHS.Val, Overflow), false); in EvaluateDirectiveSubExpr() 593 Res = llvm::APSInt(LHS.Val.smul_ov(RHS.Val, Overflow), false); in EvaluateDirectiveSubExpr() 602 Res = llvm::APSInt(LHS.Val.sshl_ov(RHS.Val, Overflow), false); in EvaluateDirectiveSubExpr() 617 Res = llvm::APSInt(LHS.Val.sadd_ov(RHS.Val, Overflow), false); in EvaluateDirectiveSubExpr() 623 Res = llvm::APSInt(LHS.Val.ssub_ov(RHS.Val, Overflow), false); in EvaluateDirectiveSubExpr()
|
/external/llvm/lib/AsmParser/ |
D | LLLexer.h | 43 APSInt APSIntVal; 59 const APSInt &getAPSIntVal() const { return APSIntVal; } in getAPSIntVal()
|
/external/clang/lib/Sema/ |
D | SemaStmt.cpp | 392 llvm::APSInt TempVal; in ActOnCaseStmt() 525 bool operator()(const std::pair<llvm::APSInt, CaseStmt*> &LHS, in operator ()() 526 const llvm::APSInt &RHS) { in operator ()() 529 bool operator()(const std::pair<llvm::APSInt, CaseStmt*> &LHS, in operator ()() 530 const std::pair<llvm::APSInt, CaseStmt*> &RHS) { in operator ()() 533 bool operator()(const llvm::APSInt &LHS, in operator ()() 534 const std::pair<llvm::APSInt, CaseStmt*> &RHS) { in operator ()() 542 static bool CmpCaseVals(const std::pair<llvm::APSInt, CaseStmt*>& lhs, in CmpCaseVals() argument 543 const std::pair<llvm::APSInt, CaseStmt*>& rhs) { in CmpCaseVals() 556 static bool CmpEnumVals(const std::pair<llvm::APSInt, EnumConstantDecl*>& lhs, in CmpEnumVals() argument [all …]
|