[cfe-dev] GSOC Static Analyzer Proposal

Anna Zaks ganna at apple.com
Mon Apr 15 12:14:35 PDT 2013

On Apr 14, 2013, at 11:31 PM, David Blaikie <dblaikie at gmail.com> wrote:

> On Tue, Apr 9, 2013 at 8:51 PM, Adam Schnitzer <adamschn at umich.edu> wrote:
>> Hello All,
>> I am planning on proposing a project for Google Summer of Code this summer,
>> and would like to get your feedback before I write up a formal proposal.
>> I would like to work on improving support for C++ in the static analyzer.
>> Specifically, I think it would be valuable to improve the checkers for
>> undefined behavior including those already suggested.
>> Also, I think it would be helpful to extend the static analyzer to check for
>> stylistic violations. For example, projects like LLVM have suggestions like,
>> "Don't use else after a return". These warnings would often be noisy, and
>> project dependent, so it would be useful to make those options configurable
>> and suppressible.
> Many stylistic issues wouldn't likely need the full power of the Clang
> Static Analyzer. I suspect it would be better to factor such checks
> out of the SA and then have the SA as one (allbeit expensive)
> configurable check alongside many others. But I could be wrong - not
> sure how lightweight the SA can be if it's doing simple things.

The static analyzer contains several syntactic, AST-based checkers - they are essentially StmtVisitors. These are much faster than regular analyzer checkers, which rely on path-sensitive symbolic program execution. Currently, there is no analyzer mode, which would only run the syntactic checkers, but it would be relatively easy to add one.

>> I am also interested in implementing several of the optimization checkers.
>> Specifically, it would be valuable to have warnings about postfix increment
>> and pass by value give an idea of how large the object being copied is.
> Aside: pass by value is actually surprisingly /good/ in the presence
> of move semantics/swaptimizations. But those could be detected.
>> I would be very interested to hear your feedback, specifically, if you think
>> this project would be valuable.
>> Thank You,
>> Adam Schnitzer
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
> _______________________________________________
> 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/20130415/61b6bb79/attachment.html>

More information about the cfe-dev mailing list