[PATCH] D72777: [clangd] Dont display `<unknown>` kinds in hover board
Kadir Cetinkaya via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 16 02:47:33 PST 2020
This revision was automatically updated to reflect the committed changes.
Closed by commit rGb08e8353a89f: [clangd] Dont display `<unknown>` kinds in hover board (authored by kadircet).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D72777/new/
https://reviews.llvm.org/D72777
Files:
clang-tools-extra/clangd/Hover.cpp
clang-tools-extra/clangd/unittests/HoverTests.cpp
Index: clang-tools-extra/clangd/unittests/HoverTests.cpp
===================================================================
--- clang-tools-extra/clangd/unittests/HoverTests.cpp
+++ clang-tools-extra/clangd/unittests/HoverTests.cpp
@@ -1655,7 +1655,7 @@
HI.Kind = index::SymbolKind::Unknown;
HI.Name = "X";
},
- R"(<unknown> X)",
+ R"(X)",
},
{
[](HoverInfo &HI) {
Index: clang-tools-extra/clangd/Hover.cpp
===================================================================
--- clang-tools-extra/clangd/Hover.cpp
+++ clang-tools-extra/clangd/Hover.cpp
@@ -522,7 +522,8 @@
// 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);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D72777.238441.patch
Type: text/x-patch
Size: 1078 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20200116/2fd6bda1/attachment-0001.bin>
More information about the cfe-commits
mailing list