[PATCH] D31746: Remove ASTUnits for closed documents and cache CompilationDatabase per directory in clangd.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Apr 7 01:58:14 PDT 2017


ilya-biryukov marked 3 inline comments as done.
ilya-biryukov added a comment.

Addressed the locking comments. Locking inside the request handlers looks much nicer indeed.



================
Comment at: clangd/ASTManager.cpp:203
+  // TODO(ibiryukov): at this point DocDatasLock can be unlocked in asynchronous
+  // mode
 
----------------
krasimir wrote:
> Why not make the locking explicit here and don't require `handleRequest` and `parseFileAndPublishDiagnostics` to be called under a lock?
Good point, my initial attempt was aimed at avoiding locking when RunSynchronously is true. But that's not a very useful constraint.


https://reviews.llvm.org/D31746





More information about the cfe-commits mailing list