[Lldb-commits] [PATCH] D67239: [Core] Remove use of ClangASTContext in DumpDataExtractor

Alex Langford via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Thu Sep 5 15:35:26 PDT 2019


xiaobai added a comment.

Hmm, good question. If you call `GetAPInt` with a `byte_size` of 0, it should assert when trying to read 0 bytes with the `DataExtractor`. In the worst case, it gives you a broken APInt. I think guarded the call to `GetAPInt` to protect against this, but I think that it would also be a good idea to make `GetAPInt` return `llvm::None` in that case.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D67239





More information about the lldb-commits mailing list