[all-commits] [llvm/llvm-project] 257559: [clangd] Function return type hints: support lambd...

Sam McCall via All-commits all-commits at lists.llvm.org
Sat Feb 26 12:36:15 PST 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 257559ed9ab74c2dd3882075c45b4ae002256425
      https://github.com/llvm/llvm-project/commit/257559ed9ab74c2dd3882075c45b4ae002256425
  Author: Sam McCall <sam.mccall at gmail.com>
  Date:   2022-02-26 (Sat, 26 Feb 2022)

  Changed paths:
    M clang-tools-extra/clangd/InlayHints.cpp
    M clang-tools-extra/clangd/unittests/InlayHintTests.cpp

  Log Message:
  -----------
  [clangd] Function return type hints: support lambdas, don't duplicate "->"

While here, fix an ugliness:
  auto foo()->auto { return 42; }
This (silly) code gains a "-> int" hint. While correct and useful, it renders as
  auto foo()->int->auto { return 42; }
which is confusing enough to do more harm than good I think.

Differential Revision: https://reviews.llvm.org/D120416




More information about the All-commits mailing list