-
Notifications
You must be signed in to change notification settings - Fork 5
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
Failure rewriting static function declaration in macro #529
Comments
I'll at least try to find out why the behavior is different depending on the use of a compilation database, since I have some knowledge of LibTooling. |
@john-h-kastner Never mind, I had the wrong filename in the compilation database. Your example works for me now. |
Several things come together to cause this problem:
Thus, when we use a compilation database, 3C thinks the declarations are in different translation units and the body of the second is not associated with the first, so the first has no body and shouldn't be converted. Given the timing of the breakage and the involvement of declaration merging, we can presume that the problem started with #505, but I haven't looked into exactly what #505 changed that introduced the problem. I was already considering changing |
This error showed up in bc last night.
Reduced example:
To replicate you'll need to place this in a directory with the following compilation database (adjusted for your paths).
When you
3c util.c
you should see the definition ofmake_arg_str
rewrite correctly while the prototype in the macro is unchanged. If you ignore the compilation database with3c util.c --
conversion is correct.The text was updated successfully, but these errors were encountered: