[Lldb-commits] [PATCH] D53759: [PDB] Support PDB-backed expressions evaluation
Pavel Labath via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Tue Nov 27 07:36:26 PST 2018
labath added inline comments.
================
Comment at: source/Core/RichManglingContext.cpp:134-135
get<CPlusPlusLanguage::MethodName>(m_cxx_method_parser)->GetBasename();
+ if (!m_buffer.data())
+ m_buffer = llvm::StringRef("", 0);
return;
----------------
Why is this necessary? It looks like somebody is misusing the returned StringRef by assuming that it always points to at least a single valid byte (which is definitely not the case in general, even for StringRefs with a non-null `data()`).
It would be better to fix the caller instead.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D53759/new/
https://reviews.llvm.org/D53759
More information about the lldb-commits
mailing list