Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
- Moved assignment RemoveFile = nullptr around a bit.
- Added a comment to recreateFileIfCompileCommandChanged.
clangd/ClangdUnitStore.cpp | ||
---|---|---|
45 ↗ | (On Diff #109994) | I'd argue that having it in the code, rather than declaration makes it more readable. Besides, default ctor of shared_ptr gives us nullptr anyway, so we can also leave it as is and remove the assignments altogether. I've moved =nullptr assignments out of the if/else bodies. Let me know if it still looks ugly. |
clangd/ClangdUnitStore.h | ||
45–48 ↗ | (On Diff #109994) | Added a comment. Hopefully makes sense now. |
Also missing tests :)
clangd/ClangdUnitStore.cpp | ||
---|---|---|
45 ↗ | (On Diff #109994) | Ah, I missed that it's a smart pointer; in that case, yes, remove the = nullptr. |
clangd/ClangdUnitStore.h | ||
45–48 ↗ | (On Diff #109994) | Better, thanks. Now, why does this need to be shared_ptr (as opposed to unique_ptr)? Don't we always only have one? |
Addressed review comments.
- Added a test for forceReparse.
- Got rid of a redundant = nullptr assignment.
Done :-)
clangd/ClangdUnitStore.h | ||
---|---|---|
45–48 ↗ | (On Diff #109994) | 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. |
lg
unittests/clangd/ClangdTests.cpp | ||
---|---|---|
509–510 ↗ | (On Diff #110155) | Nit: Comment fits in one line. |