[PATCH] D131385: [clangd] Support for standard type hierarchy

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Aug 8 02:28:01 PDT 2022


kadircet created this revision.
kadircet added a reviewer: usaxena95.
Herald added a subscriber: arphaman.
Herald added a project: All.
kadircet requested review of this revision.
Herald added subscribers: cfe-commits, MaskRay, ilya-biryukov.
Herald added a project: clang-tools-extra.

This is mostly a mechanical change to adapt standard type hierarchy
support proposed in LSP 3.17 on top of clangd's existing extension support.

This does mainly two things:

- Incorporate symbolids for all the parents inside resolution parameters, so that they can be retrieved from index later on. This is a new code path, as extension always resolved them eagerly.
- Propogate parent information when resolving children, so that at least one branch of parents is always preserved. This is to address a shortcoming in the extension.

This doesn't drop support for the extension, but it's deprecated from now on and
will be deleted in upcoming releases. Currently we use the same struct
internally but don't serialize extra fields.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D131385

Files:
  clang-tools-extra/clangd/ClangdLSPServer.cpp
  clang-tools-extra/clangd/ClangdLSPServer.h
  clang-tools-extra/clangd/ClangdServer.cpp
  clang-tools-extra/clangd/ClangdServer.h
  clang-tools-extra/clangd/Protocol.cpp
  clang-tools-extra/clangd/Protocol.h
  clang-tools-extra/clangd/XRefs.cpp
  clang-tools-extra/clangd/XRefs.h
  clang-tools-extra/clangd/test/initialize-params.test
  clang-tools-extra/clangd/test/type-hierarchy-ext.test
  clang-tools-extra/clangd/test/type-hierarchy.test
  clang-tools-extra/clangd/unittests/TypeHierarchyTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D131385.450738.patch
Type: text/x-patch
Size: 64978 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20220808/054f19ee/attachment-0001.bin>


More information about the cfe-commits mailing list