Commit 1191d42e authored by Hans Wennborg's avatar Hans Wennborg
Browse files

Merging r295150:

------------------------------------------------------------------------
r295150 | ahatanak | 2017-02-14 21:15:28 -0800 (Tue, 14 Feb 2017) | 13 lines

[Sema] Disallow returning a __block variable via a move.

r274291 made changes to prefer calling a move constructor to calling a
copy constructor when returning from a function. This caused programs to
crash when a __block variable in the heap was moved out and used later.

This commit fixes the bug by disallowing moving out of __block variables
implicitly.

rdar://problem/28181080

Differential Revision: https://reviews.llvm.org/D29908

------------------------------------------------------------------------

llvm-svn: 295234
parent 8a9e6cd1
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment