[cfe-dev] Did Clang support Incremental Static Analysis ????
Anna Zaks
ganna at apple.com
Tue May 15 11:08:02 PDT 2012
As David Chisnall pointed out to me, there is some inherent support of incremental build due to the way scan-build works. "The standard way of running the static analyser is via the scan-build script, which runs as part of your normal build system. If you run it as part of an incremental build, then you will get incremental analysis results. You will not, however, get these merged with the previous set."
It would be relatively easy to merge the results in this setting. Note that, this happens to work well because the analyzer only deals with one file at a time, which does limit its power. Having whole program analyzes is something we are interested in doing in the future and it would greatly complicate the merging. Another problem with relying on this approach is that this would only give you file granularity. In principle, one might not need to reanalyze the whole file if one line in it changed. Coming up with a more general solution is a much more difficult problem.
Another feature that is somewhat related to this is identifying issues and tracking issues over time so that we could detect new warnings that just started appearing after a bunch of changes. This one is important to solve because many workflows involve looking at newly introduced issues. Hopefully, we'll get to this one soon.
If incremental analysis is something you would love to see in the analyzer, you can chime in by filing an enhancement request on llvm Bugzilla.
Cheers,
Anna.
On May 14, 2012, at 11:19 PM, Umesh Kalappa wrote:
> Thanks anna for the clarification and any idea about adding this feature in future ???
>
> ~Umesh
>
> On Mon, May 14, 2012 at 11:51 PM, Anna Zaks <ganna at apple.com> wrote:
> Hi Umesh,
>
> No, currently, the Clang Static Analyzer does not have any support for incremental analysis.
>
> Cheers,
> Anna.
> On May 14, 2012, at 3:01 AM, Umesh Kalappa wrote:
>
> > Hi All,
> >
> > My Apologies if the below question was ended up in the wrong forum.
> >
> > Like to know that did Clang Static Analysis(CSA) has the feature called incremental analysis ???,When i say incremental here ,I mean when i kick off the CSA on the code base for the second time with set of files changed then CSA will use the analysis that was done for the last time along the doing CSA for changed files.
> >
> >
> > Thanks
> > ~Umesh
> >
> > _______________________________________________
> > cfe-dev mailing list
> > cfe-dev at cs.uiuc.edu
> > http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20120515/015c8e41/attachment.html>
More information about the cfe-dev
mailing list