diff --git a/clang-tools-extra/clangd/DraftStore.cpp b/clang-tools-extra/clangd/DraftStore.cpp index b640f88f577324..e040d1ee93d66f 100644 --- a/clang-tools-extra/clangd/DraftStore.cpp +++ b/clang-tools-extra/clangd/DraftStore.cpp @@ -24,7 +24,7 @@ llvm::Optional DraftStore::getDraft(PathRef File) const { if (It == Drafts.end()) return None; - return It->second.Draft; + return It->second.D; } std::vector DraftStore::getActiveFiles() const { @@ -78,10 +78,10 @@ std::string DraftStore::addDraft(PathRef File, llvm::StringRef Version, std::lock_guard Lock(Mutex); auto &D = Drafts[File]; - updateVersion(D.Draft, Version); + updateVersion(D.D, Version); std::time(&D.MTime); - D.Draft.Contents = std::make_shared(Contents); - return D.Draft.Version; + D.D.Contents = std::make_shared(Contents); + return D.D.Version; } void DraftStore::removeDraft(PathRef File) { @@ -121,7 +121,7 @@ llvm::IntrusiveRefCntPtr DraftStore::asVFS() const { for (const auto &Draft : Drafts) MemFS->addFile(Draft.getKey(), Draft.getValue().MTime, std::make_unique( - Draft.getValue().Draft.Contents, Draft.getKey())); + Draft.getValue().D.Contents, Draft.getKey())); return MemFS; } } // namespace clangd diff --git a/clang-tools-extra/clangd/DraftStore.h b/clang-tools-extra/clangd/DraftStore.h index ff3056e41c293c..6b50b23995a007 100644 --- a/clang-tools-extra/clangd/DraftStore.h +++ b/clang-tools-extra/clangd/DraftStore.h @@ -52,7 +52,7 @@ class DraftStore { private: struct DraftAndTime { - Draft Draft; + Draft D; std::time_t MTime; }; mutable std::mutex Mutex;