All of lore.kernel.org
 help / color / mirror / Atom feed
From: Markus Armbruster <armbru@redhat.com>
To: "Marc-André Lureau" <marcandre.lureau@gmail.com>
Cc: qemu trival <qemu-trivial@nongnu.org>, QEMU <qemu-devel@nongnu.org>
Subject: Re: [Qemu-devel] clang-tidy: use g_new() family of functions
Date: Tue, 05 Sep 2017 18:23:47 +0200	[thread overview]
Message-ID: <8760cxktbg.fsf@dusky.pond.sub.org> (raw)
In-Reply-To: <CAJ+F1CLAFEHjWpZpJQ_QS2VV=sjYqYpydjSe2ZEdRN-N-bhHzQ@mail.gmail.com> (=?utf-8?Q?=22Marc-Andr=C3=A9?= Lureau"'s message of "Tue, 05 Sep 2017 15:55:28 +0000")

Marc-André Lureau <marcandre.lureau@gmail.com> writes:

> Hi
>
>
>> Suggest you show us cool things you can do with clang-tidy that haven't
>> been done with Coccinelle :)
>>
> Well to do that I would have to have a transformations to do & know the
> limits/strength of coccinelle & clang-tidy, I am not there yet... Today, I
> prefer invest in clang-tidy for what I need to do.

With any luck, you'll soon enough run into something that hasn't been
done with Coccinelle.

> We already discussed some of the pros/cons of coccinelle vs tidy her and in
> the previous round-up series. For ex, clang-tidy is able to evaluate
> constant expressions, so you can write generic rules that you can't capture
> with coccinelle yet (A + B-1) / B * B:
> https://github.com/elmarco/clang-tools-extra/blob/master/clang-tidy/qemu/RoundCheck.cpp
> .
>
> However, I think it is more difficult to write clang-tidy transformation
> that spans accross various code paths (like adding errors/free/locks etc).
> Coccinelle makes that fairly easily apparently.

Fortunately, we can use both.

I'm not so fond of doing the same things with both, though :)

  reply	other threads:[~2017-09-05 16:24 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-09-05 12:14 [Qemu-devel] clang-tidy: use g_new() family of functions Marc-André Lureau
2017-09-05 12:41 ` Philippe Mathieu-Daudé
2017-09-05 12:48   ` Marc-André Lureau
2017-09-05 12:56 ` Markus Armbruster
2017-09-05 13:29   ` Marc-André Lureau
2017-09-05 15:33     ` Markus Armbruster
2017-09-05 15:55       ` Marc-André Lureau
2017-09-05 16:23         ` Markus Armbruster [this message]
2017-09-06  8:52       ` Kevin Wolf

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=8760cxktbg.fsf@dusky.pond.sub.org \
    --to=armbru@redhat.com \
    --cc=marcandre.lureau@gmail.com \
    --cc=qemu-devel@nongnu.org \
    --cc=qemu-trivial@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.