The new implementation allows code completion that never waits for AST.
Details
Diff Detail
- Build Status
Buildable 8832 Build 8832: arc lint + arc unit
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 | Why the template? This is awkward now because it can only be called from ClangdServer.cpp | |
clangd/ClangdUnit.cpp | ||
887–889 | Move implementation into header | |
910 | Move implementation into header. | |
clangd/ClangdUnit.h | ||
104–108 | Typo: Providse | |
clangd/ClangdUnitStore.cpp | ||
24–25 | 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 | 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 | ||
24–25 | 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. |
Why the template? This is awkward now because it can only be called from ClangdServer.cpp