[clangd] Add decl/def support to SymbolDetails
authorDavid Goldman <davg@google.com>
Mon, 18 Jul 2022 20:32:59 +0000 (16:32 -0400)
committerDavid Goldman <davg@google.com>
Mon, 1 Aug 2022 18:42:19 +0000 (14:42 -0400)
commit61ef0ab70196bfdc4c301e12384aa91938b15cc4
tree08e2902e33b900621b977f0d3f3e1e920808758f
parent2d9eae41524641e1f57a19916bd53f964be7f6ec
[clangd] Add decl/def support to SymbolDetails

Add an optional declarationRange and definitionRange to SymbolDetails.

This will allow SourceKit-LSP to implement toggling between goto
definition/declaration based on whether the symbol at the cursor
is a definition or declaration.

Differential Revision: https://reviews.llvm.org/D130041
clang-tools-extra/clangd/AST.cpp
clang-tools-extra/clangd/Protocol.cpp
clang-tools-extra/clangd/Protocol.h
clang-tools-extra/clangd/XRefs.cpp
clang-tools-extra/clangd/test/symbol-info.test
clang-tools-extra/clangd/unittests/SymbolInfoTests.cpp