summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target
diff options
context:
space:
mode:
authorSam McCall <sam.mccall@gmail.com>2019-02-01 11:26:13 +0000
committerSam McCall <sam.mccall@gmail.com>2019-02-01 11:26:13 +0000
commit866ba2c9249f463a9989f2c8c5bbf717d74547c9 (patch)
treea9fcd15eddffbb4e34e7d9c044905d6b046df56a /llvm/lib/Target
parentb34fca6b476abb94c765b10a238bf2d0e716d9d2 (diff)
downloadbcm5719-llvm-866ba2c9249f463a9989f2c8c5bbf717d74547c9.tar.gz
bcm5719-llvm-866ba2c9249f463a9989f2c8c5bbf717d74547c9.zip
[clangd] Implement textDocument/declaration from LSP 3.14
Summary: LSP now reflects the declaration/definition distinction. Language server changes: - 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. - For macros, the active macro definition is returned for both methods. - For include directive, the top of the target file is returned for both. There doesn't appear to be a discovery mechanism (we can't return everything to clients that only know about definition), so this changes existing behavior. In practice, it should greatly reduce the fraction of the time we need to show the user a menu of options. C++ API changes: - findDefinitions is replaced by locateSymbolAt, which returns a vector<LocatedSymbol> - one for each symbol under the cursor. - this contains the preferred declaration, the definition (if found), and the symbol name This API enables some potentially-neat extensions, like swapping between decl and def, and exposing the symbol name to the UI in the case of multiple symbols. Reviewers: hokein Subscribers: ilya-biryukov, javed.absar, ioeric, MaskRay, jkorous, arphaman, kadircet, cfe-commits Differential Revision: https://reviews.llvm.org/D57388 llvm-svn: 352864
Diffstat (limited to 'llvm/lib/Target')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud