[PATCH] D116659: [llvm][clang][vfs] NFC: Simplify directory iteration

2022-01-13 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a comment. In D116659#3241727 , @benlangmuir wrote: >> I don't know, I'm a bit skeptical we want to make it so easy to ignore >> errors so easily. I'd rather require clients to explicitly ignore the error. > > That's my gut feeling too.

[PATCH] D116659: [llvm][clang][vfs] NFC: Simplify directory iteration

2022-01-13 Thread Ben Langmuir via Phabricator via cfe-commits
benlangmuir added a comment. > I don't know, I'm a bit skeptical we want to make it so easy to ignore errors > so easily. I'd rather require clients to explicitly ignore the error. That's my gut feeling too. I suspect a bunch of this code should be explicitly ignoring `ENOENT`, but not ignoring

[PATCH] D116659: [llvm][clang][vfs] NFC: Simplify directory iteration

2022-01-13 Thread Duncan P. N. Exon Smith via Phabricator via cfe-commits
dexonsmith added a subscriber: benlangmuir. dexonsmith added a comment. In D116659#3237061 , @jansvoboda11 wrote: > I agree that introducing new iterator and implementing `iterator_range<...> > FileSystem::dir_range()` is better solution than a macro. >

[PATCH] D116659: [llvm][clang][vfs] NFC: Simplify directory iteration

2022-01-12 Thread Jan Svoboda via Phabricator via cfe-commits
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