[PATCH] D44408: Move DraftMgr from ClangdServer to ClangdLSPServer
Ilya Biryukov via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Mar 15 09:33:31 PDT 2018
ilya-biryukov added inline comments.
================
Comment at: clangd/ClangdLSPServer.h:78
+ /// Calls forceReparse() on all currently opened files.
+ /// As a result, this method may be very expensive.
----------------
NIT: there is no `forceReparse()` anymore, maybe remove its mention from the comment?
I.e.
```
/// Reparses all tracked documents, invalidating compile commands cache.
/// As a result, this method may be very expensive.
/// This method is normally called when the compilation database is changed.
```
================
Comment at: clangd/ClangdLSPServer.h:111
+ // Store of the current versions of the open documents.
+ DraftStore DraftMgr;
};
----------------
ClangdServer should be the last member! (see the comment above)
================
Comment at: clangd/DraftStore.h:48
mutable std::mutex Mutex;
- llvm::StringMap<VersionedDraft> Drafts;
+ llvm::StringMap<llvm::Optional<std::string>> Drafts;
};
----------------
No need for `Optional`s here anymore. Maybe store `std::string` and `erase` on `removeDraft`?
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D44408
More information about the cfe-commits
mailing list