[cfe-dev] Creating 'clang-mutate' for clang-tools-extra

Jonathan Coe via cfe-dev cfe-dev at lists.llvm.org
Tue Aug 9 03:01:48 PDT 2016


I'd like a tool that applies plausible edits to code so I can check if
tests pick up the change or not.

I think I can do this with a clang-tidy-like framework with a list of
mutations (rather than checks).

The tool would produce a large list of single-change 'fixes' for
clang-apply-fixes to make use of and to be set up as a series of mutated
branches for a CI system. Applying mutations to only new code should keep
the set manageable.

An example mutation would invert `<` in conditionals:

`if(date > expiry ) { return 0.0; }`

is mutated to

`if(date < expiry ) { return 0.0; }`

If our tests don't spot this, we have a gap.

Is anyone working on, or interested in collaborating on a similar tool?

regards,

Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160809/4285a0a1/attachment.html>


More information about the cfe-dev mailing list