[PATCH] D97548: [clangd] Introduce client state invalidation

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Mar 3 21:27:26 PST 2021


sammccall accepted this revision.
sammccall added inline comments.
This revision is now accepted and ready to land.


================
Comment at: clang-tools-extra/clangd/ClangdServer.h:78
+
+    /// Called when server triggers a state change without client requesting it.
+    /// For example a preamble build, which might happen on its own,
----------------
I think "state change", "client information" and "requesting it" might be a bit too vague.
Some ideas to take or leave...

"onSemanticsMaybeChanged"

Called when the meaning of a source code may have changed without an edit.
Usually clients assume that responses to requests are valid until they next
edit the file. If they're invalidated at other times, we should tell the client.
In particular, when an asynchronous preamble build finishes, we can provide
more accurate semantic tokens, so we should tell the client to refresh.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D97548/new/

https://reviews.llvm.org/D97548



More information about the cfe-commits mailing list