[PATCH] D77309: [clangd] Get rid of ASTWorker::getCurrentFileInputs

Sam McCall via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Apr 7 03:45:23 PDT 2020


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


================
Comment at: clang-tools-extra/clangd/TUScheduler.cpp:459
   /// be consumed by clients of ASTWorker.
-  std::shared_ptr<const ParseInputs> FileInputs; /* GUARDED_BY(Mutex) */
+  ParseInputs FileInputs; /* GUARDED_BY(Mutex) */
   /// Times of recent AST rebuilds, used for UpdateDebounce computation.
----------------
this GUARDED_BY comment is a bit misleading.
I'd be more explicit here as it's a bit unusual:
// Writes and reads from unknown threads are locked.
// Reads from the worker thread are not locked as it's the only writer thread.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D77309





More information about the cfe-commits mailing list