[Lldb-commits] [PATCH] D108228: Fix error handling in the libcxx std::string formatter
Raphael Isemann via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 4 05:20:54 PDT 2021
teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.
In D108228#2961132 <https://reviews.llvm.org/D108228#2961132>, @jingham wrote:
> Raphael's analysis of what the test needs is right. We always check pointers for validity before we do operations on them, so we wouldn't have tried to get the summary, and the expression evaluation will just crash if we do * of a null ptr, so there wouldn't be anything to format.
>
> The reason I passed the string reference to a function and check it there is because from many years of experience, I don't trust compilers even at -O0 not to elide references to silly unused variables. But at -O0 a function argument is never going away.
>
> But if folks think this is over paranoid on my part, I can simplify the test.
I don't have a strong objection against the extra step and so on, so LGTM.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D108228/new/
https://reviews.llvm.org/D108228
More information about the lldb-commits
mailing list