[PATCH] D52308: [Sema][CodeCompletion] Fix return type of C++ destructors in code completion
Sam McCall via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Sep 20 09:17:50 PDT 2018
sammccall added a comment.
In https://reviews.llvm.org/D52308#1240680, @jkorous wrote:
> Sorry my bad. You are right, we aren't showing destructors in clangd for normal classes. The case where I noticed is kind of a corner case with template class.
>
> {"jsonrpc":"2.0","id":0,"method":"initialize","params":{"processId":123,"rootPath":"clangd","capabilities":{},"trace":"off"}}
> ---
> {"jsonrpc":"2.0","method":"textDocument/didOpen","params":{"textDocument":{"uri":"test:///main.cpp","languageId":"cpp","version":1,"text":"template<class T> struct foo {}; template<> struct foo<bool> {}; foo<long>::~"}}}
> ---
> {"jsonrpc":"2.0","id":1,"method":"textDocument/completion","params":{"textDocument":{"uri":"test:///main.cpp"},"position":{"line":0,"character":76}}}
>
>
>
>
> {
> "detail": "void",
> "filterText": "~foo",
> "insertText": "~foo",
> "insertTextFormat": 1,
> "kind": 2,
> "label": " ~foo()",
> "sortText": "3f2ccccc~foo",
> "textEdit": {
> "newText": "~foo",
> "range": {
> "end": {
> "character": 76,
> "line": 0
> },
> "start": {
> "character": 76,
> "line": 0
> }
> }
> }
> },
>
Indeed, this looks like a bug to me.
Repository:
rC Clang
https://reviews.llvm.org/D52308
More information about the cfe-commits
mailing list