forked from OSchip/llvm-project
[clangd] Dont display `<unknown>` kinds in hover board
Summary: Currently when hovering over an `auto` or `decltype` that resolve to a builtin-type, clangd would display `<unknown>` as the kind of the symbol. Drop that to make rendering nicer. Reviewers: usaxena95 Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D72777
This commit is contained in:
parent
0b21d55262
commit
b08e8353a8
|
@ -522,7 +522,8 @@ markup::Document HoverInfo::present() const {
|
|||
// level 1 and 2 headers in a huge font, see
|
||||
// https://github.com/microsoft/vscode/issues/88417 for details.
|
||||
markup::Paragraph &Header = Output.addHeading(3);
|
||||
Header.appendText(index::getSymbolKindString(Kind));
|
||||
if (Kind != index::SymbolKind::Unknown)
|
||||
Header.appendText(index::getSymbolKindString(Kind));
|
||||
assert(!Name.empty() && "hover triggered on a nameless symbol");
|
||||
Header.appendCode(Name);
|
||||
|
||||
|
|
|
@ -1655,7 +1655,7 @@ TEST(Hover, Present) {
|
|||
HI.Kind = index::SymbolKind::Unknown;
|
||||
HI.Name = "X";
|
||||
},
|
||||
R"(<unknown> X)",
|
||||
R"(X)",
|
||||
},
|
||||
{
|
||||
[](HoverInfo &HI) {
|
||||
|
|
Loading…
Reference in New Issue