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

_______________________________________________
lldb-commits mailing list
lldb-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits

Reply via email to