[Lldb-commits] [PATCH] D68010: [lldb] Fix string summary of an empty NSPathStore2
Adrian Prantl via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Wed Sep 25 09:44:53 PDT 2019
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
More information about the lldb-commits
mailing list