-
Notifications
You must be signed in to change notification settings - Fork 597
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
parser for FuncDecl incorrectly sets declname attribute on return type #99
Comments
Thanks for the report. Would you like to try your hand at fixing this? |
I'll try and dig at it a bit this week, but no promises. Thanks for the quick response. |
Is this definitely a bug? Generally TypeDecls associated with declarators have the identifier's name associated with them in the declname, and the CGenerator uses that. Casts use abstract declarators, which is why taking the return type off the function and putting it straight into a cast doesn't work. I think the correct way to achieve what you're trying to do is to create a new TypeDecl representing an abstract declarator (i.e. doesn't have a declname) for your cast, something like:
This gives the expected output: |
…tribute on return type
Steps to reproduce in the examples folder running python interpreter.
The text was updated successfully, but these errors were encountered: