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

Matheus Izvekov via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 29 10:51:50 PDT 2024


mizvekov wrote:

It doesn't seem like elide-constructors is wired to control this behavior. Seems to be wired only to the StaticAnalyzer presently.

Regardless, the decision where to apply NRVO is currently centralized in SemaStmt.

I think "Sema::getNamedReturnInfo(const VarDecl *VD)" would be the best place to apply the effects of this flag.

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


More information about the cfe-commits mailing list