[Sema] Shipping a better NRVO to Clang

Hi, I’d like to ship a better “named return value optimization” algorithm to Clang.

It is based on a nice paper: (P2025) Guaranteed copy elision for return variables
I requested a review and wrote there a detailed description: ⚙ D119792 [Clang] [P2025] Analyze only potential scopes for NRVO

I’m looking for someone who might be interested in this topic and is willing to review the code, so I started this thread :slightly_smiling_face: This patch may improve code performance.

When the functionality relates to implementation of a standards paper, I’d recommend adding the clang-language-wg as a reviewer. I’ve done so on your linked review, and hopefully that gets some more reviewer eyeballs on it.