I think you need to implement it as a flag (in the clang front end) and pass it to the clang analyzer.
scan-build is just a wrapper so you have to implement another flag for this and invoke the analyzer with --fix flag.
Let me know if you need any more help on this.
There is no ‘fix’ option for clang static analyzer. You have to implement it by yourself. Just follow one of these flags how these are implemented.
–analyze, --analyzer-checker, --analyzer-output, --analyzer-annotate
These flags are propagated from front end to the static analyzer. You can implement the ‘fix’ in similar ways. Let me know if you have any trouble.
Aldo, I’m not sure if the program can be ‘changed’ at that stage, I’ll have to look up.