Lines Matching refs:APValue
55 static bool IsGlobalLValue(APValue::LValueBase B);
62 static QualType getType(APValue::LValueBase B) { in getType()
90 APValue::BaseOrMemberType getAsBaseOrMember(APValue::LValuePathEntry E) { in getAsBaseOrMember()
91 APValue::BaseOrMemberType Value; in getAsBaseOrMember()
98 static const FieldDecl *getAsField(APValue::LValuePathEntry E) { in getAsField()
103 static const CXXRecordDecl *getAsBaseClass(APValue::LValuePathEntry E) { in getAsBaseClass()
108 static bool isVirtualBaseClass(APValue::LValuePathEntry E) { in isVirtualBaseClass()
116 ArrayRef<APValue::LValuePathEntry> Path, in findMostDerivedSubobject()
171 typedef APValue::LValuePathEntry PathEntry;
182 SubobjectDesignator(ASTContext &Ctx, const APValue &V) in SubobjectDesignator()
237 APValue::BaseOrMemberType Value(D, Virtual); in addDeclUnchecked()
307 APValue *Arguments;
311 typedef std::map<const void*, APValue> MapTy;
318 APValue *Arguments);
321 APValue *getTemporary(const void *Key) { in getTemporary()
325 APValue &createTemporary(const void *Key, bool IsLifetimeExtended);
390 llvm::PointerIntPair<APValue*, 1, bool> Value;
393 Cleanup(APValue *Val, bool IsLifetimeExtended) in Cleanup()
398 *Value.getPointer() = APValue(); in endLifetime()
446 APValue::LValueBase EvaluatingDecl;
450 APValue *EvaluatingDeclValue;
518 void setEvaluatingDecl(APValue::LValueBase Base, APValue &Value) { in setEvaluatingDecl()
822 APValue *Arguments) in CallStackFrame()
835 APValue &CallStackFrame::createTemporary(const void *Key, in createTemporary()
837 APValue &Result = Temporaries[Key]; in createTemporary()
896 void moveInto(APValue &v) const { in moveInto()
898 v = APValue(FloatReal, FloatImag); in moveInto()
900 v = APValue(IntReal, IntImag); in moveInto()
902 void setFrom(const APValue &v) { in setFrom()
917 APValue::LValueBase Base;
922 const APValue::LValueBase getLValueBase() const { return Base; } in getLValueBase()
929 void moveInto(APValue &V) const { in moveInto()
931 V = APValue(Base, Offset, APValue::NoLValuePath(), CallIndex); in moveInto()
933 V = APValue(Base, Offset, Designator.Entries, in moveInto()
936 void setFrom(ASTContext &Ctx, const APValue &V) { in setFrom()
944 void set(APValue::LValueBase B, unsigned I = 0) { in set()
1016 void moveInto(APValue &V) const { in moveInto()
1017 V = APValue(getDecl(), isDerivedMember(), Path); in moveInto()
1019 void setFrom(const APValue &V) { in setFrom()
1095 static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E);
1096 static bool EvaluateInPlace(APValue &Result, EvalInfo &Info,
1105 static bool EvaluateIntegerOrLValue(const Expr *E, APValue &Result,
1109 static bool EvaluateAtomic(const Expr *E, APValue &Result, EvalInfo &Info);
1126 APValue Val; in describeCall()
1141 const APValue &Arg = Frame->Arguments[ArgIndex]; in describeCall()
1155 APValue Scratch; in EvaluateIgnoredValue()
1176 static bool IsGlobalLValue(APValue::LValueBase B) { in IsGlobalLValue()
1232 static void NoteLValueLocation(EvalInfo &Info, APValue::LValueBase Base) { in NoteLValueLocation()
1249 APValue::LValueBase Base = LVal.getLValueBase(); in CheckLValueConstantExpression()
1348 QualType Type, const APValue &Value) { in CheckConstantExpression()
1419 static bool EvalPointerValueAsBool(const APValue &Value, bool &Result) { in EvalPointerValueAsBool()
1434 static bool HandleConversionToBool(const APValue &Val, bool &Result) { in HandleConversionToBool()
1436 case APValue::Uninitialized: in HandleConversionToBool()
1438 case APValue::Int: in HandleConversionToBool()
1441 case APValue::Float: in HandleConversionToBool()
1444 case APValue::ComplexInt: in HandleConversionToBool()
1448 case APValue::ComplexFloat: in HandleConversionToBool()
1452 case APValue::LValue: in HandleConversionToBool()
1454 case APValue::MemberPointer: in HandleConversionToBool()
1457 case APValue::Vector: in HandleConversionToBool()
1458 case APValue::Array: in HandleConversionToBool()
1459 case APValue::Struct: in HandleConversionToBool()
1460 case APValue::Union: in HandleConversionToBool()
1461 case APValue::AddrLabelDiff: in HandleConversionToBool()
1471 APValue Val; in EvaluateAsBooleanCondition()
1535 APValue &Value, const FieldDecl *FD) { in truncateBitfieldValue()
1557 APValue SVal; in EvalAndBitcastToAPInt()
1576 APValue &Elt = SVal.getVectorElt(i); in EvalAndBitcastToAPInt()
1928 APValue *&Result) { in evaluateVarDeclInit()
2035 APValue &Result) { in expandStringLiteral()
2044 Result = APValue(APValue::UninitArray(), in expandStringLiteral()
2049 Result.getArrayFiller() = APValue(Value); in expandStringLiteral()
2052 Result.getArrayInitializedElt(I) = APValue(Value); in expandStringLiteral()
2057 static void expandArray(APValue &Array, unsigned Index) { in expandArray()
2067 APValue NewValue(APValue::UninitArray(), NewElts, Size); in expandArray()
2089 APValue *Value;
2094 CompleteObject(APValue *Value, QualType Type) in CompleteObject()
2119 APValue *O = Obj.Value; in findSubobject()
2265 APValue &Result;
2271 bool found(APValue &Subobj, QualType SubobjType) { in found()
2276 Result = APValue(Value); in found()
2280 Result = APValue(Value); in found()
2283 bool foundString(APValue &Subobj, QualType SubobjType, uint64_t Character) { in foundString()
2284 Result = APValue(extractStringLiteralCharacter( in foundString()
2297 APValue &Result) { in extractSubobject()
2305 APValue &NewVal;
2321 bool found(APValue &Subobj, QualType SubobjType) { in found()
2345 bool foundString(APValue &Subobj, QualType SubobjType, uint64_t Character) { in foundString()
2357 APValue &NewVal) { in modifySubobject()
2452 APValue *BaseVal = nullptr; in findCompleteObject()
2624 const LValue &LVal, APValue &RVal) { in handleLValueToRValueConversion()
2641 APValue Lit; in handleLValueToRValueConversion()
2650 APValue Str(Base, CharUnits::Zero(), APValue::NoLValuePath(), 0); in handleLValueToRValueConversion()
2662 QualType LValType, APValue &Val) { in handleAssignment()
2686 const APValue &RHS;
2702 bool found(APValue &Subobj, QualType SubobjType) { in found()
2704 case APValue::Int: in found()
2706 case APValue::Float: in found()
2708 case APValue::ComplexInt: in found()
2709 case APValue::ComplexFloat: in found()
2713 case APValue::LValue: in found()
2746 bool foundPointer(APValue &Subobj, QualType SubobjType) { in foundPointer()
2771 bool foundString(APValue &Subobj, QualType SubobjType, uint64_t Character) { in foundString()
2783 BinaryOperatorKind Opcode, const APValue &RVal) { in handleCompoundAssignment()
2803 APValue *Old;
2817 bool found(APValue &Subobj, QualType SubobjType) { in found()
2826 case APValue::Int: in found()
2828 case APValue::Float: in found()
2830 case APValue::ComplexInt: in found()
2834 case APValue::ComplexFloat: in found()
2838 case APValue::LValue: in found()
2857 if (Old) *Old = APValue(Value); in found()
2895 if (Old) *Old = APValue(Value); in found()
2904 bool foundPointer(APValue &Subobj, QualType SubobjType) { in foundPointer()
2924 bool foundString(APValue &Subobj, QualType SubobjType, uint64_t Character) { in foundString()
2932 QualType LValType, bool IsIncrement, APValue *Old) { in handleIncDec()
3137 APValue &Val = Info.CurrentCall->createTemporary(VD, true); in EvaluateDecl()
3143 Val = APValue(); in EvaluateDecl()
3153 Val = APValue(); in EvaluateDecl()
3170 static EvalStmtResult EvaluateStmt(APValue &Result, EvalInfo &Info,
3175 static EvalStmtResult EvaluateLoopBody(APValue &Result, EvalInfo &Info, in EvaluateLoopBody()
3194 static EvalStmtResult EvaluateSwitch(APValue &Result, EvalInfo &Info, in EvaluateSwitch()
3251 static EvalStmtResult EvaluateStmt(APValue &Result, EvalInfo &Info, in EvaluateStmt()
3587 typedef SmallVector<APValue, 8> ArgVector;
3611 EvalInfo &Info, APValue &Result) { in HandleFunctionCall()
3630 APValue RHSValue; in HandleFunctionCall()
3654 EvalInfo &Info, APValue &Result) { in HandleConstructorCall()
3695 Result = APValue(APValue::UninitStruct(), RD->getNumBases(), in HandleConstructorCall()
3711 APValue *Value = &Result; in HandleConstructorCall()
3733 Result = APValue(FD); in HandleConstructorCall()
3752 *Value = APValue(FD); in HandleConstructorCall()
3754 *Value = APValue(APValue::UninitStruct(), CD->getNumBases(), in HandleConstructorCall()
3793 bool DerivedSuccess(const APValue &V, const Expr *E) { in DerivedSuccess()
3920 APValue Result; in VisitBinaryOperator()
3964 if (APValue *Value = Info.CurrentCall->getTemporary(E)) in VisitOpaqueValueExpr()
4052 APValue Result; in VisitCallExpr()
4086 APValue Val; in VisitMemberExpr()
4102 APValue Result; in VisitMemberExpr()
4113 APValue AtomicVal; in VisitCastExpr()
4127 APValue RVal; in VisitCastExpr()
4152 APValue RVal; in VisitUnaryPostIncDec()
4180 APValue ReturnValue; in VisitStmtExpr()
4214 bool Success(APValue::LValueBase B) { in Success()
4223 bool Success(const APValue &V, const Expr *E) { in Success()
4260 APValue RefValue; in VisitMemberExpr()
4414 APValue *V; in VisitVarDecl()
4441 APValue *Value; in VisitMaterializeTemporaryExpr()
4444 *Value = APValue(); in VisitMaterializeTemporaryExpr()
4458 *Value = APValue(); in VisitMaterializeTemporaryExpr()
4587 APValue RHS; in VisitCompoundAssignOperator()
4609 APValue NewVal; in VisitBinAssign()
4642 bool Success(const APValue &V, const Expr *E) { in Success()
4773 APValue Value; in VisitCastExpr()
4847 bool Success(const APValue &V, const Expr *E) { in Success()
4925 APValue &Result;
4928 RecordExprEvaluator(EvalInfo &info, const LValue &This, APValue &Result) in RecordExprEvaluator()
4931 bool Success(const APValue &V, const Expr *E) { in Success()
4953 const LValue &This, APValue &Result) { in HandleClassZeroInitialization()
4956 Result = APValue(APValue::UninitStruct(), CD ? CD->getNumBases() : 0, in HandleClassZeroInitialization()
5002 Result = APValue((const FieldDecl*)nullptr); in ZeroInitialization()
5009 Result = APValue(*I); in ZeroInitialization()
5032 APValue DerivedObject; in VisitCastExpr()
5039 APValue *Value = &DerivedObject; in VisitCastExpr()
5061 Result = APValue(Field); in VisitInitListExpr()
5086 Result = APValue(APValue::UninitStruct(), 0, in VisitInitListExpr()
5115 APValue &FieldVal = Result.getStructField(Field->getFieldIndex()); in VisitInitListExpr()
5195 Result = APValue(APValue::UninitStruct(), 0, 2); in VisitCXXStdInitializerListExpr()
5212 Result.getStructField(1) = APValue(APSInt(ArrayType->getSize())); in VisitCXXStdInitializerListExpr()
5223 APValue &Result, EvalInfo &Info) { in EvaluateRecord()
5284 APValue &Result;
5287 VectorExprEvaluator(EvalInfo &info, APValue &Result) in VectorExprEvaluator()
5290 bool Success(const ArrayRef<APValue> &V, const Expr *E) { in Success()
5293 Result = APValue(V.data(), V.size()); in Success()
5296 bool Success(const APValue &V, const Expr *E) { in Success()
5314 static bool EvaluateVector(const Expr* E, APValue& Result, EvalInfo &Info) { in EvaluateVector()
5328 APValue Val = APValue(); in VisitCastExpr()
5333 Val = APValue(IntResult); in VisitCastExpr()
5338 Val = APValue(F); in VisitCastExpr()
5344 SmallVector<APValue, 4> Elts(NElts, Val); in VisitCastExpr()
5356 SmallVector<APValue, 4> Elts; in VisitCastExpr()
5368 Elts.push_back(APValue(APFloat(Sem, Elt))); in VisitCastExpr()
5377 Elts.push_back(APValue(APSInt(Elt, EltTy->isSignedIntegerType()))); in VisitCastExpr()
5396 SmallVector<APValue, 4> Elements; in VisitInitListExpr()
5407 APValue v; in VisitInitListExpr()
5421 Elements.push_back(APValue(sInt)); in VisitInitListExpr()
5430 Elements.push_back(APValue(f)); in VisitInitListExpr()
5442 APValue ZeroElement; in ZeroInitialization()
5444 ZeroElement = APValue(Info.Ctx.MakeIntValue(0, EltTy)); in ZeroInitialization()
5447 APValue(APFloat::getZero(Info.Ctx.getFloatTypeSemantics(EltTy))); in ZeroInitialization()
5449 SmallVector<APValue, 4> Elements(VT->getNumElements(), ZeroElement); in ZeroInitialization()
5466 APValue &Result;
5469 ArrayExprEvaluator(EvalInfo &Info, const LValue &This, APValue &Result) in ArrayExprEvaluator()
5472 bool Success(const APValue &V, const Expr *E) { in Success()
5485 Result = APValue(APValue::UninitArray(), 0, in ZeroInitialization()
5500 APValue *Value, QualType Type);
5505 APValue &Result, EvalInfo &Info) { in EvaluateArray()
5521 APValue Val; in VisitInitListExpr()
5530 APValue Filler; in VisitInitListExpr()
5543 Result = APValue(APValue::UninitArray(), NumEltsToInit, NumElts); in VisitInitListExpr()
5585 APValue *Value, in VisitCXXConstructExpr()
5593 APValue Filler = in VisitCXXConstructExpr()
5595 : APValue(); in VisitCXXConstructExpr()
5597 *Value = APValue(APValue::UninitArray(), N, N); in VisitCXXConstructExpr()
5660 APValue &Result;
5662 IntExprEvaluator(EvalInfo &info, APValue &result) in IntExprEvaluator()
5665 bool Success(const llvm::APSInt &SI, const Expr *E, APValue &Result) { in Success()
5672 Result = APValue(SI); in Success()
5679 bool Success(const llvm::APInt &I, const Expr *E, APValue &Result) { in Success()
5684 Result = APValue(APSInt(I)); in Success()
5693 bool Success(uint64_t Value, const Expr *E, APValue &Result) { in Success()
5696 Result = APValue(Info.Ctx.MakeIntValue(Value, E->getType())); in Success()
5707 bool Success(const APValue &V, const Expr *E) { in Success()
5786 static QualType GetObjectType(APValue::LValueBase B);
5800 static bool EvaluateIntegerOrLValue(const Expr *E, APValue &Result, in EvaluateIntegerOrLValue()
5807 APValue Val; in EvaluateInteger()
5936 APValue &V = Result.Val; in EvaluateBuiltinConstantP()
5937 if (V.getKind() == APValue::Int) in EvaluateBuiltinConstantP()
5959 QualType IntExprEvaluator::GetObjectType(APValue::LValueBase B) { in GetObjectType()
6206 APValue Char; in VisitCallExpr()
6293 APValue Val;
6330 APValue &FinalResult;
6333 DataRecursiveIntBinOpEvaluator(IntExprEvaluator &IntEval, APValue &Result) in DataRecursiveIntBinOpEvaluator()
6360 bool Success(uint64_t Value, const Expr *E, APValue &Result) { in Success()
6363 bool Success(const APSInt &Value, const Expr *E, APValue &Result) { in Success()
6382 const BinaryOperator *E, APValue &Result);
6387 Result.Val = APValue(); in EvaluateExpr()
6449 const BinaryOperator *E, APValue &Result) { in VisitBinOp()
6487 const APValue &LHSVal = LHSResult.Val; in VisitBinOp()
6488 const APValue &RHSVal = RHSResult.Val; in VisitBinOp()
6528 Result = APValue(LHSAddrExpr, RHSAddrExpr); in VisitBinOp()
6710 Result = APValue(LHSAddrExpr, RHSAddrExpr); in VisitBinaryOperator()
7308 bool Success(const APValue &V, const Expr *e) { in Success()
7525 bool Success(const APValue &V, const Expr *e) { in Success()
7904 APValue &Result;
7906 AtomicExprEvaluator(EvalInfo &Info, APValue &Result) in AtomicExprEvaluator()
7909 bool Success(const APValue &V, const Expr *E) { in Success()
7931 static bool EvaluateAtomic(const Expr *E, APValue &Result, EvalInfo &Info) { in EvaluateAtomic()
7947 bool Success(const APValue &V, const Expr *e) { return true; } in Success()
7970 static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E) { in Evaluate()
7994 Result = APValue(F); in Evaluate()
8009 APValue &Value = Info.CurrentCall->createTemporary(E, false); in Evaluate()
8016 APValue &Value = Info.CurrentCall->createTemporary(E, false); in Evaluate()
8043 static bool EvaluateInPlace(APValue &Result, EvalInfo &Info, const LValue &This, in EvaluateInPlace()
8065 static bool EvaluateAsRValue(EvalInfo &Info, const Expr *E, APValue &Result) { in EvaluateAsRValue()
8091 Result.Val = APValue(APSInt(L->getValue(), in FastEvaluateAsRValue()
8164 bool Expr::EvaluateAsInitializer(APValue &Value, const ASTContext &Ctx, in EvaluateAsInitializer()
8666 APValue Result; in EvaluateCPlusPlus11IntegralConstantExpr()
8704 bool Expr::isCXX11ConstantExpr(const ASTContext &Ctx, APValue *Result, in isCXX11ConstantExpr()
8716 APValue Scratch; in isCXX11ConstantExpr()
8730 bool Expr::EvaluateWithSubstitution(APValue &Value, ASTContext &Ctx, in EvaluateWithSubstitution()
8741 ArgValues[I - Args.begin()] = APValue(); in EvaluateWithSubstitution()
8780 APValue Scratch; in isPotentialConstantExpr()
8812 APValue ResultScratch; in isPotentialConstantExprUnevaluated()