This revision was automatically updated to reflect the committed changes.
Closed by commit rL295150: [Sema] Disallow returning a __block variable via a
move. (authored by ahatanak).
Changed prior to commit:
https://reviews.llvm.org/D29908?vs=88430&id=88486#toc
Repository:
rL LLVM
https://re
ahatanak added a comment.
In https://reviews.llvm.org/D29908#676788, @rjmccall wrote:
> Oh, I see. Just to clarify: it doesn't matter that the object "ret" used to
> point to has been destructed, what matters is that "ret" now holds a null
> reference because it's been moved out of.
Yes, tha
ahatanak updated this revision to Diff 88430.
ahatanak added a comment.
Update comment.
https://reviews.llvm.org/D29908
Files:
lib/Sema/SemaStmt.cpp
test/SemaObjCXX/blocks.mm
Index: test/SemaObjCXX/blocks.mm
===
--- test/Sema
rjmccall added a comment.
In https://reviews.llvm.org/D29908#676601, @ahatanak wrote:
> In https://reviews.llvm.org/D29908#676589, @ahatanak wrote:
>
> > Posting John's review comment, which was sent to the review I abandoned:
> >
> > "Hmm. The behavior I think we actually want here is that we s
ahatanak added a comment.
In https://reviews.llvm.org/D29908#676589, @ahatanak wrote:
> Posting John's review comment, which was sent to the review I abandoned:
>
> "Hmm. The behavior I think we actually want here is that we should move out
> of the __block variable but not perform NRVO, essent
ahatanak added a comment.
Posting John's review comment, which was sent to the review I abandoned:
"Hmm. The behavior I think we actually want here is that we should move out of
the __block variable but not perform NRVO, essentially like we would if the
variable were a parameter.
The block by
ahatanak created this revision.
This patch disables moving a __block variable to return it from a function,
which was causing a crash that occurred when compiling and executing the
following code:
#include
#include
#include
class A {
public:
A(int x) : internal(x) {}
int