Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clangd shows redundant return types on some special members #252

Closed
ilya-biryukov opened this issue Jan 13, 2020 · 2 comments
Closed

Clangd shows redundant return types on some special members #252

ilya-biryukov opened this issue Jan 13, 2020 · 2 comments
Assignees
Labels
bug

Comments

@ilya-biryukov
Copy link

@ilya-biryukov ilya-biryukov commented Jan 13, 2020

Steps to reproduce:

  1. Hover over the out-of-line definitions in the following example:
struct X {
  X();
  ~X();
  operator int();
};

// Here are the definitions
X::X() {}
X::operator int() {}
X::~X() {}

Expected: the hover does not show return types.
Actual: the hover shows return type.

@sam-mccall
Copy link
Member

@sam-mccall sam-mccall commented Jan 21, 2020

Yeah, we debated this a bit for code complete but there's no question we're showing decls here rather than expressions. This seems clearcut.

@sam-mccall sam-mccall added the bug label Jan 21, 2020
@kadircet
Copy link
Member

@kadircet kadircet commented Jan 21, 2020

Oops that one somehow slipped away, thanks for bumping it up.
https://reviews.llvm.org/D73110

kadircet added a commit to llvm/llvm-project that referenced this issue Jan 27, 2020
Summary:
Some names, e.g. constructor/destructor/conversions, already contain
the type info, no need to duplicate them in the hoverinfo.

Fixes clangd/clangd#252

Reviewers: sammccall, ilya-biryukov

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

Tags: #clang

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

(cherry picked from commit 1fbb1d6)
arichardson added a commit to arichardson/llvm-project that referenced this issue Apr 1, 2020
Summary:
Some names, e.g. constructor/destructor/conversions, already contain
the type info, no need to duplicate them in the hoverinfo.

Fixes clangd/clangd#252

Reviewers: sammccall, ilya-biryukov

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

Tags: #clang

Differential Revision: https://reviews.llvm.org/D73110
shrouxm pushed a commit to sourcegraph/lsif-clang that referenced this issue Jul 12, 2020
Summary:
Some names, e.g. constructor/destructor/conversions, already contain
the type info, no need to duplicate them in the hoverinfo.

Fixes clangd/clangd#252

Reviewers: sammccall, ilya-biryukov

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

Tags: #clang

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

(cherry picked from commit 1fbb1d6df0113ca341f6d257bc72e07343dd861a)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
3 participants