[PATCH] D32029: [ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt

2017-04-14 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300340: [ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt [takeā€¦ (authored by kuba.brecka). Changed prior to commit: https://reviews.llvm.org/D32029?vs=95271=95313#toc

[PATCH] D32029: [ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt

2017-04-14 Thread John McCall via Phabricator via cfe-commits
rjmccall added a comment. Those test changes are smaller than I thought they might be; great. https://reviews.llvm.org/D32029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D32029: [ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt

2017-04-13 Thread Kuba (Brecka) Mracek via Phabricator via cfe-commits
kubamracek updated this revision to Diff 95271. kubamracek added a comment. Trying a different approach: Keeping the loop variable alive for the whole loop by extending ForScope and registering the cleanup function inside EmitAutoVarAlloca. https://reviews.llvm.org/D32029 Files:

[PATCH] D32029: [ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt

2017-04-13 Thread Kuba (Brecka) Mracek via Phabricator via cfe-commits
kubamracek reopened this revision. kubamracek added a comment. This revision is now accepted and ready to land. Reverted because this fails for-in.m by crashing the compiler when compiling: void t2(NSArray *array) { for (NSArray *array in array) { // expected-warning {{collection

[PATCH] D32029: [ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt

2017-04-13 Thread Phabricator via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL300287: [ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt (authored by kuba.brecka). Changed prior to commit: https://reviews.llvm.org/D32029?vs=95157=95251#toc Repository:

[PATCH] D32029: [ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt

2017-04-13 Thread John McCall via Phabricator via cfe-commits
rjmccall accepted this revision. rjmccall added a comment. This revision is now accepted and ready to land. Yes, looks good to me. Repository: rL LLVM https://reviews.llvm.org/D32029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32029: [ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt

2017-04-13 Thread Kuba (Brecka) Mracek via Phabricator via cfe-commits
kubamracek added a comment. Note that C++ foreach loops also generate lifetime.start and lifetime.end inside of the loop body. Repository: rL LLVM https://reviews.llvm.org/D32029 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D32029: [ObjC] Fix lifetime markers of loop variable in EmitObjCForCollectionStmt

2017-04-13 Thread Kuba (Brecka) Mracek via Phabricator via cfe-commits
kubamracek created this revision. kubamracek added a project: Sanitizers. CodeGenFunction::EmitObjCForCollectionStmt currently emits lifetime markers for the loop variable in an inconsistent way: `lifetime.start` is emitted before the loop is entered, but `lifetime.end` is emitted inside the