xiaobai added inline comments.

Comment at: source/Breakpoint/BreakpointSiteList.cpp:191
   if (lower != m_bp_site_list.begin()) {
-    collection::const_iterator prev_pos = lower;
-    prev_pos--;
+    auto prev_pos = std::prev(lower);
     const BreakpointSiteSP &prev_bp = (*prev_pos).second;
tatyana-krasnukha wrote:
> xiaobai wrote:
> > If `m_bp_site_list` is empty, `prev_pos` could be `m_bp_site_list.end()`, I 
> > believe, so you would have to check for that here. This is assuming that 
> > this method can be invoked when `m_bp_site_list` is empty, which I'm not 
> > entirely sure about. 
> If m_bp_site_list is empty, lower  == begin() and we never fall in this code, 
> isn't it?
Oh, I think you're correct here. I forgot to account for that, apologies for 
the noise.


lldb-commits mailing list

Reply via email to