[PATCH] D114522: [clangd] Add canonical type to hover

liu hui via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 24 03:21:12 PST 2021


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

Add canonical type to hover when the canonical type and the pretty-printed type are not the same.

  c++
  template<typename T>
  struct TestHover {
    using Type = T;
  };
  
  int main() {
    TestHover<int>::Type a;
  }

---

**variable a**

Type: TestHover<int>::Type (aka 'int')


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D114522

Files:
  clang-tools-extra/clangd/Hover.cpp
  clang-tools-extra/clangd/Hover.h
  clang-tools-extra/clangd/unittests/HoverTests.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D114522.389448.patch
Type: text/x-patch
Size: 38931 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211124/fc76d422/attachment-0001.bin>


More information about the cfe-commits mailing list