In the case where there is:
l: return;
at the end of a function, are you sure that you really want to replace the
return by ;? I'm not sure that it is really an improvement...
One could replace jumps to such labels by direct returned but perhaps the
goto was added because there might be a need for more interesting code at
the end of the function in the future.
In any case, here is my current suggestion, which does convert l: return;
to l: ;
x@
position p;
@@
return@p;
@@
position x.p;
@@
- return@p;
+ RETURN;
@exists@
identifier f;
identifier l;
@@
f(...) {
...
l:
- RETURN
;
}
@exists@
identifier f;
@@
f(...) {
...
- RETURN;
}
@@
@@
- RETURN;
+ return;
julia
_______________________________________________
Cocci mailing list
[email protected]
https://systeme.lip6.fr/mailman/listinfo/cocci