kadircet added a comment. should we also have a unittest for checking ast caching works as expected?
ClangdServer::getUsedBytesPerFile should allow us to do that. We can set cache size to one, send 3 updates in respective order to foo, bar and baz, we record usedbytesperfile. Then we perform adddocument with same contents to foo and bar and check usedbytesperfile are still the same? ================ Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:575 + {"change", (int)TextDocumentSyncKind::Incremental}, + {"save", true}, + }}, ---------------- spec also specifies this as `property name (optional): textDocumentSync.didSave` near didSave notification (in addition to defining it as `save` in the struct). :( it also says textDocumentSync can also be a number for backward compat reasons, but doesn't say when the struct was added. I hope it is not recent and we don't end up breaking clients with our capab response :/ no action needed just complaining ... ================ Comment at: clang-tools-extra/clangd/ClangdLSPServer.cpp:1587 // Reparse only opened files that were modified. for (const Path &FilePath : DraftMgr.getActiveFiles()) + if (Filter(FilePath)) ---------------- nit: while here, braces and early exit. ``` for (..) { if(!Filter()) continue; if(auto draft...) server->AddDoc(); } ``` Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https://reviews.llvm.org/D77847/new/ https://reviews.llvm.org/D77847 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits