[PATCH] D57388: [clangd] Implement textDocument/declaration from LSP 3.14

2019-02-01 Thread Sam McCall via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rCTE352864: [clangd] Implement textDocument/declaration from LSP 3.14 (authored by sammccall, committed by ). Changed prior to commit: https://reviews.llvm.org/D57388?vs=184710&id=184718#toc Repository:

[PATCH] D57388: [clangd] Implement textDocument/declaration from LSP 3.14

2019-02-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall marked 2 inline comments as done. sammccall added inline comments. Comment at: clangd/XRefs.cpp:38 + // Only a single declaration is allowed. + if (isa(D)) // except cases above +return D; hokein wrote: > sammccall wrote: > > hokein wrote: > > > i

[PATCH] D57388: [clangd] Implement textDocument/declaration from LSP 3.14

2019-02-01 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 184710. sammccall added a comment. address review comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57388/new/ https://reviews.llvm.org/D57388 Files: clangd/ClangdLSPServer.cpp clangd/ClangdLSPServer

[PATCH] D57388: [clangd] Implement textDocument/declaration from LSP 3.14

2019-02-01 Thread Haojian Wu via Phabricator via cfe-commits
hokein accepted this revision. hokein added inline comments. This revision is now accepted and ready to land. Comment at: clangd/XRefs.cpp:38 + // Only a single declaration is allowed. + if (isa(D)) // except cases above +return D; sammccall wrote: > hokein

[PATCH] D57388: [clangd] Implement textDocument/declaration from LSP 3.14

2019-01-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 184678. sammccall marked 7 inline comments as done. sammccall added a comment. Herald added a project: clang. Address review comments Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57388/new/ https://reviews.ll

[PATCH] D57388: [clangd] Implement textDocument/declaration from LSP 3.14

2019-01-31 Thread Sam McCall via Phabricator via cfe-commits
sammccall added inline comments. Comment at: clangd/ClangdLSPServer.cpp:332 }}, +{"declarationProvider", true}, {"definitionProvider", true}, hokein wrote: > I believe missing this is a LSP protocol bug, vscode uses this ter

[PATCH] D57388: [clangd] Implement textDocument/declaration from LSP 3.14

2019-01-30 Thread Haojian Wu via Phabricator via cfe-commits
hokein added a comment. Looks good overall, most are nits. > textDocument/definition now returns a definition if one is found, otherwise > the declaration. It no longer returns declaration + definition if they are > distinct. > textDocument/declaration returns the best declaration we can find.

[PATCH] D57388: [clangd] Implement textDocument/declaration from LSP 3.14

2019-01-29 Thread Sam McCall via Phabricator via cfe-commits
sammccall updated this revision to Diff 184096. sammccall added a comment. Add server capability declarationProvider. Technically an extension, but that's probably just a protocol bug. Repository: rCTE Clang Tools Extra CHANGES SINCE LAST ACTION https://reviews.llvm.org/D57388/new/ https:/

[PATCH] D57388: [clangd] Implement textDocument/declaration from LSP 3.14

2019-01-29 Thread Sam McCall via Phabricator via cfe-commits
sammccall created this revision. sammccall added a reviewer: hokein. Herald added subscribers: cfe-commits, kadircet, arphaman, jkorous, MaskRay, ioeric, javed.absar, ilya-biryukov. LSP now reflects the declaration/definition distinction. Language server changes: - textDocument/definition now r