[Lldb-commits] [PATCH] D81058: [lldb/Interpreter] Color "error:" and "warning:" in the CommandReturnObject output.

Raphael Isemann via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Jun 3 01:03:18 PDT 2020


teemperor accepted this revision.
teemperor added a comment.
This revision is now accepted and ready to land.

That was also on my list but it seems you beat me to it. I couldn't resist some smaller nit-picks but otherwise this LGTM beside that.



================
Comment at: lldb/include/lldb/Interpreter/CommandReturnObject.h:27
 public:
-  CommandReturnObject();
+  CommandReturnObject(bool colors = false);
 
----------------
I think a documentation line like "use_colors Use colors to highlight parts of the command output" would make this more obvious (also `use_colors` would bring this in line to what we call this setting in other parts of LLDB).


================
Comment at: lldb/include/lldb/Utility/Stream.h:417
+        write(colorcode, len);
+      }
+      return *this;
----------------
Nit: This can all be `PutCString(colorcode)` (which handles the nullptr check and the strlen). Same as below.


Repository:
  rLLDB LLDB

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

https://reviews.llvm.org/D81058





More information about the lldb-commits mailing list