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

Inlay hint filtering is incorrect when there is a newline after the ( #9606

Closed
sean-mcmanus opened this issue Jul 20, 2022 · 5 comments
Closed
Assignees
Labels
bug Feature: Inlay Hint An issue related to inlay hints for declarations and parameters. fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix Works in VS So we'd need to fix it for VS Code to reach parity.
Milestone

Comments

@sean-mcmanus
Copy link
Collaborator

sean-mcmanus commented Jul 20, 2022

Environment

  • OS and Version:
  • VS Code Version:
  • C/C++ Extension Version:
  • Other extensions you installed (and if the issue persists after disabling them):
  • If using SSH remote, specify OS of remote machine:
  • A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc).

Bug Summary and Steps to Reproduce

A function call with a newline after the ( isn't getting the inlay hint hiding parsed correctly.
image
the first param "i" should be filtering out as a match.

Expected behavior

No response

Code sample and Logs

void func(int i, int j) {}

void func2()
{
    int i, j;
    func(
        i,
        j
    );
}

Screenshots

No response

Additional context

No response

@sean-mcmanus sean-mcmanus added bug Language Service quick fix Feature: Inlay Hint An issue related to inlay hints for declarations and parameters. labels Jul 20, 2022
@sean-mcmanus sean-mcmanus added this to the 1.11 milestone Jul 20, 2022
@sean-mcmanus sean-mcmanus self-assigned this Jul 20, 2022
@sean-mcmanus sean-mcmanus changed the title Inlay hint filtering is incorrect when there is whitespace after the ( Inlay hint filtering is incorrect when there is a newline after the ( Jul 20, 2022
@michelleangela
Copy link
Contributor

michelleangela commented Jul 20, 2022

This also reproduces on VS.

Sample code:

int volume(const int depth, const int width, const int height)
{
	return width * height;
}

void test()
{
	int a = 0;
	a = volume(5 /*depth*/, 4 /*width*/, 3);
	a = volume( 5 /*depth*/, 4 /*width*/, 3);
	a = volume(  5 /*depth*/, 4 /*width*/, 3);
	a = volume(   5 /*depth*/, 4 /*width*/, 3);
	a = volume(
				    5 /*depth*/,
			   4 /*width*/,
				3);
}

@sean-mcmanus sean-mcmanus modified the milestones: 1.11, 1.12.0 Jul 21, 2022
@sean-mcmanus
Copy link
Collaborator Author

sean-mcmanus commented Jul 21, 2022

@michelleangela I'm not reproing the bug in VS -- are you using the latest dogfood version and the "hide" settings?

image

@sean-mcmanus sean-mcmanus added the Works in VS So we'd need to fix it for VS Code to reach parity. label Jul 21, 2022
@michelleangela
Copy link
Contributor

michelleangela commented Jul 21, 2022

There needs to be three or more spaces before the 5 in a = volume( 5 /*depth*/, 4 /*width*/, 3);

@sean-mcmanus
Copy link
Collaborator Author

Yeah, I repro that now, strange that it only repros after there's 3 or more spaces and how the 5th case that comes after it (and my original repro cases) doesn't repro in VS but repros in VS Code.

@sean-mcmanus sean-mcmanus added the fixed Check the Milestone for the release in which the fix is or will be available. label Jul 22, 2022
@sean-mcmanus
Copy link
Collaborator Author

Fixed with 1.12.0 (pre-release): https://github.com/microsoft/vscode-cpptools/releases/tag/v1.12.0

@github-actions github-actions bot locked and limited conversation to collaborators Sep 12, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Feature: Inlay Hint An issue related to inlay hints for declarations and parameters. fixed Check the Milestone for the release in which the fix is or will be available. Language Service quick fix Works in VS So we'd need to fix it for VS Code to reach parity.
Projects
None yet
Development

No branches or pull requests

2 participants