qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: "Marc-André Lureau" <marcandre.lureau@gmail.com>
To: Markus Armbruster <armbru@redhat.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 15:55:28 +0000	[thread overview]
Message-ID: <CAJ+F1CLAFEHjWpZpJQ_QS2VV=sjYqYpydjSe2ZEdRN-N-bhHzQ@mail.gmail.com> (raw)
In-Reply-To: <87fuc1ma7d.fsf@dusky.pond.sub.org>

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.

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.
-- 
Marc-André Lureau

  reply	other threads:[~2017-09-05 15:56 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 [this message]
2017-09-05 16:23         ` Markus Armbruster
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='CAJ+F1CLAFEHjWpZpJQ_QS2VV=sjYqYpydjSe2ZEdRN-N-bhHzQ@mail.gmail.com' \
    --to=marcandre.lureau@gmail.com \
    --cc=armbru@redhat.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).