[PATCH] D51741: [coro]Pass rvalue reference for named local variable to return_value

Brian Gesiak via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 26 08:20:10 PDT 2018


modocache accepted this revision.
modocache added a comment.
This revision is now accepted and ready to land.

This is great, thanks! Sorry for letting it languish. I defer to @GorNishanov, but I don't see why this couldn't go in now and if there're any edge cases I'm missing we can address those in another patch. I pulled this down and played around with it, and everything seemed OK to me.

I had one nit about formatting, but other than that this is good to go. Do you have commit access? If not, let me know if I can land this for you.



================
Comment at: lib/Sema/SemaCoroutine.cpp:851
+      ExprResult MoveResult =
+          this->PerformMoveOrCopyInitialization(Entity, NRVOCandidate, E->getType(), E);
+      if (MoveResult.get())
----------------
nit: When I run clang-format on this patch, it suggests the following here:

```
      ExprResult MoveResult = this->PerformMoveOrCopyInitialization(
          Entity, NRVOCandidate, E->getType(), E);
```

Splitting it up as above makes sure this line stays within the 80-character-per-line limit.


Repository:
  rC Clang

https://reviews.llvm.org/D51741





More information about the cfe-commits mailing list