sammccall accepted this revision.
sammccall added a comment.
This revision is now accepted and ready to land.
Nice fix!
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.
================
Comment at: clangd/TUScheduler.cpp:408
+void ASTWorker::waitForFirstPreamble() const {
+ PreambleWasBuilt.wait();
----------------
inline? should fit on one line...
================
Comment at: clangd/TUScheduler.h:104
/// source code from headers.
+ /// However, Action will be scheduled to run after the first rebuild of the
+ /// preamble for the corresponding file finishes. Note that the rebuild can
----------------
Not sure what "however" is contrasting with.
Could be just: "If there's no preamble yet (because the file was just opened),
we'll wait for it to build. The preamble may still be null if it fails to build
or is empty."
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D48940
_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits