[PATCH] D47586: Update NRVO logic to support early return (Attempt 2)

Taiju Tsuiki via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu May 31 21:30:35 PDT 2018


tzik added a reviewer: rsmith.
tzik added a comment.

rsmith: PTAL. This is the previous attempt <https://reviews.llvm.org/D47067> plus a fix and a test.
The diff is SemaTemplateInstantiateDecl.cpp part that propagate disabled NRVO state to the instantiated local variable.
On the previous attempt, I left the local variable NRVO candidate on the template instnantiation, and following `computeNRVO` for the instantiated function template unexpectedly turned on NRVO for the candidate.


Repository:
  rC Clang

https://reviews.llvm.org/D47586





More information about the cfe-commits mailing list