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 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits