Sign in
googlers
/
jrn
/
git
/
5dc73662976e81de19a5b3a76f4733962f541df5
/
.
/
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
}