Details
- Reviewers
sammccall - Commits
- rG60249c2c3b9e: [clangd] Only re-open files if their flags changed
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Unit tests: fail. 61795 tests passed, 1 failed and 781 were skipped.
failed: Clangd.Clangd/did-change-configuration-params.test
clang-tidy: unknown.
clang-format: pass.
Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
Unit tests: pass. 61796 tests passed, 0 failed and 781 were skipped.
clang-tidy: unknown.
clang-format: pass.
Build artifacts: diff.json, clang-format.patch, CMakeCache.txt, console-log.txt, test-results.xml
clang-tools-extra/clangd/ClangdLSPServer.cpp | ||
---|---|---|
1129 | nit: llvm::StringSet<> or DenseSet<string> are the usual type here | |
1130 | this is a clever technique. (Why not just use compilationDatabaseChanges directly? I suppose because then you have to deal more with path canonicalization?) it risks having the CDB change concurrently and reloading those files too, though. |
clang-tools-extra/clangd/ClangdLSPServer.cpp | ||
---|---|---|
1130 | Yeah I think compilationDatabaseChanges would be equivalent to what is here now, I can just swap to that. For the perma subscribe I wasn't sure of the threading. If addDocument is thread safe I think we're okay to just call Server->AddDocument from whatever thread without holding a mutex? |
Let's make the minimal change here and land this.
clang-tools-extra/clangd/ClangdLSPServer.cpp | ||
---|---|---|
1130 | ClangdServer isn't threadsafe, that's a good point.
This is the minimal change, let's do that. |
nit: llvm::StringSet<> or DenseSet<string> are the usual type here