@ swap_with_declaration @ 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 }
Name | Type | Size | Permission | Actions |
---|---|---|---|---|
README | File | 129 B | 0644 |
|
array.cocci | File | 777 B | 0644 |
|
free.cocci | File | 146 B | 0644 |
|
object_id.cocci | File | 1.31 KB | 0644 |
|
qsort.cocci | File | 610 B | 0644 |
|
strbuf.cocci | File | 445 B | 0644 |
|
swap.cocci | File | 280 B | 0644 |
|
xstrdup_or_null.cocci | File | 161 B | 0644 |
|