OSDN Git Service

[clangd][Hover] Change arrow in return type back to →
authorKadir Cetinkaya <kadircet@google.com>
Fri, 24 Jan 2020 10:35:24 +0000 (11:35 +0100)
committerKadir Cetinkaya <kadircet@google.com>
Fri, 24 Jan 2020 12:05:21 +0000 (13:05 +0100)
Summary:
Currently 🡺 is used in hover response to represent return types, but it
is not widely available. Changing this back to original to support more clients.

Reviewers: sammccall

Subscribers: ilya-biryukov, MaskRay, jkorous, arphaman, usaxena95, cfe-commits

Tags: #clang

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

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

index 1b7a487..26b6cf4 100644 (file)
@@ -546,11 +546,11 @@ markup::Document HoverInfo::present() const {
   // editor, as they might be long.
   if (ReturnType) {
     // For functions we display signature in a list form, e.g.:
-    // 🡺 `x`
+    //  `x`
     // Parameters:
     // - `bool param1`
     // - `int param2 = 5`
-    Output.addParagraph().appendText("🡺").appendCode(*ReturnType);
+    Output.addParagraph().appendText("").appendCode(*ReturnType);
     if (Parameters && !Parameters->empty()) {
       Output.addParagraph().appendText("Parameters:");
       markup::BulletList &L = Output.addBulletList();
index 79f7a01..ec8d048 100644 (file)
@@ -9,7 +9,7 @@
 # CHECK-NEXT:  "result": {\r
 # CHECK-NEXT:    "contents": {\r
 # CHECK-NEXT:      "kind": "plaintext",\r
-# CHECK-NEXT:      "value": "function foo\n\n🡺 void\n\nvoid foo()"\r
+# CHECK-NEXT:      "value": "function foo\n\n void\n\nvoid foo()"\r
 # CHECK-NEXT:    },\r
 # CHECK-NEXT:    "range": {\r
 # CHECK-NEXT:      "end": {\r
index 87dd056..bb14ede 100644 (file)
@@ -1744,7 +1744,7 @@ template <typename T, typename C = bool> class Foo {})",
           },
           R"(function foo
 
-🡺 ret_type
+ ret_type
 Parameters:
 - 
 - type