aprantl added inline comments.

================
Comment at: lldb/include/lldb/DataFormatters/StringPrinter.h:120
+
+    bool GetHasSourceSize() const { return m_has_source_size; }
+
----------------
I don't know the LLDB rules that well: is the convention really `GetHas` 
instead of `Has`?


================
Comment at: lldb/source/DataFormatters/StringPrinter.cpp:546
 
-  if (!sourceSize) {
+  if (!options.GetHasSourceSize()) {
     sourceSize = max_size;
----------------
why unconditionally call GetSourceSize? Should we move it into the else?


================
Comment at: lldb/source/DataFormatters/StringPrinter.cpp:563
+  // an empty string ("").
+  if (!buffer_sp->GetBytes() && sourceSize != 0)
     return false;
----------------
Why call GetBytes() if sourceSize is 0? Should we reverse the two conditions?


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

https://reviews.llvm.org/D68010



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

Reply via email to