[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Trying coccinelle
From: |
Aurélien Aptel |
Subject: |
Re: Trying coccinelle |
Date: |
Mon, 18 Jun 2012 21:47:34 +0200 |
On Mon, Jun 18, 2012 at 6:44 PM, Dmitry Antipov <address@hidden> wrote:
> but it seems that this tool opens a lot of other opportunities. For example,
> attached patch was
> generated with the very simple "semantic patch":
>
> @expression@
> identifier I1, I2;
> expression E1, E2;
> @@
> (
> - XVECTOR (I1)->contents[I2++] = E1
> + ASET (I1, I2, E1), I2++
> |
> - XVECTOR (I1)->contents[E1] = E2
> + ASET (I1, E1, E2)
> |
> -XVECTOR (I1)->contents[E1]
> +AREF (I1, E1)
> )
>
> and following minimal manual intervention, so I suspect that more useful
> cleanups may be done
> with this tool.
>
> Dmitry
Nice work! I was the one who posted the link to coccinelle in the
thread you mentioned. It's not the silver bullet to all problems but
it's a great tool nonetheless.
I hope your post convinced other devs to use it in emacs core when possible!
- Trying coccinelle, Dmitry Antipov, 2012/06/18
- Re: Trying coccinelle,
Aurélien Aptel <=
- Re: Trying coccinelle, Stefan Monnier, 2012/06/18
- Re: Trying coccinelle, Dmitry Antipov, 2012/06/19
- Re: Trying coccinelle, Stefan Monnier, 2012/06/19
- Re: Trying coccinelle, Dmitry Antipov, 2012/06/22
- Re: Trying coccinelle, Miles Bader, 2012/06/22
- Re: Trying coccinelle, martin rudalics, 2012/06/22
- Re: Trying coccinelle, Stefan Monnier, 2012/06/22
- Re: Trying coccinelle, Dmitry Antipov, 2012/06/24
- Re: Trying coccinelle, Stefan Monnier, 2012/06/24