[PATCH] D99696: [clang] NRVO: Improvements and handling of more cases.

Matheus Izvekov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 13 14:50:16 PDT 2021


mizvekov added a comment.

@rsmith:

Actually, there is still something not quite right with this patch that I have to finish investigating.

The B5 <https://reviews.llvm.org/B5> test should not have gotten copy elision. I thought at first that we had gotten the function return type deduced during VarDecl instantiation, but we actually have a dependant type instead:

dump of FT:

  FunctionProtoType 0x18597a3ed10 '<dependent type> (void)' dependent cdecl
  `-BuiltinType 0x185960144e0 '<dependent type>' dependent

I think I assumed wrong that these blocks would behave similarly to lambdas with `auto` return.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D99696



More information about the cfe-commits mailing list