-
-
Notifications
You must be signed in to change notification settings - Fork 240
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
Declaration of multiple variables is handled incorrectly #500
Comments
Hello @leg0, thanks for reporting this! That's an issue in global scope only. The three variables all have the same source location. Hence there are three rewrites for the same location. As a result, only the last rewrite survives. I'm unsure how to fix this without tracking the variables, which I'm not particularly eager to do. I plan to switch to a transformation at the TU level, which would solve this issue automatically. What I'm trying to say is that it can take a while until I fix this issue. Andreas |
This change introduces a `TranslationUnit` handler, replacing the previous matchers. The advantage is that _all_ statements are processed, not only the ones where an exact match exists. The new approach fixes #376, #500, and #588. There is one disadvantage: for primary templates, some code is not reproduced as written. This causes one compile issue.
This change introduces a `TranslationUnit` handler, replacing the previous matchers. The advantage is that _all_ statements are processed, not only the ones where an exact match exists. The new approach fixes #376, #500, and #588. There is one disadvantage: for primary templates, some code is not reproduced as written. This causes one compile issue.
This change introduces a `TranslationUnit` handler, replacing the previous matchers. The advantage is that _all_ statements are processed, not only the ones where an exact match exists. The new approach fixes #376, #500, and #588. There is one disadvantage: for primary templates, some code is not reproduced as written. This causes one compile issue.
Input:
int a,b,c;
Output:
int c;
Expecting to see all variable declarations in the output.
The text was updated successfully, but these errors were encountered: