Lines Matching refs:APValue
56 static bool IsGlobalLValue(APValue::LValueBase B);
63 static QualType getType(APValue::LValueBase B) { in getType()
91 APValue::BaseOrMemberType getAsBaseOrMember(APValue::LValuePathEntry E) { in getAsBaseOrMember()
92 APValue::BaseOrMemberType Value; in getAsBaseOrMember()
99 static const FieldDecl *getAsField(APValue::LValuePathEntry E) { in getAsField()
104 static const CXXRecordDecl *getAsBaseClass(APValue::LValuePathEntry E) { in getAsBaseClass()
109 static bool isVirtualBaseClass(APValue::LValuePathEntry E) { in isVirtualBaseClass()
117 ArrayRef<APValue::LValuePathEntry> Path, in findMostDerivedSubobject()
182 typedef APValue::LValuePathEntry PathEntry;
194 SubobjectDesignator(ASTContext &Ctx, const APValue &V) in SubobjectDesignator()
255 APValue::BaseOrMemberType Value(D, Virtual); in addDeclUnchecked()
328 APValue *Arguments;
332 typedef std::map<const void*, APValue> MapTy;
339 APValue *Arguments);
342 APValue *getTemporary(const void *Key) { in getTemporary()
346 APValue &createTemporary(const void *Key, bool IsLifetimeExtended);
411 llvm::PointerIntPair<APValue*, 1, bool> Value;
414 Cleanup(APValue *Val, bool IsLifetimeExtended) in Cleanup()
419 *Value.getPointer() = APValue(); in endLifetime()
467 APValue::LValueBase EvaluatingDecl;
471 APValue *EvaluatingDeclValue;
551 void setEvaluatingDecl(APValue::LValueBase Base, APValue &Value) { in setEvaluatingDecl()
964 APValue *Arguments) in CallStackFrame()
977 APValue &CallStackFrame::createTemporary(const void *Key, in createTemporary()
979 APValue &Result = Temporaries[Key]; in createTemporary()
1048 void moveInto(APValue &v) const { in moveInto()
1050 v = APValue(FloatReal, FloatImag); in moveInto()
1052 v = APValue(IntReal, IntImag); in moveInto()
1054 void setFrom(const APValue &v) { in setFrom()
1069 APValue::LValueBase Base;
1075 const APValue::LValueBase getLValueBase() const { return Base; } in getLValueBase()
1082 void moveInto(APValue &V) const { in moveInto()
1084 V = APValue(Base, Offset, APValue::NoLValuePath(), CallIndex); in moveInto()
1086 V = APValue(Base, Offset, Designator.Entries, in moveInto()
1089 void setFrom(ASTContext &Ctx, const APValue &V) { in setFrom()
1098 void set(APValue::LValueBase B, unsigned I = 0, bool BInvalid = false) { in set()
1106 void setInvalid(APValue::LValueBase B, unsigned I = 0) { in setInvalid()
1171 void moveInto(APValue &V) const { in moveInto()
1172 V = APValue(getDecl(), isDerivedMember(), Path); in moveInto()
1174 void setFrom(const APValue &V) { in setFrom()
1250 static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E);
1251 static bool EvaluateInPlace(APValue &Result, EvalInfo &Info,
1260 static bool EvaluateIntegerOrLValue(const Expr *E, APValue &Result,
1264 static bool EvaluateAtomic(const Expr *E, APValue &Result, EvalInfo &Info);
1265 static bool EvaluateAsRValue(EvalInfo &Info, const Expr *E, APValue &Result);
1282 APValue Val; in describeCall()
1297 const APValue &Arg = Frame->Arguments[ArgIndex]; in describeCall()
1311 APValue Scratch; in EvaluateIgnoredValue()
1332 static bool IsGlobalLValue(APValue::LValueBase B) { in IsGlobalLValue()
1388 static void NoteLValueLocation(EvalInfo &Info, APValue::LValueBase Base) { in NoteLValueLocation()
1405 APValue::LValueBase Base = LVal.getLValueBase(); in CheckLValueConstantExpression()
1504 QualType Type, const APValue &Value) { in CheckConstantExpression()
1591 static bool EvalPointerValueAsBool(const APValue &Value, bool &Result) { in EvalPointerValueAsBool()
1606 static bool HandleConversionToBool(const APValue &Val, bool &Result) { in HandleConversionToBool()
1608 case APValue::Uninitialized: in HandleConversionToBool()
1610 case APValue::Int: in HandleConversionToBool()
1613 case APValue::Float: in HandleConversionToBool()
1616 case APValue::ComplexInt: in HandleConversionToBool()
1620 case APValue::ComplexFloat: in HandleConversionToBool()
1624 case APValue::LValue: in HandleConversionToBool()
1626 case APValue::MemberPointer: in HandleConversionToBool()
1629 case APValue::Vector: in HandleConversionToBool()
1630 case APValue::Array: in HandleConversionToBool()
1631 case APValue::Struct: in HandleConversionToBool()
1632 case APValue::Union: in HandleConversionToBool()
1633 case APValue::AddrLabelDiff: in HandleConversionToBool()
1643 APValue Val; in EvaluateAsBooleanCondition()
1708 APValue &Value, const FieldDecl *FD) { in truncateBitfieldValue()
1730 APValue SVal; in EvalAndBitcastToAPInt()
1749 APValue &Elt = SVal.getVectorElt(i); in EvalAndBitcastToAPInt()
2110 APValue *&Result) { in evaluateVarDeclInit()
2234 APValue &Result) { in expandStringLiteral()
2243 Result = APValue(APValue::UninitArray(), in expandStringLiteral()
2248 Result.getArrayFiller() = APValue(Value); in expandStringLiteral()
2251 Result.getArrayInitializedElt(I) = APValue(Value); in expandStringLiteral()
2256 static void expandArray(APValue &Array, unsigned Index) { in expandArray()
2266 APValue NewValue(APValue::UninitArray(), NewElts, Size); in expandArray()
2347 APValue *Value;
2352 CompleteObject(APValue *Value, QualType Type) in CompleteObject()
2378 APValue *O = Obj.Value; in findSubobject()
2532 APValue &Result;
2538 bool found(APValue &Subobj, QualType SubobjType) { in found()
2543 Result = APValue(Value); in found()
2547 Result = APValue(Value); in found()
2550 bool foundString(APValue &Subobj, QualType SubobjType, uint64_t Character) { in foundString()
2551 Result = APValue(extractStringLiteralCharacter( in foundString()
2564 APValue &Result) { in extractSubobject()
2572 APValue &NewVal;
2588 bool found(APValue &Subobj, QualType SubobjType) { in found()
2612 bool foundString(APValue &Subobj, QualType SubobjType, uint64_t Character) { in foundString()
2624 APValue &NewVal) { in modifySubobject()
2720 APValue *BaseVal = nullptr; in findCompleteObject()
2900 const LValue &LVal, APValue &RVal) { in handleLValueToRValueConversion()
2916 APValue Lit; in handleLValueToRValueConversion()
2925 APValue Str(Base, CharUnits::Zero(), APValue::NoLValuePath(), 0); in handleLValueToRValueConversion()
2937 QualType LValType, APValue &Val) { in handleAssignment()
2961 const APValue &RHS;
2977 bool found(APValue &Subobj, QualType SubobjType) { in found()
2979 case APValue::Int: in found()
2981 case APValue::Float: in found()
2983 case APValue::ComplexInt: in found()
2984 case APValue::ComplexFloat: in found()
2988 case APValue::LValue: in found()
3021 bool foundPointer(APValue &Subobj, QualType SubobjType) { in foundPointer()
3046 bool foundString(APValue &Subobj, QualType SubobjType, uint64_t Character) { in foundString()
3058 BinaryOperatorKind Opcode, const APValue &RVal) { in handleCompoundAssignment()
3078 APValue *Old;
3092 bool found(APValue &Subobj, QualType SubobjType) { in found()
3101 case APValue::Int: in found()
3103 case APValue::Float: in found()
3105 case APValue::ComplexInt: in found()
3109 case APValue::ComplexFloat: in found()
3113 case APValue::LValue: in found()
3132 if (Old) *Old = APValue(Value); in found()
3170 if (Old) *Old = APValue(Value); in found()
3179 bool foundPointer(APValue &Subobj, QualType SubobjType) { in foundPointer()
3199 bool foundString(APValue &Subobj, QualType SubobjType, uint64_t Character) { in foundString()
3207 QualType LValType, bool IsIncrement, APValue *Old) { in handleIncDec()
3412 APValue &Val = Info.CurrentCall->createTemporary(VD, true); in EvaluateDecl()
3418 Val = APValue(); in EvaluateDecl()
3428 Val = APValue(); in EvaluateDecl()
3450 APValue &Value;
3921 typedef SmallVector<APValue, 8> ArgVector;
3945 EvalInfo &Info, APValue &Result, in HandleFunctionCall()
3970 APValue RHSValue; in HandleFunctionCall()
3993 APValue *ArgValues, in HandleConstructorCall()
3995 EvalInfo &Info, APValue &Result) { in HandleConstructorCall()
4010 APValue RetVal; in HandleConstructorCall()
4044 Result = APValue(APValue::UninitStruct(), RD->getNumBases(), in HandleConstructorCall()
4060 APValue *Value = &Result; in HandleConstructorCall()
4082 Result = APValue(FD); in HandleConstructorCall()
4101 *Value = APValue(FD); in HandleConstructorCall()
4103 *Value = APValue(APValue::UninitStruct(), CD->getNumBases(), in HandleConstructorCall()
4136 EvalInfo &Info, APValue &Result) { in HandleConstructorCall()
4155 bool DerivedSuccess(const APValue &V, const Expr *E) { in DerivedSuccess()
4284 APValue Result; in VisitBinaryOperator()
4328 if (APValue *Value = Info.CurrentCall->getTemporary(E)) in VisitOpaqueValueExpr()
4342 APValue Result; in VisitCallExpr()
4348 bool handleCallExpr(const CallExpr *E, APValue &Result, in handleCallExpr()
4457 APValue Val; in VisitMemberExpr()
4473 APValue Result; in VisitMemberExpr()
4484 APValue AtomicVal; in VisitCastExpr()
4498 APValue RVal; in VisitCastExpr()
4523 APValue RVal; in VisitUnaryPostIncDec()
4554 APValue ReturnValue; in VisitStmtExpr()
4600 bool Success(APValue::LValueBase B) { in Success()
4609 bool Success(const APValue &V, const Expr *E) { in Success()
4650 APValue RefValue; in VisitMemberExpr()
4805 APValue *V; in VisitVarDecl()
4832 APValue *Value; in VisitMaterializeTemporaryExpr()
4835 *Value = APValue(); in VisitMaterializeTemporaryExpr()
4849 *Value = APValue(); in VisitMaterializeTemporaryExpr()
4978 APValue RHS; in VisitCompoundAssignOperator()
5000 APValue NewVal; in VisitBinAssign()
5033 bool Success(const APValue &V, const Expr *E) { in Success()
5165 APValue Value; in VisitCastExpr()
5336 bool Success(const APValue &V, const Expr *E) { in Success()
5414 APValue &Result;
5417 RecordExprEvaluator(EvalInfo &info, const LValue &This, APValue &Result) in RecordExprEvaluator()
5420 bool Success(const APValue &V, const Expr *E) { in Success()
5452 const LValue &This, APValue &Result) { in HandleClassZeroInitialization()
5455 Result = APValue(APValue::UninitStruct(), CD ? CD->getNumBases() : 0, in HandleClassZeroInitialization()
5501 Result = APValue((const FieldDecl*)nullptr); in ZeroInitialization()
5508 Result = APValue(*I); in ZeroInitialization()
5531 APValue DerivedObject; in VisitCastExpr()
5538 APValue *Value = &DerivedObject; in VisitCastExpr()
5560 Result = APValue(Field); in VisitInitListExpr()
5585 Result = APValue(APValue::UninitStruct(), CXXRD ? CXXRD->getNumBases() : 0, in VisitInitListExpr()
5600 APValue &FieldVal = Result.getStructBase(ElementNo); in VisitInitListExpr()
5636 APValue &FieldVal = Result.getStructField(Field->getFieldIndex()); in VisitInitListExpr()
5741 Result = APValue(APValue::UninitStruct(), 0, 2); in VisitCXXStdInitializerListExpr()
5758 Result.getStructField(1) = APValue(APSInt(ArrayType->getSize())); in VisitCXXStdInitializerListExpr()
5769 APValue &Result, EvalInfo &Info) { in EvaluateRecord()
5833 APValue &Result;
5836 VectorExprEvaluator(EvalInfo &info, APValue &Result) in VectorExprEvaluator()
5839 bool Success(ArrayRef<APValue> V, const Expr *E) { in Success()
5842 Result = APValue(V.data(), V.size()); in Success()
5845 bool Success(const APValue &V, const Expr *E) { in Success()
5863 static bool EvaluateVector(const Expr* E, APValue& Result, EvalInfo &Info) { in EvaluateVector()
5877 APValue Val = APValue(); in VisitCastExpr()
5882 Val = APValue(std::move(IntResult)); in VisitCastExpr()
5887 Val = APValue(std::move(FloatResult)); in VisitCastExpr()
5893 SmallVector<APValue, 4> Elts(NElts, Val); in VisitCastExpr()
5905 SmallVector<APValue, 4> Elts; in VisitCastExpr()
5917 Elts.push_back(APValue(APFloat(Sem, Elt))); in VisitCastExpr()
5926 Elts.push_back(APValue(APSInt(Elt, EltTy->isSignedIntegerType()))); in VisitCastExpr()
5945 SmallVector<APValue, 4> Elements; in VisitInitListExpr()
5956 APValue v; in VisitInitListExpr()
5970 Elements.push_back(APValue(sInt)); in VisitInitListExpr()
5979 Elements.push_back(APValue(f)); in VisitInitListExpr()
5991 APValue ZeroElement; in ZeroInitialization()
5993 ZeroElement = APValue(Info.Ctx.MakeIntValue(0, EltTy)); in ZeroInitialization()
5996 APValue(APFloat::getZero(Info.Ctx.getFloatTypeSemantics(EltTy))); in ZeroInitialization()
5998 SmallVector<APValue, 4> Elements(VT->getNumElements(), ZeroElement); in ZeroInitialization()
6015 APValue &Result;
6018 ArrayExprEvaluator(EvalInfo &Info, const LValue &This, APValue &Result) in ArrayExprEvaluator()
6021 bool Success(const APValue &V, const Expr *E) { in Success()
6034 Result = APValue(APValue::UninitArray(), 0, in ZeroInitialization()
6052 APValue *Value, QualType Type);
6057 APValue &Result, EvalInfo &Info) { in EvaluateArray()
6073 APValue Val; in VisitInitListExpr()
6082 APValue Filler; in VisitInitListExpr()
6095 Result = APValue(APValue::UninitArray(), NumEltsToInit, NumElts); in VisitInitListExpr()
6137 APValue *Value, in VisitCXXConstructExpr()
6145 APValue Filler = in VisitCXXConstructExpr()
6147 : APValue(); in VisitCXXConstructExpr()
6149 *Value = APValue(APValue::UninitArray(), N, N); in VisitCXXConstructExpr()
6186 APValue &Result;
6188 IntExprEvaluator(EvalInfo &info, APValue &result) in IntExprEvaluator()
6191 bool Success(const llvm::APSInt &SI, const Expr *E, APValue &Result) { in Success()
6198 Result = APValue(SI); in Success()
6205 bool Success(const llvm::APInt &I, const Expr *E, APValue &Result) { in Success()
6210 Result = APValue(APSInt(I)); in Success()
6219 bool Success(uint64_t Value, const Expr *E, APValue &Result) { in Success()
6222 Result = APValue(Info.Ctx.MakeIntValue(Value, E->getType())); in Success()
6233 bool Success(const APValue &V, const Expr *E) { in Success()
6323 static bool EvaluateIntegerOrLValue(const Expr *E, APValue &Result, in EvaluateIntegerOrLValue()
6330 APValue Val; in EvaluateInteger()
6546 APValue &V = Result.Val; in EvaluateBuiltinConstantP()
6547 if (V.getKind() == APValue::Int) in EvaluateBuiltinConstantP()
6549 if (V.getKind() == APValue::LValue) in EvaluateBuiltinConstantP()
6569 static QualType getObjectType(APValue::LValueBase B) { in getObjectType()
6729 APValue RVal; in tryEvaluateBuiltinObjectSize()
7047 APValue Char; in VisitCallExpr()
7161 APValue Val;
7195 APValue &FinalResult;
7198 DataRecursiveIntBinOpEvaluator(IntExprEvaluator &IntEval, APValue &Result) in DataRecursiveIntBinOpEvaluator()
7227 bool Success(uint64_t Value, const Expr *E, APValue &Result) { in Success()
7230 bool Success(const APSInt &Value, const Expr *E, APValue &Result) { in Success()
7249 const BinaryOperator *E, APValue &Result);
7254 Result.Val = APValue(); in EvaluateExpr()
7316 const BinaryOperator *E, APValue &Result) { in VisitBinOp()
7354 const APValue &LHSVal = LHSResult.Val; in VisitBinOp()
7355 const APValue &RHSVal = RHSResult.Val; in VisitBinOp()
7395 Result = APValue(LHSAddrExpr, RHSAddrExpr); in VisitBinOp()
7617 return Success(APValue(LHSAddrExpr, RHSAddrExpr), E); in VisitBinaryOperator()
8206 bool Success(const APValue &V, const Expr *e) { in Success()
8436 bool Success(const APValue &V, const Expr *e) { in Success()
8922 APValue &Result;
8924 AtomicExprEvaluator(EvalInfo &Info, APValue &Result) in AtomicExprEvaluator()
8927 bool Success(const APValue &V, const Expr *E) { in Success()
8949 static bool EvaluateAtomic(const Expr *E, APValue &Result, EvalInfo &Info) { in EvaluateAtomic()
8965 bool Success(const APValue &V, const Expr *e) { return true; } in Success()
8999 static bool Evaluate(APValue &Result, EvalInfo &Info, const Expr *E) { in Evaluate()
9023 Result = APValue(F); in Evaluate()
9038 APValue &Value = Info.CurrentCall->createTemporary(E, false); in Evaluate()
9045 APValue &Value = Info.CurrentCall->createTemporary(E, false); in Evaluate()
9072 static bool EvaluateInPlace(APValue &Result, EvalInfo &Info, const LValue &This, in EvaluateInPlace()
9094 static bool EvaluateAsRValue(EvalInfo &Info, const Expr *E, APValue &Result) { in EvaluateAsRValue()
9120 Result.Val = APValue(APSInt(L->getValue(), in FastEvaluateAsRValue()
9213 bool Expr::EvaluateAsInitializer(APValue &Value, const ASTContext &Ctx, in EvaluateAsInitializer()
9728 APValue Result; in EvaluateCPlusPlus11IntegralConstantExpr()
9774 bool Expr::isCXX11ConstantExpr(const ASTContext &Ctx, APValue *Result, in isCXX11ConstantExpr()
9786 APValue Scratch; in isCXX11ConstantExpr()
9800 bool Expr::EvaluateWithSubstitution(APValue &Value, ASTContext &Ctx, in EvaluateWithSubstitution()
9812 ArgValues[I - Args.begin()] = APValue(); in EvaluateWithSubstitution()
9849 APValue Scratch; in isPotentialConstantExpr()
9883 APValue ResultScratch; in isPotentialConstantExprUnevaluated()