sgraenitz added inline comments.
================ Comment at: unittests/Demangle/PartialDemangleTest.cpp:188 + size_t N = OriginalSize; + char *Res = D.getFunctionName(Buf, &N); + EXPECT_EQ(nullptr, Res); ---------------- erik.pilkington wrote: > Does LLDB actually pass in a N that is less than the length of Buf? Its not > wrong to do that per se, realloc will sort it out, but it seems kinda strange. My first version used only one variable for N, so the pretended buffer size was decreasing continuously while the actual buffer remained unchanged.. That caused unnecessary allocations. I fixed that a few days ago. Basically it's these three cases to consider: https://github.com/llvm-mirror/lldb/blob/a063373af4d295e48017ca218d1030aac13b0af5/source/Core/RichManglingContext.cpp#L91 Repository: rL LLVM https://reviews.llvm.org/D50473 _______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits