The new implementation allows code completion that never waits for AST.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I also want to rename ClangdUnit and ClangdUnitStore accordingly, but will do that in a separate commit so that git-svn correctly detects the renames (i.e. don't want file contents changes).
clangd/ClangdServer.h | ||
---|---|---|
113 ↗ | (On Diff #109063) | Why the template? This is awkward now because it can only be called from ClangdServer.cpp |
clangd/ClangdUnit.cpp | ||
887–889 ↗ | (On Diff #109063) | Move implementation into header |
910 ↗ | (On Diff #109063) | Move implementation into header. |
clangd/ClangdUnit.h | ||
104 ↗ | (On Diff #109063) | Typo: Providse |
clangd/ClangdUnitStore.cpp | ||
22 ↗ | (On Diff #109063) | Not introduced in this commit, but this is equivalent to OpenedFiles.erase(File) without the find and check. |
Addressed review comments.
- Moved implementations of template function to header.
- Fixed a typo.
clangd/ClangdServer.h | ||
---|---|---|
113 ↗ | (On Diff #109063) | Storing std::futures with std::async(std::launch::deferred, ... makes things easier than storing std::function, as that allows to move into the caller(std::function must be copyable). I actually think that the signature itself is not that bad, but the fact that definition is only available in .cpp file is wrong. I've moved definintions to header. |
clangd/ClangdUnitStore.cpp | ||
22 ↗ | (On Diff #109063) | The code has changed a bit after initial submission. It returns removed element now and there seems to be no equivalent in StringMap for that. |