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:
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
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
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
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
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
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.
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:/
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