I ran across an interesting code formatting issue when doing some
cleanups using spatch. If code has function arguments aligned, and a
semantic patch modifies the first line such that the first argument no
longer starts in the same column, the remaining arguments will no longer
line up with the first.
For instance:
if ((num = gen->mb_parse_list_num))
- new_list = (ParseInfo *) Xrealloc(gen->mb_parse_list,
+ new_list = Xrealloc(gen->mb_parse_list,
(num + 2) * sizeof(ParseInfo));
This seems non-trivial to fix. Nonetheless, I thought I'd report it as
an interesting problem that might otherwise necessitate manual editing
after applying a semantic patch.
(This coding style in general seems like a bad idea, primarily because
it means more lines will have to change than really need to; however,
that doesn't stop people from using it. :) )
- Josh Triplett
_______________________________________________
Cocci mailing list
[email protected]
http://lists.diku.dk/mailman/listinfo/cocci
(Web access from inside DIKUs LAN only)