labath accepted this revision.
labath added inline comments.
This revision is now accepted and ready to land.


================
Comment at: lldb/source/Interpreter/OptionValuePathMappings.cpp:184-185
+      // Sort and then erase in reverse so indexes are always valid
+      llvm::sort(remove_indexes.rbegin(), remove_indexes.rend());
+      for (auto index : remove_indexes)
+        m_path_mappings.Remove(index, m_notify_changes);
----------------
sorting on reverse iterators causes some head-scratching. I think it would be 
simpler to just sort normally, and then iterate in reverse (`for (int /*not 
auto*/ index: llvm::reverse(remove_indexes)) ...`)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77324/new/

https://reviews.llvm.org/D77324



_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to