Lines Matching refs:APSInt
56 using llvm::APSInt;
419 const APSInt &N);
421 void adjustIndex(EvalInfo &Info, const Expr *E, APSInt N) { in adjustIndex()
590 OptionalDiagnostic &operator<<(const APSInt &I) { in operator <<()
1214 const APSInt &N) { in diagnosePointerArithmetic()
1307 APSInt IntReal, IntImag;
1319 APSInt &getComplexIntReal() { return IntReal; } in getComplexIntReal()
1320 APSInt &getComplexIntImag() { return IntImag; } in getComplexIntImag()
1472 const APSInt &Index, CharUnits ElementSize) { in adjustOffsetAndIndex()
1607 static bool EvaluateInteger(const Expr *E, APSInt &Result, EvalInfo &Info);
1631 static void negateAsSigned(APSInt &Int) { in negateAsSigned()
2076 QualType DestType, APSInt &Result) { in HandleFloatToIntCast()
2081 Result = APSInt(DestWidth, !DestSigned); in HandleFloatToIntCast()
2101 static APSInt HandleIntToIntCast(EvalInfo &Info, const Expr *E, in HandleIntToIntCast()
2103 const APSInt &Value) { in HandleIntToIntCast()
2107 APSInt Result = Value.extOrTrunc(DestWidth); in HandleIntToIntCast()
2115 QualType SrcType, const APSInt &Value, in HandleIntToFloatCast()
2138 APSInt &Int = Value.getInt(); in truncateBitfieldValue()
2198 const APSInt &LHS, const APSInt &RHS, in CheckedIntArithmetic()
2200 APSInt &Result) { in CheckedIntArithmetic()
2206 APSInt Value(Op(LHS.extend(BitWidth), RHS.extend(BitWidth)), false); in CheckedIntArithmetic()
2220 static bool handleIntIntBinOp(EvalInfo &Info, const Expr *E, const APSInt &LHS, in handleIntIntBinOp()
2221 BinaryOperatorKind Opcode, APSInt RHS, in handleIntIntBinOp()
2222 APSInt &Result) { in handleIntIntBinOp()
2229 std::multiplies<APSInt>(), Result); in handleIntIntBinOp()
2232 std::plus<APSInt>(), Result); in handleIntIntBinOp()
2235 std::minus<APSInt>(), Result); in handleIntIntBinOp()
2256 RHS &= APSInt(llvm::APInt(RHS.getBitWidth(), in handleIntIntBinOp()
2287 RHS &= APSInt(llvm::APInt(RHS.getBitWidth(), in handleIntIntBinOp()
2491 APSInt Adjustment) { in HandleLValueArrayAdjustment()
2504 APSInt::get(Adjustment)); in HandleLValueArrayAdjustment()
2644 static APSInt extractStringLiteralCharacter(EvalInfo &Info, const Expr *Lit, in extractStringLiteralCharacter()
2651 return APSInt::getUnsigned(Str.c_str()[Index]); in extractStringLiteralCharacter()
2663 APSInt Value(S->getCharByteWidth() * Info.Ctx.getCharWidth(), in extractStringLiteralCharacter()
2683 APSInt Value(S->getCharByteWidth() * Info.Ctx.getCharWidth(), in expandStringLiteral()
2983 bool found(APSInt &Value, QualType SubobjType) { in found()
3036 bool found(APSInt &Value, QualType SubobjType) { in found()
3438 bool found(APSInt &Value, QualType SubobjType) { in found()
3450 APSInt LHS = in found()
3489 APSInt Offset = RHS.getInt(); in foundPointer()
3575 bool found(APSInt &Value, QualType SubobjType) { in found()
3603 APSInt ActualValue(Value, /*IsUnsigned*/true); in found()
3611 APSInt ActualValue(Value.sext(BitWidth + 1), /*IsUnsigned*/false); in found()
3962 APSInt Value; in EvaluateSwitch()
3988 APSInt LHS = CS->getLHS()->EvaluateKnownConstInt(Info.Ctx); in EvaluateSwitch()
3989 APSInt RHS = CS->getRHS() ? CS->getRHS()->EvaluateKnownConstInt(Info.Ctx) in EvaluateSwitch()
5557 APSInt Index; in VisitArraySubscriptExpr()
5662 auto EvaluateAsSizeT = [&](const Expr *E, APSInt &Into) { in getBytesReturnedByAllocSizeCall()
5673 APSInt SizeOfElem; in getBytesReturnedByAllocSizeCall()
5682 APSInt NumberOfElems; in getBytesReturnedByAllocSizeCall()
5859 llvm::APSInt Offset; in VisitBinaryOperator()
6075 APSInt Alignment; in VisitBuiltinCallExpr()
6081 APSInt Offset; in VisitBuiltinCallExpr()
6147 APSInt Desired; in VisitBuiltinCallExpr()
6155 APSInt N; in VisitBuiltinCallExpr()
6190 if (!APSInt::isSameValue(HandleIntToIntCast(Info, E, CharTy, in VisitBuiltinCallExpr()
6266 APSInt N; in VisitBuiltinCallExpr()
6826 Result.getStructField(1) = APValue(APSInt(ArrayType->getSize())); in VisitCXXStdInitializerListExpr()
6990 APSInt IntResult; in VisitCastExpr()
7037 Elts.push_back(APValue(APSInt(Elt, EltTy->isSignedIntegerType()))); in VisitCastExpr()
7075 llvm::APSInt sInt(32); in VisitInitListExpr()
7351 bool Success(const llvm::APSInt &SI, const Expr *E, APValue &Result) { in Success()
7361 bool Success(const llvm::APSInt &SI, const Expr *E) { in Success()
7370 Result = APValue(APSInt(I)); in Success()
7493 bool Success(const llvm::APSInt &SI, const Expr *E, APValue &Result) { in Success()
7502 bool Success(const llvm::APSInt &SI, const Expr *E) { in Success()
7510 Result = APValue(APSInt(I)); in Success()
7567 static bool EvaluateInteger(const Expr *E, APSInt &Result, EvalInfo &Info) { in EvaluateInteger()
7597 llvm::APSInt Val = ECD->getInitVal(); in CheckReferencedDecl()
8208 APSInt Val; in VisitBuiltinCallExpr()
8221 APSInt Val; in VisitBuiltinCallExpr()
8232 APSInt Val; in VisitBuiltinCallExpr()
8260 APSInt Val; in VisitBuiltinCallExpr()
8281 APSInt Val; in VisitBuiltinCallExpr()
8336 APSInt Val; in VisitBuiltinCallExpr()
8346 APSInt Val; in VisitBuiltinCallExpr()
8439 APSInt N; in VisitBuiltinCallExpr()
8503 APSInt Char1InMem = Char1.getInt().extOrTrunc(CharTy1Width); in VisitBuiltinCallExpr()
8504 APSInt Char2InMem = Char2.getInt().extOrTrunc(CharTy1Width); in VisitBuiltinCallExpr()
8560 APSInt SizeVal; in VisitBuiltinCallExpr()
8626 APSInt LHS, RHS; in VisitBuiltinCallExpr()
8634 APSInt Result; in VisitBuiltinCallExpr()
8657 LHS = APSInt(IsSigned ? LHS.sextOrSelf(MaxBits) : LHS.zextOrSelf(MaxBits), in VisitBuiltinCallExpr()
8659 RHS = APSInt(IsSigned ? RHS.sextOrSelf(MaxBits) : RHS.zextOrSelf(MaxBits), in VisitBuiltinCallExpr()
8661 Result = APSInt(MaxBits, !IsSigned); in VisitBuiltinCallExpr()
8710 APSInt Temp = Result.extOrTrunc(Info.Ctx.getTypeSize(ResultType)); in VisitBuiltinCallExpr()
8713 if (!APSInt::isSameValue(Temp, Result)) in VisitBuiltinCallExpr()
8827 bool Success(const APSInt &Value, const Expr *E, APValue &Result) { in Success()
8911 static void addOrSubLValueAsInteger(APValue &LVal, const APSInt &Index, in addOrSubLValueAsInteger()
9010 APSInt Value(Info.Ctx.getIntWidth(E->getType()), in VisitBinOp()
9113 APSInt LHS, RHS; in EvaluateComparisonBinaryOperator()
9520 APSInt LHS(llvm::APInt(65, (int64_t)LHSOffset.getQuantity(), true), false); in VisitBinaryOperator()
9521 APSInt RHS(llvm::APInt(65, (int64_t)RHSOffset.getQuantity(), true), false); in VisitBinaryOperator()
9522 APSInt ElemSize(llvm::APInt(65, (int64_t)ElementSize.getQuantity(), true), in VisitBinaryOperator()
9524 APSInt TrueResult = (LHS - RHS) / ElemSize; in VisitBinaryOperator()
9525 APSInt Result = TrueResult.trunc(Info.Ctx.getIntWidth(E->getType())); in VisitBinaryOperator()
9602 APSInt IdxResult; in VisitOffsetOfExpr()
9677 const APSInt &Value = Result.getInt(); in VisitUnaryOperator()
9824 APSInt AsInt; in VisitCastExpr()
9845 APSInt Value; in VisitCastExpr()
9901 const APSInt &Value = Result.getInt(); in VisitUnaryOperator()
10132 APSInt IntResult; in VisitCastExpr()
10202 APSInt Zero = Info.Ctx.MakeIntValue(0, ElemTy); in ZeroInitialization()
10225 APSInt &Imag = Result.IntImag; in VisitImaginaryLiteral()
10229 Result.IntReal = APSInt(Imag.getBitWidth(), !Imag.isSigned()); in VisitImaginaryLiteral()
10333 APSInt &Real = Result.IntReal; in VisitCastExpr()
10338 Result.IntImag = APSInt(Real.getBitWidth(), !Real.isSigned()); in VisitCastExpr()
10582 APSInt Den = RHS.getComplexIntReal() * RHS.getComplexIntReal() + in VisitBinaryOperator()
10877 Result.Val = APValue(APSInt(L->getValue(), in FastEvaluateAsRValue()
11046 APSInt Expr::EvaluateKnownConstInt(const ASTContext &Ctx, in EvaluateKnownConstInt()
11061 APSInt Expr::EvaluateKnownConstIntCheckOverflow( in EvaluateKnownConstIntCheckOverflow()
11399 llvm::APSInt REval = Exp->getRHS()->EvaluateKnownConstInt(Ctx); in CheckICE()
11403 llvm::APSInt LEval = Exp->getLHS()->EvaluateKnownConstInt(Ctx); in CheckICE()
11454 APSInt IgnoredVal(DestWidth, !DestSigned); in CheckICE()
11536 llvm::APSInt *Value, in EvaluateCPlusPlus11IntegralConstantExpr()
11569 bool Expr::isIntegerConstantExpr(llvm::APSInt &Value, const ASTContext &Ctx, in isIntegerConstantExpr()