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

2017-04-06 Thread Alex Lorenz via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299646: Fix lambda to block conversion in C++17 by avoiding copy elision for the (authored by arphaman). Changed prior to commit: https://reviews.llvm.org/D31669?vs=94177=94358#toc Repository: rL

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

2017-04-05 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Looks good, thanks. Repository: rL LLVM https://reviews.llvm.org/D31669 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2017-04-05 Thread Alex Lorenz via Phabricator via cfe-commits
arphaman updated this revision to Diff 94177. arphaman marked 2 inline comments as done. arphaman added a comment. Use a new EntityKind and improve test. Repository: rL LLVM https://reviews.llvm.org/D31669 Files: include/clang/Sema/Initialization.h lib/Sema/SemaInit.cpp

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

2017-04-04 Thread John McCall via Phabricator via cfe-commits
rjmccall added inline comments. Comment at: include/clang/Sema/Initialization.h:124 +/// is a lambda that's captured by a block it's converted to. +bool IsLambdaToBlockConversionEntity; }; It seems less invasive to just give this a new EntityKind.

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

2017-04-04 Thread Adrian Prantl via Phabricator via cfe-commits
aprantl added inline comments. Comment at: include/clang/Sema/Initialization.h:122 + +/// \brief When Kind == EK_BlockElement, this flag determines if the entity +/// is a lambda that's captured by a block it's converted to. No need to use \brief any

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

2017-04-04 Thread Alex Lorenz via Phabricator via cfe-commits
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