[Lldb-commits] [lldb] [lldb][NFC] Avoid an assertion failure in dwim-print (PR #139197)
Michael Buch via lldb-commits
lldb-commits at lists.llvm.org
Fri May 9 02:07:14 PDT 2025
================
@@ -185,9 +185,8 @@ void RenderDiagnosticDetails(Stream &stream,
// Work through each detail in reverse order using the vector/stack.
bool did_print = false;
- for (auto detail = remaining_details.rbegin();
- detail != remaining_details.rend();
- ++detail, remaining_details.pop_back()) {
+ for (; !remaining_details.empty(); remaining_details.pop_back()) {
+ auto &detail = remaining_details.back();
----------------
Michael137 wrote:
```suggestion
const auto &detail = remaining_details.back();
```
?
https://github.com/llvm/llvm-project/pull/139197
More information about the lldb-commits
mailing list