[PATCH] D73916: [clang] Add `forceReload` clangd extension to 'textDocument/didChange'

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 10 09:37:24 PST 2020


sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.

LG, thanks! Just a nit about further simplifying the test, up to you.



================
Comment at: clang-tools-extra/clangd/unittests/TUSchedulerTests.cpp:630
+
+  auto DoUpdate = [&](std::string Contents, bool ForceRebuild,
+                      llvm::unique_function<void(std::vector<Diag>)> CB) {
----------------
this still feels just a bit obfuscated, what about more directly:

```
ParseInputs I = getInputs(Source, SourceContents);
updateWithDiags(..., I, [] { ... });
Files[Header] = ...;
updateWithDiags(...);
I.ForceRebuild = true;
updateWithDiags(...);
```


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D73916





More information about the cfe-commits mailing list