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

Jan Svoboda via cfe-commits cfe-commits at lists.llvm.org
Tue Oct 21 15:56:17 PDT 2025


jansvoboda11 wrote:

You can set these separately based on your needs. If you look at `cc1_main()`, it only sets the VFS, but not the `FileManger`. There are situations, where the `FileManager` is set later, for example when loading an `ASTUnit`. Similarly, `SourceManager` is not always needed - it's set even later in `FrontendAction::BeginSourceFile()`. The only rule is that you need to set them up in order, but where you stop depends on your tool's needs. This was the case even before this PR.

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


More information about the cfe-commits mailing list