[PATCH] D65704: DirectoryWatcher::create: Adding better error handling.

Jan Korous via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 5 17:15:48 PDT 2019


jkorous added a comment.

Thanks for the patch!



================
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
----------------
Could you please update the comments?


================
Comment at: clang/unittests/DirectoryWatcher/DirectoryWatcherTest.cpp:283
       /*waitForInitialSync=*/true);
+  if (!DW) return;
 
----------------
IIUC this is silently dropping errors. We should print the error here.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D65704





More information about the cfe-commits mailing list