[Lldb-commits] [PATCH] D59911: Don't abort() in lldb_assert and document why.

Davide Italiano via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Mar 28 15:05:52 PDT 2019


davide added a comment.

In D59911#1446787 <https://reviews.llvm.org/D59911#1446787>, @aprantl wrote:

> Thanks for summarizing your thoughts, Davide.
>
> I think that what you wrote is a much better explanation of what I was trying to say with
>
>   Use these sparingly and only if error handling is not otherwise feasible.
>
>
> I think that unless we can eliminate all uses of lldb_assert() from the code we should document it, but discourage its use. Do you have any suggestions for a better wording?


I do personally believe that your wording is reasonable. If it was me, I would just be a little stronger and say that new code should never use lldbassert, and if you're touching existing code you might consider replacing it with proper error handling.
I would also like to thank you personally for clarifying this whole situation. I am also responsible for using carelessly lldbassert in some places of the codebase, but your doc was good to make me think about it (and why to not use), and I guess it would be very useful for others as well [including new contributors].


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D59911/new/

https://reviews.llvm.org/D59911





More information about the lldb-commits mailing list