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