[PATCH] ARC + collection literal fix

John McCall rjmccall at apple.com
Wed Apr 3 17:24:29 PDT 2013


On Mar 30, 2013, at 8:59 AM, Jesse Rusak <me at jesserusak.com> wrote:
> I've put together a tiny patch which fixes a potential early release in collection literals under ARC, based on our conversation from cfe-dev: http://lists.cs.uiuc.edu/pipermail/cfe-dev/2013-March/028527.html
> 
> The patch uses the machinery you added for the @clang.arc.use call, and adds some checks for the presence of that call in the existing Objective-C literal tests. 

Thanks!  I've committed it as r178721.

I fleshed out the test case quite a bit and discovered that you were (1) double-emitting the key expressions in dictionary literals and (2) emitting the key expression yet again instead of the object expression.  It's unfortunate that the existing test wasn't precise enough to catch this, but now it should be.

John.



More information about the cfe-commits mailing list