[Lldb-commits] [PATCH] D147669: PECOFF: consume errors properly
Stefan Gränitz via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Thu Apr 13 13:07:45 PDT 2023
sgraenitz added a comment.
I think it's a very good practice that objects in moved-from state will only ever get destroyed. While the move ctor itself has no preconditions and thus might be fine to call again, the implementation of `consumeError()` does inspect the object. This adds an unnecessary risk for UB. Please simply check the log state and call either `fmt_consume()` or `consumeError()`. Thanks.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D147669/new/
https://reviews.llvm.org/D147669
More information about the lldb-commits
mailing list