ributzka added inline comments.
================
Comment at: lib/Basic/VirtualFileSystem.cpp:1873
vfs::directory_iterator I = FS->dir_begin(State->top()->getName(), EC);
- if (EC)
+ if (EC && EC != std::errc::no_such_file_or_directory)
return *this;
----------------
bruno wrote:
> Can you add a comment explaining why you are doing it? I would prefer if we
> reset the `EC` state here than having the callers ignoring `EC` results.
If we reset the EC here, then the caller won't know that there was an issue.
The idea is that we still want the caller to check EC. It should be up to the
caller to decide how to act on this particular error.
I guess since the caller has to check for the error anyway I could even remove
this check completely and not check EC at all here.
https://reviews.llvm.org/D30768
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits