From e9bfd22533a05fa4688c02606b3c61c08679c746 Mon Sep 17 00:00:00 2001 From: Crunkle Date: Wed, 31 Jul 2019 02:31:12 +0100 Subject: [PATCH] Use volatile filesystem (Windows) --- src/indexer.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/indexer.cc b/src/indexer.cc index 280e3c4d..29791141 100644 --- a/src/indexer.cc +++ b/src/indexer.cc @@ -1264,6 +1264,12 @@ Index(SemaManager *manager, WorkingFiles *wfiles, VFS *vfs, Clang->createFileManager(); #endif +#ifdef _WIN32 + // Always set UserFilesAreVolatile true to avoid write locks on Windows + Clang->setSourceManager(new SourceManager(Clang->getDiagnostics(), + Clang->getFileManager(), true)); +#endif + IndexParam param(*vfs, no_linkage); auto DataConsumer = std::make_shared(param);