[PATCH] D48940: [clangd] Wait for first preamble before code completion

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 9 03:48:49 PDT 2018


ilya-biryukov added a comment.

In https://reviews.llvm.org/D48940#1152750, @sammccall wrote:

> Possible test: add a file with complicated preamble (billion laughs?) and immediately schedule 5 preamble actions. They should all get a non-null preamble and the pointers should all be the same.


The most trivial test that updates a file and immediately schedules a few preamble actions failed without this change for me. I have added it to the patch.



================
Comment at: clangd/TUScheduler.cpp:408
 
+void ASTWorker::waitForFirstPreamble() const {
+  PreambleWasBuilt.wait();
----------------
sammccall wrote:
> inline? should fit on one line...
This is used in TUScheduler, where we don't have access to the fields of ASTWorker.


Repository:
  rCTE Clang Tools Extra

https://reviews.llvm.org/D48940





More information about the cfe-commits mailing list