[Lldb-commits] [PATCH] D122461: [lldb] Add a fuzzer for target create
Jonas Devlieghere via Phabricator via lldb-commits
lldb-commits at lists.llvm.org
Fri Mar 25 09:06:42 PDT 2022
JDevlieghere marked an inline comment as done.
JDevlieghere added inline comments.
================
Comment at: lldb/tools/lldb-fuzzer/lldb-fuzzer-target.cpp:24
+extern "C" int LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
+ auto file = TempFile::Create(data, size);
+ if (!file)
----------------
labath wrote:
> Not an ideal use of auto -- it's clear that this returns some form of TempFile, but if this were say Expected<TempFile>, then the code would be incorrect (but still compile).
Agreed. Originally I was returning a `llvm::Expected<std::unqique_ptr<TempFile>>` but the inability to create a temp file isn't all that interesting and without the expected the logic can be a lot simpler.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D122461/new/
https://reviews.llvm.org/D122461
More information about the lldb-commits
mailing list