diff options
| -rw-r--r-- | clang-tools-extra/clangd/CodeComplete.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/clang-tools-extra/clangd/CodeComplete.cpp b/clang-tools-extra/clangd/CodeComplete.cpp index 4328a647f4b..2186bdee448 100644 --- a/clang-tools-extra/clangd/CodeComplete.cpp +++ b/clang-tools-extra/clangd/CodeComplete.cpp @@ -92,8 +92,10 @@ CompletionItemKind toCompletionItemKind(index::SymbolKind Kind) { case SK::Extension: case SK::Union: return CompletionItemKind::Class; - // FIXME(ioeric): figure out whether reference is the right type for aliases. case SK::TypeAlias: + // We use the same kind as the VSCode C++ extension. + // FIXME: pick a better option when we have one. + return CompletionItemKind::Interface; case SK::Using: return CompletionItemKind::Reference; case SK::Function: @@ -481,7 +483,8 @@ private: return EmptyArgs ? "()" : "($0)"; return *Snippet; // Not an arg snippet? } - if (Completion.Kind == CompletionItemKind::Reference || + // 'CompletionItemKind::Interface' matches template type aliases. + if (Completion.Kind == CompletionItemKind::Interface || Completion.Kind == CompletionItemKind::Class) { if (Snippet->front() != '<') return *Snippet; // Not an arg snippet? |

