[PATCH] D18618: [ObjC] Pop all cleanups created in CodeGenFunction::EmitObjCForCollectionStmt

John McCall via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 30 17:13:21 PDT 2016


rjmccall added a comment.

If multiple cleanups can be entered, the appropriate thing to do is enter a RunCleanupsScope of some sort and then pop it at the right time.  But you should find out why the cleanup is being entered — it's possible that it's not being properly bound to a full-expression, in which case cleaning it up at the end of the collection is inappropriate, because it actually needs to be cleaned up before the loop body is ever entered.


http://reviews.llvm.org/D18618





More information about the cfe-commits mailing list