plotfi marked 3 inline comments as done. plotfi added inline comments.
================ Comment at: clang/include/clang/DirectoryWatcher/DirectoryWatcher.h:102 /// Returns nullptr if \param Path doesn't exist or isn't a directory. /// Returns nullptr if OS kernel API told us we can't start watching. In such ---------------- jkorous wrote: > Could you please update the comments? Ahh, Yes. ================ Comment at: clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp:283 /*waitForInitialSync=*/true); + if (!DW) return; ---------------- jkorous wrote: > jkorous wrote: > > IIUC this is silently dropping errors. We should print the error here. > Ah, my bad - I just took a better look at `Expected<>` and you're right. Nah, the way llvm::Expected works is that if the error isn't consumed then it will blow up in the destructor. So if it is an error, returning will cause the destructor to crash the program and print the error implicitly. Very nice error handling mechanism you ask me :-) Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D65704/new/ https://reviews.llvm.org/D65704 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits