[Lldb-commits] [PATCH] D152846: [lldb][NFCI] Remove custom matcher classes in Listener in favor of lambdas

Med Ismail Bennani via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jun 13 12:55:54 PDT 2023


mib added inline comments.


================
Comment at: lldb/source/Utility/Listener.cpp:214
   } else {
-    pos = std::find_if(m_events.begin(), m_events.end(),
-                       EventMatcher(broadcaster, event_type_mask));
+    pos = std::find_if(m_events.begin(), m_events.end(), event_matcher);
   }
----------------
Since you used `llvm::erased_it` above, could you use `llvm::find_if` here as well to stay consistent. It will also make this line shorter since you can just pass the container instead of passing the beginning and ending iterators.


================
Comment at: lldb/source/Utility/Listener.cpp:372
+    iter =
+        std::find_if(m_broadcaster_managers.begin(), end_iter, manager_matcher);
     if (iter == end_iter)
----------------
ditto


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D152846



More information about the lldb-commits mailing list