[PATCH] D31669: Fix lambda to block conversion in C++17 by avoiding copy elision for the lambda capture used by the created block

Alex Lorenz via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 4 06:46:02 PDT 2017


arphaman created this revision.

The commit r288866 introduced guaranteed copy elision to C++ 17. This unfortunately broke the lambda to block conversion in C++17 (the compiler crashes when performing IRGen). This patch fixes the conversion by avoiding copy elision for the capture that captures the lambda that's used in the block created by lambda to block conversion process.


Repository:
  rL LLVM

https://reviews.llvm.org/D31669

Files:
  include/clang/Sema/Initialization.h
  lib/Sema/SemaInit.cpp
  lib/Sema/SemaLambda.cpp
  test/CodeGenObjCXX/lambda-to-block.mm

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31669.94067.patch
Type: text/x-patch
Size: 4922 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170404/c5b97650/attachment.bin>


More information about the cfe-commits mailing list