labath added a comment.




================
Comment at: include/lldb/Interpreter/Args.h:196-197
+  llvm::ArrayRef<const char *> GetArgumentArrayRef() const {
+    return {static_cast<const char *const *>(m_argv.data()),
+            m_argv.size() - 1};
+  }
----------------
zturner wrote:
> can this be written `return makeArrayRef(m_argv).drop_back();`?
Yes, it looks like it can.


================
Comment at: source/Core/Log.cpp:74-80
+    auto cat = llvm::find_if(
+        entry.second.channel.categories,
+        [&](const Log::Category &c) { return c.name.equals_lower(category); });
     if (cat != entry.second.channel.categories.end()) {
       flags |= cat->flag;
       continue;
     }
----------------
zturner wrote:
> How about 
> 
> ```
> bool exists = llvm::any(entry.second.channel.categories,
>         [&](const Log::Category &c) { return c.name.equals_lower(category); 
> }));
> if (exists) {
>   ...
> }
> ```
That won't work, because I actually need the relevant iterator to get the 
associated flag (`flags |= cat->flag` below).


https://reviews.llvm.org/D30402



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

Reply via email to