[Lldb-commits] [PATCH] D53759: [PDB] Support PDB-backed expressions evaluation

Aleksandr Urakov via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Wed Nov 28 00:20:33 PST 2018


aleksandr.urakov marked 2 inline comments as done.
aleksandr.urakov 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;
----------------
labath wrote:
> 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.
Yes, you are right. This change was made much time ago, I've fixed in this way the same problem, which Aaron have fixed in D52626, and have forgot to remove this. Thanks for pointing to this!


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

https://reviews.llvm.org/D53759





More information about the lldb-commits mailing list