[PATCH] D42640: [clangd] Prototype: collect symbol #include & insert #include in global code completion.

2018-02-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the comments! Sorry that I didn't clean up the code before sending out the prototype. I planned to deal with code structure and style issues after getting some early feedback, but I think the patch is ready for review now. Comment at:

[PATCH] D42640: [clangd] Prototype: collect symbol #include & insert #include in global code completion.

2018-02-08 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 133411. ioeric marked 13 inline comments as done. ioeric added a comment. - Added tests for all components; more cleanup; s/IncludeURI/IncludeHeader/ Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42640 Files: clangd/CMakeLists.txt

[PATCH] D42640: [clangd] Prototype: collect symbol #include & insert #include in global code completion.

2018-02-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 133203. ioeric added a comment. - Merge with origin/master Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42640 Files: clangd/CMakeLists.txt clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp clangd/ClangdServer.h

[PATCH] D42640: [clangd] Prototype: collect symbol #include & insert #include in global code completion.

2018-02-07 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 133202. ioeric added a comment. - Added tests for IncludeURI and CanonicalIncludes and minor cleanup. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42640 Files: clangd/CMakeLists.txt clangd/ClangdLSPServer.cpp clangd/ClangdServer.cpp

[PATCH] D42640: [clangd] Prototype: collect symbol #include & insert #include in global code completion.

2018-02-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the comments! I have addressed comments in the symbol collect side (I think?). Will add tests in a followup patch. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D42640 ___ cfe-commits mailing

[PATCH] D42640: [clangd] Prototype: collect symbol #include & insert #include in global code completion.

2018-02-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric added a comment. Thanks for the comments! I addressed comments in the symbol collect part (I think?). Will add tests in a followup patch. Comment at: clangd/index/HeaderMapCollector.h:48 + // A map from header patterns to header names. + // The header names are not

[PATCH] D42640: [clangd] Prototype: collect symbol #include & insert #include in global code completion.

2018-02-06 Thread Eric Liu via Phabricator via cfe-commits
ioeric updated this revision to Diff 133021. ioeric marked 10 inline comments as done. ioeric added a comment. - Merge with origin/master - Renamed and moved a bunch files according to review comments. - Merge remote-tracking branch 'origin/master' into include - Half way - Merge with uri

[PATCH] D42640: [clangd] Prototype: collect symbol #include & insert #include in global code completion.

2018-02-05 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/ClangdServer.cpp:418 + } else { +auto U = URI::parse(HeaderUri); +if (!U) Pull out a function to compute ToInclude from a uri/abspath? Comment at: clangd/ClangdServer.cpp:425 + +

[PATCH] D42640: [clangd] Prototype: collect symbol #include & insert #include in global code completion.

2018-02-02 Thread Sam McCall via Phabricator via cfe-commits
sammccall added a comment. TL;DR: - I think we can expose fewer types/abstractions in the header mapping, and put it all in one header. If we want some functionality to be global-index only, we should make it an option to the symbolcollector, not stash the logic somewhere else I think. -

[PATCH] D42640: [clangd] Prototype: collect symbol #include & insert #include in global code completion.

2018-01-29 Thread Eric Liu via Phabricator via cfe-commits
ioeric created this revision. Herald added subscribers: cfe-commits, hintonda, jkorous-apple, ilya-biryukov, mgorny, klimek. o Collect suitable #include paths for index symbols. This also does smart mapping for STL symbols and IWYU pragma. o For global code completion, add a command for