[cfe-dev] Path sensitive algorithm

Anna Zaks ganna at apple.com
Wed Apr 3 13:44:23 PDT 2013


You are right - checkPreStmt should be called once fro each call.

I cannot repo by adding a breakpoint to MallocChecker's checkPreStmt(const CallExpr *CE, CheckerContext &C) on your test case. Is it possible that you are splitting paths in your checker?

Cheers,
Anna.

On Apr 3, 2013, at 5:09 AM, Yuval Shahar <yuval.shahar.007 at gmail.com> wrote:

> Anna, I am asking about the clang static analyzer, and after viewing I still cannot understand why in a linear program like:
> 
>     int f();
>     void g() {
>         int i;
>         i = f();
>         i = f();
>     }
> 
> I stop at "checkPreStmt(CallExpr, CheckerContext)" once for the first function call and twice for the second.
> 
> 
> 
> 
> On Tue, Apr 2, 2013 at 8:36 PM, Anna Zaks <ganna at apple.com> wrote:
> Are you asking about the clang static analyzer?
> 
> We've recently gave a talk on the static analyzer. See "Building a checker in 24 hours" at http://llvm.org/devmtg/2012-11/ The talk is targeted at someone writing a new check extension to the analyzer so it only has a very high level description of the internals.
> 
> There is some additional documentation on the analyzer's website and in the clang/docs/analyzer directory (+ a patch for extensions to the Checker Developer Manual is currently in review: http://clang-developers.42468.n3.nabble.com/Patch-Update-to-Checker-Development-Manual-td4031120.html) 
> 
> However, there is currently no document fully describing the internals of the analyzer. The analyzer is inspired by many papers on path-sensitive dataflow analysis, see http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-January/003996.html
> 
> Cheers,
> Anna.
> 
> On Apr 2, 2013, at 4:22 AM, YuvalShahar <yuval.shahar.007 at gmail.com> wrote:
> 
>> Is there any documentation of the path sensitive algorithm?
>> 
>> 
>> 
>> --
>> View this message in context: http://clang-developers.42468.n3.nabble.com/Path-sensitive-algorithm-tp4031254.html
>> Sent from the Clang Developers mailing list archive at Nabble.com.
>> _______________________________________________
>> 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/20130403/2055d843/attachment.html>


More information about the cfe-dev mailing list