mizvekov added inline comments.

================
Comment at: clang/lib/Sema/SemaCoroutine.cpp:1585-1586
   InitializedEntity Entity = InitializedEntity::InitializeVariable(GroDecl);
-  ExprResult Res = S.PerformMoveOrCopyInitialization(Entity, nullptr, GroType,
-                                                     this->ReturnValue);
+  ExprResult Res =
+      S.PerformCopyInitialization(Entity, SourceLocation(), ReturnValue);
   if (Res.isInvalid())
----------------
mizvekov wrote:
> aaronpuchert wrote:
> > Perhaps this should just be direct initialization? Can't really find 
> > anything in the standard though.
> So I just checked this again. Regarding our conversation on IRC, what I said 
> initially was correct: `ReturnValue` is always a member function expression, 
> built by `makeReturnObject` -> `buildPromiseCall` -> `buildMemberCall`. So 
> implicit move would never trigger here, and as far as I see there is no 
> reason for this code to have used PerformMoveOrCopyInitialization in the 
> first place.
Err I meant: member function *call* expression


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D99696/new/

https://reviews.llvm.org/D99696

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to