[PATCH] D52979: [clangd] Add removeFile interface in FileIndex.

2018-10-11 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/index/FileIndex.h:78 + /// Remove all index data associated with the file \p Path. + void removeFile(PathRef Path); + ioeric wrote: > hokein wrote: > > ioeric wrote: > > > should we use this somewhere? E.g. when

[PATCH] D52979: [clangd] Add removeFile interface in FileIndex.

2018-10-11 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/FileIndex.h:78 + /// Remove all index data associated with the file \p Path. + void removeFile(PathRef Path); + hokein wrote: > ioeric wrote: > > should we use this somewhere? E.g. when file is closed in Cl

[PATCH] D52979: [clangd] Add removeFile interface in FileIndex.

2018-10-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein added inline comments. Comment at: clangd/index/FileIndex.h:78 + /// Remove all index data associated with the file \p Path. + void removeFile(PathRef Path); + ioeric wrote: > should we use this somewhere? E.g. when file is closed in ClangdServer? Yes, t

[PATCH] D52979: [clangd] Add removeFile interface in FileIndex.

2018-10-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric added inline comments. Comment at: clangd/index/FileIndex.h:78 + /// Remove all index data associated with the file \p Path. + void removeFile(PathRef Path); + should we use this somewhere? E.g. when file is closed in ClangdServer? Repository: rCTE C

[PATCH] D52979: [clangd] Add removeFile interface in FileIndex.

2018-10-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein updated this revision to Diff 168638. hokein added a comment. clang-format. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D52979 Files: clangd/index/FileIndex.cpp clangd/index/FileIndex.h unittests/clangd/FileIndexTests.cpp Index: unittests/clangd/FileIndexTests.

[PATCH] D52979: [clangd] Add removeFile interface in FileIndex.

2018-10-08 Thread Haojian Wu via Phabricator via cfe-commits
hokein created this revision. hokein added reviewers: ioeric, sammccall. Herald added subscribers: kadircet, arphaman, jkorous, MaskRay, ilya-biryukov. Currently we don't cleanup dynamic index if a file is closed in clangd, which may result in large memory consumption in clangd (if we open many fi