fix(cxx_indexer): always add . to the VFS
clang's Preprocessor::LookupFile always expects FileMgr.getDirectory(".")
to succeed, so we should make sure there's a directory there.
@@ -46,6 +46,8 @@ IndexVFS::IndexVFS(const std::string& working_directory,
for (llvm::StringRef dir : virtual_dirs) {
FileRecordForPath(dir, BehaviorOnMissing::kCreateDirectory, 0);
}
+ // Clang always expects to be able to find a directory at .
+ FileRecordForPath(".", BehaviorOnMissing::kCreateDirectory, 0);
}
IndexVFS::~IndexVFS() {
