Skip to content

[clangd] Completion key ArgumentLists doesn't take precedence over --function-arg-placeholders #135919

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

Open
tongshengw opened this issue Apr 16, 2025 · 2 comments
Labels

Comments

@tongshengw
Copy link
Contributor

tongshengw commented Apr 16, 2025

Thank you Clangd team for this incredible piece of software.

Quite a minor issue:

It seems that ArgumentLists should take precedence over --function-arg-placeholders as suggested in:
#63565 (comment)

ArgumentLists does not take precedence at the moment.

I was using ArgumentLists : "None" with --function-arg-placeholders=0, and function parenthesis generated. Removing --function-arg-placeholders=0 fixes this issue.

Expected behaviour:

ArgumentLists: "None" used with --function-arg-placeholders=0 prioritises ArgumentLists:"None".

clangd version 21.0.0git (https://github.com/llvm/llvm-project.git 2206e15)
Features: mac+debug+xpc
Platform: arm64-apple-darwin24.4.0

Would be great to know if this is intended behaviour or a bug. I will attempt to fix this if it is not intended behaviour.

Thanks! :)

@llvmbot
Copy link
Member

llvmbot commented Apr 16, 2025

@llvm/issue-subscribers-clangd

Author: Tongsheng Wu (tongshengw)

Thank you Clangd team for this incredible piece of software.

Quite a minor issue:

It seems that ArgumentLists should take precedence over --function-arg-placeholders as suggested in:
#63565 (comment)

ArgumentLists does not take precedence at the moment.

I was using ArgumentLists : "None" with --function-arg-placeholders=0, and function parenthesis generated. Removing --function-arg-placeholders=0 fixes this issue.

Expected behaviour:

ArgumentLists: "None" used with --function-arg-placeholders=0 prioritises ArgumentLists:"None".

clangd version 21.0.0git (https://github.com/llvm/llvm-project.git 2206e15)
Features: mac+debug+xpc
Platform: arm64-apple-darwin24.4.0

Would be great to know if this is intended behaviour or a bug. I will attempt to fix this if it is not intended behaviour.

Thanks! :)

@HighCommander4
Copy link
Collaborator

ArgumentLists does not take precedence at the moment.

[...]

Would be great to know if this is intended behaviour or a bug.

It was my hope, at the time of writing the comment you linked to, that ArgumentLists would take precedence over --function-arg-placeholders.

However, during the review of the patch, we discovered that this is not how existing flags which are present both on the command line and the config file, such as --background-index, work.

So, for consistency, we changed course and let --function-arg-placeholders take precedence.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants