Sign in
googlers
/
jrn
/
git
/
refs/heads/debian-stable
/
.
/
contrib
/
coccinelle
/
swap.cocci
blob: 522177afb66354110b6a63a044d183c512ed1662 [
file
] [
log
] [
blame
]
@@
type T
;
identifier tmp
;
T a
,
b
;
@@
-
T tmp
=
a
;
+
T tmp
;
+
tmp
=
a
;
a
=
b
;
b
=
tmp
;
@
swap
@
type T
;
T tmp
,
a
,
b
;
@@
-
tmp
=
a
;
-
a
=
b
;
-
b
=
tmp
;
+
SWAP
(
a
,
b
);
@
extends
swap
@
identifier unused
;
@@
{
...
-
T unused
;
...
when
!=
unused
}