[PATCH] LLDB formatter for llvm::Optional

Enrico Granata egranata at apple.com
Fri Jan 23 11:05:15 PST 2015


> On Jan 23, 2015, at 10:56 AM, Justin Bogner <mail at justinbogner.com> wrote:
> 
> <lldb-optional-formatter.patch>


Without much awareness of the implementation details of llvm::Optional, this storage.Cast worries me a little bit
SBValue::Cast() is a sharp and dangerous tool
It is not the moral equivalent of a language cast; it pretty simply replaces the type of the data leaving it exactly intact - so your mileage may vary with it

It looks like here it would work, because this is a correctly-sized buffer and you really just want to swap the SBType, but I would test with more than int to make sure

Thanks,
- Enrico
📩 egranata@.com ☎️ 27683




-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150123/8efb1e3b/attachment.html>


More information about the llvm-commits mailing list