[PATCH] D36398: [clangd] Check if CompileCommand has changed on forceReparse.

Ilya Biryukov via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Tue Aug 8 02:14:52 PDT 2017


ilya-biryukov marked an inline comment as done.
ilya-biryukov added a comment.

In https://reviews.llvm.org/D36398#834904, @klimek wrote:

> Also missing tests :)


Done :-)



================
Comment at: clangd/ClangdUnitStore.h:45-48
+  struct RecreateResult {
+    std::shared_ptr<CppFile> FileInCollection;
+    std::shared_ptr<CppFile> RemovedFile;
+  };
----------------
klimek wrote:
> ilya-biryukov wrote:
> > klimek wrote:
> > > Not obvious to me what things in there mean.
> > Added a comment. Hopefully makes sense now.
> Better, thanks. Now, why does this need to be shared_ptr (as opposed to unique_ptr)? Don't we always only have one?
This `CppFile` may still be referenced from the worker threads that store a pending reparse task for this file. Or there may even be an active reparse on a separate thread.


https://reviews.llvm.org/D36398





More information about the cfe-commits mailing list