[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH 00/31] Refactoring with clang-tidy
From: |
Peter Maydell |
Subject: |
Re: [Qemu-devel] [PATCH 00/31] Refactoring with clang-tidy |
Date: |
Thu, 22 Jun 2017 13:59:36 +0100 |
On 22 June 2017 at 13:41, Marc-André Lureau <address@hidden> wrote:
> Various refactring questions on previously sent series prompted me to
> look at coccinelle to automate some changes again. Alas, semantic
> patches are not so easy to express for me, cocci doesn't catch all
> cases, is quite slow, and it doesn't seem possible to evaluate
> expressions to check if E == E-1 or if E is pow2 for example.
>
> I started looking at clang-tidy
> (http://clang.llvm.org/extra/clang-tidy/) as an alternative to do some
> refactoring.
Oh, very nice. I've had "investigate clang-tidy" in my todo list for
ages so it's nice that somebody has done it for me ;-)
I think it would be particularly interesting to look at whether
we can use this infrastructure to automatically detect some kinds
of bug, rather than merely stylistic issues. (As a random
example, could you detect calls to coroutine_fn functions from
normal functions?)
thanks
-- PMM
- [Qemu-devel] [PATCH 25/31] kvm: use DIV_ROUND_UP, (continued)
- [Qemu-devel] [PATCH 25/31] kvm: use DIV_ROUND_UP, Marc-André Lureau, 2017/06/22
- [Qemu-devel] [PATCH 26/31] decnumber: use DIV_ROUND_UP, Marc-André Lureau, 2017/06/22
- [Qemu-devel] [PATCH 27/31] i386: introduce ELF_NOTE_SIZE macro, Marc-André Lureau, 2017/06/22
- [Qemu-devel] [PATCH 28/31] 9pfs: replace g_malloc()+memcpy() with g_memdup(), Marc-André Lureau, 2017/06/22
- [Qemu-devel] [PATCH 29/31] i386: replace g_malloc()+memcpy() with g_memdup(), Marc-André Lureau, 2017/06/22
- [Qemu-devel] [PATCH 30/31] test-iov: replace g_malloc()+memcpy() with g_memdup(), Marc-André Lureau, 2017/06/22
- [Qemu-devel] [PATCH 31/31] eepro100: replace g_malloc()+memcpy() with g_memdup(), Marc-André Lureau, 2017/06/22
- Re: [Qemu-devel] [PATCH 00/31] Refactoring with clang-tidy,
Peter Maydell <=
- Re: [Qemu-devel] [PATCH 00/31] Refactoring with clang-tidy, no-reply, 2017/06/22