[PATCH] D72623: [clangd] Rearrange type, returntype and parameters in hover card

Kadir Cetinkaya via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon Jan 13 08:31:26 PST 2020


kadircet created this revision.
kadircet added reviewers: sammccall, ilya-biryukov.
Herald added subscribers: cfe-commits, usaxena95, arphaman, jkorous, MaskRay.
Herald added a project: clang.

Moves type/returntype into its own line as it is more readable in cases
where the type is long.

Also gives parameter lists a heading, `Parameters:` to make them stand out.

Leaves the `right arrow` instead of `Returns: ` before Return Type to make
output more symmetric.

  function foo
  
  Returns: ret_type
  Parameters:
  - int x

vs

  function foo
  
  🡺 ret_type
  Parameters:
  - int x


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D72623

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72623.237689.patch
Type: text/x-patch
Size: 3495 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200113/28052e09/attachment.bin>


More information about the cfe-commits mailing list