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 trunk no longer accepts --function-arg-placeholders={false,true} #2232

Open
HighCommander4 opened this issue Nov 24, 2024 · 2 comments · May be fixed by llvm/llvm-project#121178
Open
Assignees

Comments

@HighCommander4
Copy link

This is a regression from llvm/llvm-project@18ca7ad (cc @MK-Alias)

The type of the --function-arg-placeholders command line argument was changed from bool to int, to allow the default to be an "unset" value of -1 which allows the value specified using the new ArgumentLists config option to take effect.

However, I didn't realize at the time that the the option parser for bool is more permissive than the one for int: in addition to 0 and 1, it accepts true and false (and some capitalized versions thereof).

That means there are users using a released version of clangd today who have opted to use e.g. --function-arg-placeholders=false in their clangd settings, for whom, as things currently stand, clangd will refuse to start when clangd 20 is released and they upgrade to it.

We should do something to avoid this breakage before clangd 20 is released. One idea that comes to mind is to make the option string valued so it can accept both the previously accepted values and -1.

@HighCommander4
Copy link
Author

That means there are users using a released version of clangd today who have opted to use e.g. --function-arg-placeholders=false in their clangd settings

Here is an example of this I've seen in the wild (it's actually how I discovered this regression).

@HighCommander4
Copy link
Author

Proposed fix: llvm/llvm-project#121178

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

Successfully merging a pull request may close this issue.

1 participant