Construct SourceManager with UserFilesAreVolatile

Fix #235. Close #453

In clang, it may be worth generalizing UserFilesAreVolatile (introduced in rC160074) to FilesAreVolatile.
This commit is contained in:
Fangrui Song 2019-07-30 21:18:34 -07:00
parent af72b59d88
commit 8b0332173f

View File

@ -1263,6 +1263,8 @@ Index(SemaManager *manager, WorkingFiles *wfiles, VFS *vfs,
Clang->setVirtualFileSystem(FS);
Clang->createFileManager();
#endif
Clang->setSourceManager(new SourceManager(Clang->getDiagnostics(),
Clang->getFileManager(), true));
IndexParam param(*vfs, no_linkage);
auto DataConsumer = std::make_shared<IndexDataConsumer>(param);