[cfe-dev] How to implement "--fix" for a checker in Static Analyzer?

Aditya K hiraditya at msn.com
Tue Mar 31 08:31:56 PDT 2015


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.

Aditya

Sent from my iPhone

> On Mar 30, 2015, at 9:22 PM, Pradnya Laxman Khalate <plkhalat at syr.edu> wrote:
> 
> Hi,
> 
> Thank you for your response.
> 
> Can you point me to any reference example? As far as I know, none of the Core checkers present in the current version of Static Analyzer tool have a "--fixme" / "--fix" option.
> 
> Regards,
> Pradnya
> ________________________________________
> From: Aditya K <hiraditya at msn.com>
> Sent: Sunday, March 29, 2015 10:20 AM
> To: Clang; Pradnya Laxman Khalate
> Subject: RE: [cfe-dev] How to implement "--fix" for a checker in Static Analyzer?
> 
> ----------------------------------------
> > From: hiraditya at msn.com
> > To: cfe-dev at cs.uiuc.edu
> > Subject: [cfe-dev] How to implement "--fix" for a checker in Static Analyzer?
> > Date: Sun, 29 Mar 2015 14:16:53 +0000
> >
> > 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.
> >
> > -Aditya
> >
> >
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20150331/db63907c/attachment.html>


More information about the cfe-dev mailing list