This revision was automatically updated to reflect the committed changes.
Closed by commit rCTE344513: [clangd] Minimal implementation of automatic
static index (not enabled). (authored by sammccall, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D53032?vs=169694=169695#toc
ioeric accepted this revision.
ioeric added a comment.
still lgtm
Comment at: clangd/Compiler.cpp:83
+std::string getStandardResourceDir() {
+ static int Dummy; // Just an address in this process.
Maybe also revert this change?
Repository:
rCTE Clang
sammccall added inline comments.
Comment at: unittests/clangd/BackgroundIndexTests.cpp:14
+
+TEST(BackgroundIndexTest, IndexesOneFile) {
+ MockFSProvider FS;
sammccall wrote:
> ioeric wrote:
> > sammccall wrote:
> > > ioeric wrote:
> > > > sammccall wrote:
> >
sammccall updated this revision to Diff 169694.
sammccall marked an inline comment as done.
sammccall added a comment.
Address comments, strip out of clangdlspserver for now.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D53032
Files:
clangd/CMakeLists.txt
sammccall added inline comments.
Comment at: unittests/clangd/BackgroundIndexTests.cpp:14
+
+TEST(BackgroundIndexTest, IndexesOneFile) {
+ MockFSProvider FS;
ioeric wrote:
> sammccall wrote:
> > ioeric wrote:
> > > sammccall wrote:
> > > > ioeric wrote:
> > > >
ioeric added inline comments.
Comment at: unittests/clangd/BackgroundIndexTests.cpp:14
+
+TEST(BackgroundIndexTest, IndexesOneFile) {
+ MockFSProvider FS;
sammccall wrote:
> ioeric wrote:
> > sammccall wrote:
> > > ioeric wrote:
> > > > Also add a test for
sammccall added inline comments.
Comment at: unittests/clangd/BackgroundIndexTests.cpp:14
+
+TEST(BackgroundIndexTest, IndexesOneFile) {
+ MockFSProvider FS;
ioeric wrote:
> sammccall wrote:
> > ioeric wrote:
> > > Also add a test for `enqueueAll` with multiple
ioeric added inline comments.
Comment at: unittests/clangd/BackgroundIndexTests.cpp:14
+
+TEST(BackgroundIndexTest, IndexesOneFile) {
+ MockFSProvider FS;
sammccall wrote:
> ioeric wrote:
> > Also add a test for `enqueueAll` with multiple TUs ?
> Is it
sammccall added inline comments.
Comment at: unittests/clangd/BackgroundIndexTests.cpp:14
+
+TEST(BackgroundIndexTest, IndexesOneFile) {
+ MockFSProvider FS;
ioeric wrote:
> Also add a test for `enqueueAll` with multiple TUs ?
Is it important to call
ioeric accepted this revision.
ioeric added inline comments.
This revision is now accepted and ready to land.
Comment at: clangd/index/Background.cpp:51
+ std::unique_lock Lock(QueueMu);
+ assert(!HasActiveTask);
+ QueueCV.wait(Lock, [&] { return ShouldStop ||
sammccall added inline comments.
Comment at: clangd/ClangdLSPServer.h:117
+llvm::Optional CompileCommandsDir,
+std::function);
ioeric wrote:
> please document what the callback is for and how often it's called.
Documented at the callsite and in
sammccall updated this revision to Diff 169400.
sammccall added a comment.
Oops, forgot one comment.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D53032
Files:
clangd/CMakeLists.txt
clangd/ClangdLSPServer.cpp
clangd/ClangdLSPServer.h
clangd/ClangdServer.cpp
sammccall updated this revision to Diff 169399.
sammccall marked 4 inline comments as done.
sammccall added a comment.
Address comments, add tests.
Some changes (enqueue(), blockUntilIdleForTest()) to support testing.
Repository:
rCTE Clang Tools Extra
https://reviews.llvm.org/D53032
Files:
sammccall marked 6 inline comments as done.
sammccall added inline comments.
Comment at: clangd/index/Background.cpp:98
+ }
+ llvm::sys::path::native(AbsolutePath);
+
ioeric wrote:
> Why is this needed?
Removed. I copied it from the related code in
ioeric added a comment.
Looks good in general.
Comment at: clangd/ClangdLSPServer.h:117
+llvm::Optional CompileCommandsDir,
+std::function);
please document what the callback is for and how often it's called.
Comment at:
sammccall created this revision.
sammccall added a reviewer: ioeric.
Herald added subscribers: cfe-commits, jfb, kadircet, arphaman, jkorous,
MaskRay, ilya-biryukov, mgorny.
See tinyurl.com/clangd-automatic-index for design and goals.
Lots of limitations to keep this patch smallish, TODOs
16 matches
Mail list logo