[PATCH] D78658: [clang][Frontend] Add missing error handling
David Blaikie via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Oct 13 12:31:48 PDT 2020
dblaikie added a comment.
In D78658#2327615 <https://reviews.llvm.org/D78658#2327615>, @LemonBoy wrote:
>> Perhaps this'd be more robust with ScopeExit?
>
> Not really, `OnError` is not executed when/if the function succeeds.
Ah, sorry - ScopeExit has a 'release()' function intended to disengage it/disable the execution of the payload.
The use would often look something like:
auto x = make_scope_exit(...);
if (failed())
return fail;
if (failed())
return fail;
x.release();
return success;
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78658/new/
https://reviews.llvm.org/D78658
More information about the cfe-commits
mailing list