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

maybeDesugar in InlayHints doesn't desugar std::vector<int*>::reference #1703

Closed
zyn0217 opened this issue Jul 18, 2023 · 3 comments
Closed
Assignees

Comments

@zyn0217
Copy link

zyn0217 commented Jul 18, 2023

In the following code,

std::vector<int *> v;
auto x = v.front(); // value_type

the hint for x should be int *& but we're still seeing value_type here.

(I should assign myself to this issue but I don't have access to it.)

@HighCommander4
Copy link

(I should assign myself to this issue but I don't have access to it.)

Done

@zyn0217
Copy link
Author

zyn0217 commented Jul 18, 2023

Thanks :-D

@zyn0217
Copy link
Author

zyn0217 commented Jul 26, 2023

zyn0217 added a commit to llvm/llvm-project that referenced this issue Aug 1, 2023
This is a follow-up to D151785, addressing clangd/clangd#1703.

The previous approach of peeling pointer types during a traversal
using getPointeeType might have produced unexpected results; since
the method would implicitly desugar the type if the type being passed
in could not be cast to a Pointer-like Type.

Reviewed By: nridge

Differential Revision: https://reviews.llvm.org/D156300
@zyn0217 zyn0217 closed this as completed Aug 1, 2023
doru1004 pushed a commit to doru1004/llvm-project that referenced this issue Aug 3, 2023
This is a follow-up to D151785, addressing clangd/clangd#1703.

The previous approach of peeling pointer types during a traversal
using getPointeeType might have produced unexpected results; since
the method would implicitly desugar the type if the type being passed
in could not be cast to a Pointer-like Type.

Reviewed By: nridge

Differential Revision: https://reviews.llvm.org/D156300
razmser pushed a commit to razmser/llvm-project that referenced this issue Sep 8, 2023
This is a follow-up to D151785, addressing clangd/clangd#1703.

The previous approach of peeling pointer types during a traversal
using getPointeeType might have produced unexpected results; since
the method would implicitly desugar the type if the type being passed
in could not be cast to a Pointer-like Type.

Reviewed By: nridge

Differential Revision: https://reviews.llvm.org/D156300
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants