qustion mark transformation
The following semantic patch does not work:
@@
type T;
identifier x;
@@
-T x;
... when != x
?- x = 0;
... when != x
This can be seen with the following example:
static int synth_field_string_size(char *type)
{
char *start;
start = strstr(type, "char[");
}
The problem is that the ? matches the matched thing or nothing. The second when should be in the other branch.