jansvoboda11 added a comment.

I agree that introducing new iterator and implementing `iterator_range<...> 
FileSystem::dir_range()` is better solution than a macro.

I'm not sure the `dir_range` function needs to take an `std::error_code` 
out-param though. The error code is only used to stop the iteration, clients 
don't use it for any other purpose. I think the new iterator could handle error 
codes completely internally (by advancing to the end), providing better 
ergonomics. WDYT?

I might create a follow-up patches for //recursive// VFS-based iteration and 
also enable range-based for loops in code using `llvm::sys::fs` instead of the 
VFS.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D116659

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
  • [PATCH] D116659: [... Jan Svoboda via Phabricator via cfe-commits

Reply via email to