[clang] [C] Disable use of NRVO (PR #101038)

Eli Friedman via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 29 14:03:02 PDT 2024


efriedma-quic wrote:

> > And C++17 rules forbid a copy on the caller side: "guaranteed copy elision" means semantically, there is no copy.
> 
> An extra copy is permitted for trivially-copyable types; otherwise we'd be required to pass and return all classes indirectly. So we're not forbidden from adding an extra copy here if we decide it's necessary.

Oh, right.

https://github.com/llvm/llvm-project/pull/101038


More information about the cfe-commits mailing list