[PATCH] D109865: [NFC] `goto fail` has failed us in the past...

2021-09-21 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. In D109865#3014106 , @beanz wrote: > I was talking with @lhames the other day about building a `doWithCleanup` > abstraction that could take a labmda to perform and a lambda to cleanup on > failure. > > I was thinking I may tak

[PATCH] D109865: [NFC] `goto fail` has failed us in the past...

2021-09-21 Thread Chris Bieneman via Phabricator via cfe-commits
beanz added a subscriber: lhames. beanz added a comment. I was talking with @lhames the other day about building a `doWithCleanup` abstraction that could take a labmda to perform and a lambda to cleanup on failure. I was thinking I may take a stab at that this week. Repository: rG LLVM Gith

[PATCH] D109865: [NFC] `goto fail` has failed us in the past...

2021-09-21 Thread David Blaikie via Phabricator via cfe-commits
dblaikie added a comment. (A possibly more robust option - so that this doesn't regress if someone adds a new "return true" codepath & forgets to release the cleanup (it looks like a pretty long function with several exits, etc) - would be to move the code into an "impl" function and have the o

[PATCH] D109865: [NFC] `goto fail` has failed us in the past...

2021-09-21 Thread Chris Bieneman via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rG744ec74b305a: [NFC] `goto fail` has failed us in the past... (authored by beanz). Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109865/new/ https://reviews.

[PATCH] D109865: [NFC] `goto fail` has failed us in the past...

2021-09-21 Thread Benjamin Kramer via Phabricator via cfe-commits
bkramer accepted this revision. bkramer added a comment. This revision is now accepted and ready to land. Looks good, thanks Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D109865/new/ https://reviews.llvm.org/D109865 ___

[PATCH] D109865: [NFC] `goto fail` has failed us in the past...

2021-09-15 Thread Chris Bieneman via Phabricator via cfe-commits
beanz created this revision. beanz added reviewers: rsmith, harlanhaskins, bkramer. beanz requested review of this revision. Herald added a project: clang. This patch replaces reliance on `goto failure` pattern with `llvm::scope_exit`. Repository: rG LLVM Github Monorepo https://reviews.llvm.