This ensures ParseInputs provides a read-only access to FS.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Hmm, having looked at this it is a bit of a mess, but I think partly because we're not converting *enough* code to use this abstraction (e.g. the preamble caching stuff, or prepareCompilerInstance).
We should work how how to get the bugfix part of this landed, but I think ultimately we should rename FSprovider and avoid most direct use of VFS in clangd, it bakes in this assumption about threadign that's very hard to deal with locally.
clang-tools-extra/clangd/ClangdServer.cpp | ||
---|---|---|
184 | As a question of style, I think we should inline these wherever we're handing off a VFS to another library and we don't want to reuse it for some reason. We can shorten the names if needed to make this nice. | |
clang-tools-extra/clangd/CodeComplete.cpp | ||
1064 | can we leave a fixme to propagate this change further instead? |
Let's land this and do further refactoring/renames later.
As you mentioned, it's not possible to inline some of the cases where raw pointers are e.g. stored in structs due to lifetime issues. I expect many of these to go away once we use FSProvider more pervasively.
As a question of style, I think we should inline these wherever we're handing off a VFS to another library and we don't want to reuse it for some reason.
We can shorten the names if needed to make this nice.