repo.or.cz
/
qemu
/
ar7.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
target/sh4: only save flags state at the end of the TB
[qemu/ar7.git]
/
scripts
/
coccinelle
/
return_directly.cocci
blob
48680f2c2a73b073caa9180c163c73b6bea34d2e
1
// replace 'R = X; return R;' with 'return R;'
2
@@
3
identifier VAR;
4
expression E;
5
type T;
6
identifier F;
7
@@
8
T F(...)
9
{
10
...
11
- T VAR;
12
... when != VAR
13
14
- VAR =
15
+ return
16
E;
17
- return VAR;
18
... when != VAR
19
}