-
-
Notifications
You must be signed in to change notification settings - Fork 114
Fix prototype callback generation if direct reference is used #191
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
Conversation
✅ Build completed. ⬇️ Build URL: ℹ️ To test this build:
|
From the commit messages and testcase it is not entirely clear to me what kind of code this is actually catering for. Could you perhaps expand on that (and probably update the commit message as well for future reference)? |
This is actually a fix for the forward declaration generator; when guessing where to insert the declarations, it searches for function pointers in the form Recalling arduino/arduino-cli#1944, we can't even diagnostic these kind of problems because the prototype is generated, but too late. |
Fixes arduino#206 The sample code from the issue provided a smart way to cheat the dumb FP parser. In fact, the & is referred to the return type (correct) but the comparator doesn't know about semantics and simply prepends the ampersand before searching for the match. So the code matches itself, which makes absolutely no sense. Avoiding this occurrence fixes the issue, however the entire code for prototype line insertion should be refactored in a saner way (see arduino#180 and arduino#191 for another problem)
b73c990
to
99a0fa5
Compare
the tag will be searched only if its signature is void and it's not being skipped for other reasons
99a0fa5
to
4a7df6b
Compare
✅ Build completed. ⬇️ Build URL: ℹ️ To test this build:
|
Fixes #180
Should be refactored when merging #190