[PATCH] D34269: [clangd] Add "Go to Declaration" functionality

2017-06-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov accepted this revision. ilya-biryukov added a comment. This revision is now accepted and ready to land. LGTM https://reviews.llvm.org/D34269 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/

[PATCH] D34269: [clangd] Add "Go to Declaration" functionality

2017-06-28 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson updated this revision to Diff 104413. malaperle-ericsson added a comment. Remove use of unique_ptr https://reviews.llvm.org/D34269 Files: clangd/CMakeLists.txt clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h clangd/ClangdUnit.cpp clangd/Cl

[PATCH] D34269: [clangd] Add "Go to Declaration" functionality

2017-06-28 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added inline comments. Comment at: clangd/ClangdUnit.cpp:276 +class DeclarationLocationsFinder : public index::IndexDataConsumer { + std::unique_ptr> DeclarationLocations; + const SourceLocation &SearchedLocation; malaperle-ericsson wrote: > malap

[PATCH] D34269: [clangd] Add "Go to Declaration" functionality

2017-06-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson added inline comments. Comment at: clangd/ClangdUnit.cpp:276 +class DeclarationLocationsFinder : public index::IndexDataConsumer { + std::unique_ptr> DeclarationLocations; + const SourceLocation &SearchedLocation; malaperle-ericsson wrote: >

[PATCH] D34269: [clangd] Add "Go to Declaration" functionality

2017-06-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson added inline comments. Comment at: clangd/ClangdUnit.cpp:276 +class DeclarationLocationsFinder : public index::IndexDataConsumer { + std::unique_ptr> DeclarationLocations; + const SourceLocation &SearchedLocation; ilya-biryukov wrote: > Why d

[PATCH] D34269: [clangd] Add "Go to Declaration" functionality

2017-06-21 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Looks good now, but I think we definitely need to change `unique_ptr>` to `vector` before submitting it. I won't be available until next Wednesday, so feel free to submit without my final approval. Comment at: clangd/ClangdUnit.cpp:276 +class D

[PATCH] D34269: [clangd] Add "Go to Declaration" functionality

2017-06-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson added inline comments. Comment at: clangd/ClangdUnit.cpp:303 + // fo|o -> foo| good! + if (InputLocation == SourceLocationBeg && Pos.character > 0) { +SourceLocation PeekBeforeLocation = Unit->getLocation(FE, Pos.line + 1, ilya-biryukov

[PATCH] D34269: [clangd] Add "Go to Declaration" functionality

2017-06-21 Thread Marc-Andre Laperle via Phabricator via cfe-commits
malaperle-ericsson updated this revision to Diff 103405. malaperle-ericsson marked 12 inline comments as done. malaperle-ericsson added a comment. Address comments https://reviews.llvm.org/D34269 Files: clangd/CMakeLists.txt clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/Clan

[PATCH] D34269: [clangd] Add "Go to Declaration" functionality

2017-06-16 Thread Ilya Biryukov via Phabricator via cfe-commits
ilya-biryukov added a comment. Hi @malaperle-ericsson. Thanks for the patch. IndexingAction has a very simple interface, exactly what clangd needs and nothing more. BTW, we had a bug open for that: https://bugs.llvm.org/show_bug.cgi?id=33261, feel free to reassign to yourself. =