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

David Goldman via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Feb 10 10:23:11 PST 2020


dgoldman marked 2 inline comments as done.
dgoldman added inline comments.


================
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) {
----------------
sammccall wrote:
> 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(...);
> ```
still needed to recreate ParseInputs but done


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