[clang] [clang-tools-extra] [lldb] [clang] Don't silently inherit the VFS from `FileManager` (PR #164323)

Qiongsi Wu via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 21 13:18:23 PDT 2025


qiongsiwu wrote:

I am seeing a trio of methods more or less called together often, but sometimes one is omitted.
```
CompilerInstance::setVirtualFileSystem
CompilerInstance::setFileManager
CompilerInstance::setSourceManager // This is sometimes omitted.
```

In what cases do we want freedom to set them separately? For example, in what cases do we want to set the VFS but not the file manager? Are there situations where if one is set, we should set the other two as well to ensure we are configuring the `CompilerInstance` consistently? 

https://github.com/llvm/llvm-project/pull/164323


More information about the cfe-commits mailing list