arphaman added a comment. I don't quite understand the specific issue you're hitting, as it sounds that the logic right now should handle it:
> It seems that when the CachingFileSystem is first given a file to open that > is actually a directory, it incorrectly > caches that path to be errenous and throws an error when subsequently a > directory open >call is made for the same > path. In this case, right now (without this patch) `createFileEntry` will return `std::errc::is_a_directory`. `DependencyScanningWorkerFilesystem::openFileForRead` will then invalidate the entry in the global cache: if (CacheEntry.getError() == std::errc::is_a_directory) { // Reset the CacheEntry to avoid setting an error entry in the // cache for the given directory path. CacheEntry = CachedFileSystemEntry(); Which means that when the call to `stat` happens, it should be fine as the global cache doesn't have a valid entry, so it will be able to recognize a directory and won't return an error. Does this not happen in your case? Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D68193/new/ https://reviews.llvm.org/D68193 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits