Patch to fix IRGen crash using lambda expression as value in dictionary literal
jahanian
fjahanian at apple.com
Wed Sep 17 12:10:07 PDT 2014
On Sep 16, 2014, at 5:44 PM, Reid Kleckner <rnk at google.com> wrote:
> I mean, there's got to be a way to inject some destructor cleanups into the lambda, like:
>
> struct A { ~A(); };
> int f(A) { return 42; }
> id test_dict()
> {
> return @{
> @"a": [x=f(A())]() { return x; },
> @"b": [x=f(A())]() { return x; }
> };
> }
>
> Does this change affect where ~A gets called?
>
With John’s suggested patch I sent earlier, cleanup code to effect conversion to block expression is moved to
where outer-most expression (one passed to return) is seen. So, new patch does not affect where ~A
gets called.
- fariborz
More information about the cfe-commits
mailing list