[PATCH] D119792: [Clang] [P2025] Analyze only potential scopes for NRVO

Evgeny Shulgin via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 14 15:47:31 PST 2022


Izaron created this revision.
Izaron added reviewers: lebedev.ri, rsmith.
Izaron requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Before the patch we calculated the NRVO candidate looking at the
variable's whole enclosing scope. The research in [P2025 <https://reviews.llvm.org/P2025>] shows that looking
at the variable's potential scope is better and covers more cases where NRVO
would be safe and desirable.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D119792

Files:
  clang/include/clang/Sema/Scope.h
  clang/test/CodeGenCXX/nrvo.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D119792.408655.patch
Type: text/x-patch
Size: 16807 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220214/c11b617b/attachment-0001.bin>


More information about the cfe-commits mailing list