Thread (40 messages) 40 messages, 7 authors, 2017-05-02

Re: [PATCH 5/5] graph: use SWAP macro

From: Johannes Schindelin <hidden>
Date: 2017-01-30 16:23:34

Hi René,

On Sat, 28 Jan 2017, René Scharfe wrote:
Exchange the values of graph->columns and graph->new_columns using the
macro SWAP instead of hand-rolled code.  The result is shorter and
easier to read.

This transformation was not done by the semantic patch swap.cocci
because there's an unrelated statement between the second and the last
step of the exchange, so it didn't match the expected pattern.
Is it really true that Coccinelle cannot be told to look for a code block
that declares a variable that is then used *only* in the lines we want to
match and replace?

I never used the tool, and a quick web search did not clarify the picture,
either...

Ciao,
Dscho
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help