@@ -2050,31 +2050,34 @@ class AwaitExpr final : public IdentityExpr {
20502050 }
20512051};
20522052
2053- // / MoveExpr - A 'move ' surrounding an lvalue expression marking the lvalue as
2054- // / needing to be moved.
2053+ // / ConsumeExpr - A 'consume ' surrounding an lvalue expression marking the
2054+ // / lvalue as needing to be moved.
20552055// /
20562056// / getSemanticsProvidingExpr() looks through this because it doesn't
20572057// / provide the value and only very specific clients care where the
20582058// / 'move' was written.
2059- class MoveExpr final : public IdentityExpr {
2060- SourceLoc MoveLoc ;
2059+ class ConsumeExpr final : public IdentityExpr {
2060+ SourceLoc ConsumeLoc ;
20612061
20622062public:
2063- MoveExpr (SourceLoc moveLoc, Expr *sub, Type type = Type(),
2064- bool implicit = false )
2065- : IdentityExpr(ExprKind::Move, sub, type, implicit), MoveLoc(moveLoc) {}
2063+ ConsumeExpr (SourceLoc consumeLoc, Expr *sub, Type type = Type(),
2064+ bool implicit = false )
2065+ : IdentityExpr(ExprKind::Consume, sub, type, implicit),
2066+ ConsumeLoc (consumeLoc) {}
20662067
2067- static MoveExpr *createImplicit (ASTContext &ctx, SourceLoc moveLoc, Expr *sub ,
2068- Type type = Type()) {
2069- return new (ctx) MoveExpr (moveLoc, sub, type, /* implicit=*/ true );
2068+ static ConsumeExpr *createImplicit (ASTContext &ctx, SourceLoc moveLoc,
2069+ Expr *sub, Type type = Type()) {
2070+ return new (ctx) ConsumeExpr (moveLoc, sub, type, /* implicit=*/ true );
20702071 }
20712072
2072- SourceLoc getLoc () const { return MoveLoc ; }
2073+ SourceLoc getLoc () const { return ConsumeLoc ; }
20732074
2074- SourceLoc getStartLoc () const { return MoveLoc ; }
2075+ SourceLoc getStartLoc () const { return ConsumeLoc ; }
20752076 SourceLoc getEndLoc () const { return getSubExpr ()->getEndLoc (); }
20762077
2077- static bool classof (const Expr *e) { return e->getKind () == ExprKind::Move; }
2078+ static bool classof (const Expr *e) {
2079+ return e->getKind () == ExprKind::Consume;
2080+ }
20782081};
20792082
20802083// / CopyExpr - A 'copy' surrounding an lvalue expression marking the lvalue as
0 commit comments