Lines Matching refs:LVal
1326 QualType Type, const LValue &LVal) {
1329 APValue::LValueBase Base = LVal.getLValueBase();
1330 const SubobjectDesignator &Designator = LVal.getLValueDesignator();
1349 LVal.getLValueCallIndex() == 0) &&
1479 LValue LVal;
1480 LVal.setFrom(Info.Ctx, Value);
1481 return CheckLValueConstantExpression(Info, DiagLoc, Type, LVal);
1488 static const ValueDecl *GetLValueBaseDecl(const LValue &LVal) {
1489 return LVal.Base.dyn_cast<const ValueDecl*>();
1935 /// Update LVal to refer to the given field, which must be a member of the type
1936 /// currently described by LVal.
1937 static bool HandleLValueMember(EvalInfo &Info, const Expr *E, LValue &LVal,
1946 LVal.Offset += Info.Ctx.toCharUnitsFromBits(RL->getFieldOffset(I));
1947 LVal.addDecl(Info, E, FD);
1951 /// Update LVal to refer to the given indirect field.
1953 LValue &LVal,
1956 if (!HandleLValueMember(Info, E, LVal, cast<FieldDecl>(C)))
1985 /// \param LVal - The pointer value to be updated.
1986 /// \param EltTy - The pointee type represented by LVal.
1989 LValue &LVal, QualType EltTy,
1996 LVal.Offset += Adjustment * SizeOfPointee;
1997 LVal.adjustIndex(Info, E, Adjustment);
2003 /// \param LVal - The lvalue to be updated.
2007 LValue &LVal, QualType EltTy,
2013 LVal.Offset += SizeOfComponent;
2015 LVal.addComplex(Info, E, EltTy, Imag);
2592 AccessKinds AK, const LValue &LVal,
2594 if (!LVal.Base) {
2600 if (LVal.CallIndex) {
2601 Frame = Info.getCallFrame(LVal.CallIndex);
2604 << AK << LVal.Base.is<const ValueDecl*>();
2605 NoteLValueLocation(Info, LVal.Base);
2625 QualType BaseType = getType(LVal.Base);
2627 if (const ValueDecl *D = LVal.Base.dyn_cast<const ValueDecl*>()) {
2706 const Expr *Base = LVal.Base.dyn_cast<const Expr*>();
2766 if (LVal.getLValueBase() == Info.EvaluatingDecl) {
2792 /// \param LVal - The glvalue on which we are attempting to perform this action.
2796 const LValue &LVal, APValue &RVal) {
2797 if (LVal.Designator.Invalid)
2801 const Expr *Base = LVal.Base.dyn_cast<const Expr*>();
2802 if (Base && !LVal.CallIndex && !Type.isVolatileQualified()) {
2816 return extractSubobject(Info, Conv, LitObj, LVal.Designator, RVal);
2823 return extractSubobject(Info, Conv, StrObj, LVal.Designator, RVal);
2827 CompleteObject Obj = findCompleteObject(Info, Conv, AK_Read, LVal, Type);
2828 return Obj && extractSubobject(Info, Conv, Obj, LVal.Designator, RVal);
2831 /// Perform an assignment of Val to LVal. Takes ownership of Val.
2832 static bool handleAssignment(EvalInfo &Info, const Expr *E, const LValue &LVal,
2834 if (LVal.Designator.Invalid)
2842 CompleteObject Obj = findCompleteObject(Info, E, AK_Assign, LVal, LValType);
2843 return Obj && modifySubobject(Info, E, Obj, LVal.Designator, Val);
2935 LValue LVal;
2936 LVal.setFrom(Info.Ctx, Subobj);
2937 if (!HandleLValueArrayAdjustment(Info, E, LVal, PointeeType, Offset))
2939 LVal.moveInto(Subobj);
2950 /// Perform a compound assignment of LVal <op>= RVal.
2953 const LValue &LVal, QualType LValType, QualType PromotedLValType,
2955 if (LVal.Designator.Invalid)
2963 CompleteObject Obj = findCompleteObject(Info, E, AK_Assign, LVal, LValType);
2966 return Obj && findSubobject(Info, E, Obj, LVal.Designator, Handler);
3087 LValue LVal;
3088 LVal.setFrom(Info.Ctx, Subobj);
3089 if (!HandleLValueArrayAdjustment(Info, E, LVal, PointeeType,
3092 LVal.moveInto(Subobj);
3101 /// Perform an increment or decrement on LVal.
3102 static bool handleIncDec(EvalInfo &Info, const Expr *E, const LValue &LVal,
3104 if (LVal
3113 CompleteObject Obj = findCompleteObject(Info, E, AK, LVal, LValType);
3115 return Obj && findSubobject(Info, E, Obj, LVal.Designator, Handler);
4348 LValue LVal;
4349 if (!EvaluateLValue(E->getSubExpr(), LVal, Info))
4354 LVal, RVal))
4373 LValue LVal;
4374 if (!EvaluateLValue(UO->getSubExpr(), LVal, Info))
4377 if (!handleIncDec(this->Info, UO, LVal, UO->getSubExpr()->getType(),
6349 static bool isDesignatorAtObjectEnd(const ASTContext &Ctx, const LValue &LVal) {
6350 assert(!LVal.Designator.Invalid);
6359 auto &Base = LVal.getLValueBase();
6372 for (int I = 0, E = LVal.Designator.Entries.size(); I != E; ++I) {
6379 uint64_t Index = LVal.Designator.Entries[I].ArrayIndex;
6385 uint64_t Index = LVal.Designator.Entries[I].ArrayIndex;
6389 LVal.Designator.Entries[I])) {
6394 assert(getAsBaseClass(LVal.Designator.Entries[I]) != nullptr &&
6403 static bool refersToCompleteObject(const LValue &LVal) {
6404 if (LVal.Designator.Invalid || !LVal.Designator.Entries.empty())
6407 if (!LVal.InvalidBase)
6410 auto *E = LVal.Base.dyn_cast<const Expr *>();
8913 LValue LVal;
8914 LVal.set(VD);
8923 if (!EvaluateInPlace(Value, InitInfo, LVal, &VIE,
8928 if (!EvaluateInPlace(Value, InitInfo, LVal, this,