[all-commits] [llvm/llvm-project] ec64d1: [clangd] Add desugared type to hover

lh123 via All-commits all-commits at lists.llvm.org
Tue Dec 7 21:28:56 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ec64d10340daacb066ab1bbf6356727062a8236f
      https://github.com/llvm/llvm-project/commit/ec64d10340daacb066ab1bbf6356727062a8236f
  Author: lh123 <1585086582 at qq.com>
  Date:   2021-12-08 (Wed, 08 Dec 2021)

  Changed paths:
    M clang-tools-extra/clangd/Hover.cpp
    M clang-tools-extra/clangd/Hover.h
    M clang-tools-extra/clangd/unittests/HoverTests.cpp
    M clang/include/clang/AST/ASTDiagnostic.h
    M clang/lib/AST/ASTDiagnostic.cpp

  Log Message:
  -----------
  [clangd] Add desugared type to hover

Add desugared type to hover when the desugared type and the pretty-printed type are different.

```c++
template<typename T>
struct TestHover {
  using Type = T;
};

int main() {
  TestHover<int>::Type a;
}
```

```
variable a

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

Reviewed By: sammccall

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




More information about the All-commits mailing list