repo.or.cz
/
git
/
gitster.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
worktree: simplify incompatibility message for --orphan and commit-ish
[git/gitster.git]
/
contrib
/
coccinelle
/
swap.cocci
blob
522177afb66354110b6a63a044d183c512ed1662
1
@@
2
type T;
3
identifier tmp;
4
T a, b;
5
@@
6
- T tmp = a;
7
+ T tmp;
8
+ tmp = a;
9
a = b;
10
b = tmp;
11
12
@ swap @
13
type T;
14
T tmp, a, b;
15
@@
16
- tmp = a;
17
- a = b;
18
- b = tmp;
19
+ SWAP(a, b);
20
21
@ extends swap @
22
identifier unused;
23
@@
24
{
25
...
26
- T unused;
27
... when != unused
28
}