labath added inline comments.
================ Comment at: lldb/source/Plugins/SymbolFile/DWARF/DWARFDebugInfoEntry.cpp:508-509 uint32_t block_length = form_value.Unsigned(); - frame_base->SetOpcodeData(module, debug_info_data, block_offset, - block_length); + frame_base = new (frame_base) DWARFExpression( + module, debug_info_data, cu, block_offset, block_length); } else { ---------------- clayborg wrote: > labath wrote: > > This is not the copy assignment constructor. That would be something like: > > `*frame_base = DWARFExpression(...)`. > > This code looks pretty dodgy, as you're trampling over an already > > constructed object. I'm not sure whether that in itself is UB, but it > > definitely is not a good idea. > Use move?: > ``` > *frame_base = std::move(DWARFExpression(...)); > ``` move is not needed as `DWARFExpression(...)` is a temporary. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D62425/new/ https://reviews.llvm.org/D62425 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits