We want to be sure they don't cause AST rebuilds or evict items from the cache.
D77847 is going to start sending spurious no-op changes (in case the preamble
was invalidated), this is cheap enough but we shouldn't regress that in future.
Details
- Reviewers
kadircet - Commits
- rG808c2855e116: [clangd] Add tests that no-op changes are cheap
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
thanks for doing this LGTM!
clang-tools-extra/clangd/unittests/ClangdTests.cpp | ||
---|---|---|
501 | nit: std::make_tuple(arg.first(), arg.second.UsedBytes != 0, arg.second.PreambleBuilds, arg.second.ASTBuilds) == std::tie(Name, UsesMemory, PreambleBuilds, ASTBuilds); | |
clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp | ||
762 | nit: maybe we drop these noop updates except the first one. |
clang-tools-extra/clangd/unittests/ClangdTests.cpp | ||
---|---|---|
501 | Switched to tie for the trivial fields, but I don't like separating out the unnamed (first()) or nonobvious (UsedBytes!=0) things from what they're compared to. | |
clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp | ||
762 | I think that allows an implementation that always compares the compile command to the first-ever (i.e. changes to the compile command don't "stick") |
nit: