[Lldb-commits] [PATCH] D28519: Add format_provider for the Error class

Zachary Turner via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Tue Jan 10 14:43:16 PST 2017


zturner added a comment.

Technically it's backed by the error instance, so you could return a `StringRef` as long as you said that its lifetime is tied to the lifetime of the `Error` instance.  Not super unreasonable, but also not high priority.  I would vote for getting rid of c strings wherever possible, but in this case I think a `std::string` would be better.  On the other hand, as mentioned it's kind of orthogonal to this change, so for now I wouldn't worry about it at all and just leave `AsCString` alone as Greg said.


https://reviews.llvm.org/D28519





More information about the lldb-commits mailing list