On 22 June 2017 at 13:41, Marc-André Lureau <marcandre.lur...@redhat.com> 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

Reply via email to