[VFS] Ignore broken symlinks in the directory iterator.
The VFS directory iterator and recursive directory iterator behave differently from the LLVM counterparts. Once the VFS iterators hit a broken symlink they immediately abort. The LLVM counterparts allow to recover from this issue by clearing the error code and skipping to the next entry. This change adds the same functionality to the VFS iterators. There should be no change in current behavior in the current CLANG source base, because all clients have loop exit conditions that also check the error code. This fixes rdar://problem/30934619. Differential Revision: https://reviews.llvm.org/D30768 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@297510 91177308-0d34-0410-b5e6-96231b3b80d8
Showing
- include/clang/Basic/VirtualFileSystem.h 1 addition, 1 deletioninclude/clang/Basic/VirtualFileSystem.h
- lib/Basic/VirtualFileSystem.cpp 2 additions, 5 deletionslib/Basic/VirtualFileSystem.cpp
- unittests/Basic/VirtualFileSystemTest.cpp 83 additions, 0 deletionsunittests/Basic/VirtualFileSystemTest.cpp
Loading
Please register or sign in to comment