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

the function pointer is itself a function argument #4290

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

guy-maurel
Copy link
Contributor

is corrected
fixes #3259

@alexhenrie
Copy link
Collaborator

alexhenrie commented May 2, 2024

This is an improvement, but it doesn't fix the problem completely. For example, sp_after_tparen_close=add transforms this input:

static int i2c_probe_address(struct i2c_adapter *adapter, int addr, int kind,
			     int (*found_proc1)(struct i2c_adapter *, int, int),
			     int (*found_proc2)(struct i2c_adapter *, int, int));

Into this output:

static int i2c_probe_address(struct i2c_adapter *adapter, int addr, int kind,
			     int (*found_proc1)(struct i2c_adapter *, int, int),
			     int (*found_proc2) (struct i2c_adapter *, int, int));

A space should be added after both (*found_proc1) and (*found_proc2), but it is only added to the second one.

@alexhenrie
Copy link
Collaborator

Thanks for fixing it! We should probably also update the test to have two function pointer arguments, like in my comment above.

@guy-maurel
Copy link
Contributor Author

we have stil a problem with the test c:00420

Copy link
Collaborator

@gmaurel gmaurel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is not ready to be merge,
see test c:00420

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 this pull request may close these issues.

sp_after_tparen_close doesn't work if function pointer is itself a function argument
3 participants