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
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
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
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.
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
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