Mutants

Every run makes all eleven kinds. The names are those of gremlins, so reports compare directly.

KindChange
ARITHMETIC_BASE+ and - swap, * and / swap, % becomes * (numbers only)
CONDITIONALS_BOUNDARY< becomes <=, > becomes >=, and back
CONDITIONALS_NEGATION== and != swap, < becomes >=, > becomes <=
INCREMENT_DECREMENT++ and -- swap
INVERT_NEGATIVES-x becomes +x
INVERT_LOGICAL&& and || swap
INVERT_LOOPCTRLbreak and continue swap inside a loop
INVERT_ASSIGNMENTS+= and -= swap, *= and /= swap
REMOVE_SELF_ASSIGNMENTSx op= y becomes x = y
INVERT_BITWISE& and | swap, << and >> swap, ^ and &^ become &
INVERT_BITWISE_ASSIGNMENTSthe same for &=, |=, ^=, &^=, <<= and >>=

gomagi makes no mutant that cannot compile: string concatenation keeps its +, a break outside a loop keeps its break, and %= is only removed, since inverting it gives itself. A constant expression whose mutant the compiler would reject, such as a negative array length, is reported as not viable without being built.

Generated files, files that import C, files with a //line directive, lines that end with a //gomagi:ignore comment and functions whose doc comment holds one are not mutated.