================ @@ -803,13 +819,12 @@ uint32_t StackFrameList::SetSelectedFrame(lldb_private::StackFrame *frame) { break; } } - SetDefaultFileAndLineToSelectedFrame(); - return *m_selected_frame_idx; + result = *m_selected_frame_idx; ---------------- labath wrote:
What's up with the result variable? C++ guarantees that the result will be computed before the destructors are run precisely so that code like `return protected_object->some_operation()` is safe. https://github.com/llvm/llvm-project/pull/117252 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits