Sign in
qemu-android
/
qemu-android
/
41b9dc407ed4157b7e5b2caab871ff22d51a549b
/
.
/
scripts
/
coccinelle
/
return_directly.cocci
blob: 48680f2c2a73b073caa9180c163c73b6bea34d2e [
file
] [
log
] [
blame
]
// replace 'R = X; return R;' with 'return R;'
@@
identifier VAR
;
expression E
;
type T
;
identifier F
;
@@
T F
(...)
{
...
-
T VAR
;
...
when
!=
VAR
-
VAR
=
+
return
E
;
-
return
VAR
;
...
when
!=
VAR
}