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



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

Reply via email to