[PATCH] D31746: Remove ASTUnits for closed documents and cache CompilationDatabase per directory in clangd.

2017-04-10 Thread Krasimir Georgiev via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL299843: [clangd] Remove ASTUnits for closed documents and cache CompilationDatabase per… (authored by krasimir). Changed prior to commit: https://reviews.llvm.org/D31746?vs=94664=94665#toc Repository:

[PATCH] D31746: Remove ASTUnits for closed documents and cache CompilationDatabase per directory in clangd.

2017-04-10 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir accepted this revision. krasimir added a comment. This revision is now accepted and ready to land. Looks good! https://reviews.llvm.org/D31746 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[PATCH] D31746: Remove ASTUnits for closed documents and cache CompilationDatabase per directory in clangd.

2017-04-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked an inline comment as done. ilya-biryukov added a comment. Regarding the testing. It looks like we have two ways of testing this: 1. Add clangd-specific protocol handlers that output useful stats(i.e. currently opened documents), use those in tests. 2. Add unit tests that

[PATCH] D31746: Remove ASTUnits for closed documents and cache CompilationDatabase per directory in clangd.

2017-04-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov marked 3 inline comments as done. ilya-biryukov added a comment. Addressed the locking comments. Locking inside the request handlers looks much nicer indeed. Comment at: clangd/ASTManager.cpp:203 + // TODO(ibiryukov): at this point DocDatasLock can be unlocked

[PATCH] D31746: Remove ASTUnits for closed documents and cache CompilationDatabase per directory in clangd.

2017-04-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 94494. ilya-biryukov added a comment. Moved locking of ClangObjectLock into request handlers. https://reviews.llvm.org/D31746 Files: clangd/ASTManager.cpp clangd/ASTManager.h clangd/ClangDMain.cpp clangd/Protocol.cpp clangd/Protocol.h

[PATCH] D31746: Remove ASTUnits for closed documents and cache CompilationDatabase per directory in clangd.

2017-04-07 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov updated this revision to Diff 94492. ilya-biryukov added a comment. Minor fixes. Fixed variable name issues and comment spelling errors. https://reviews.llvm.org/D31746 Files: clangd/ASTManager.cpp clangd/ASTManager.h clangd/ClangDMain.cpp clangd/Protocol.cpp

[PATCH] D31746: Remove ASTUnits for closed documents and cache CompilationDatabase per directory in clangd.

2017-04-06 Thread Krasimir Georgiev via Phabricator via cfe-commits
krasimir added a comment. Looks great! I'm wondering, can you think of ways to test the `didClose` method similarly to how it's done for other handlers? Comment at: clangd/ASTManager.cpp:203 + // TODO(ibiryukov): at this point DocDatasLock can be unlocked in asynchronous +