<html><head><meta http-equiv="Content-Type" content="text/html charset=iso-8859-1"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div><div>You are right - checkPreStmt should be called once fro each call.</div><div><br></div><div>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?</div><div><br></div><div>Cheers,</div><div>Anna.</div><div><br></div><div>On Apr 3, 2013, at 5:09 AM, Yuval Shahar <<a href="mailto:yuval.shahar.007@gmail.com">yuval.shahar.007@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><div dir="ltr">Anna, I am asking about the clang static analyzer, and after viewing I still cannot understand why in a linear program like:<div><br></div><div> int f();</div><div> void g() {</div><div> int i;</div><div> i = f();</div><div> i = f();</div><div> }</div><div><br></div><div>I stop at "checkPreStmt(CallExpr, CheckerContext)" once for the first function call and twice for the second.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Apr 2, 2013 at 8:36 PM, Anna Zaks<span class="Apple-converted-space"> </span><span dir="ltr"><<a href="mailto:ganna@apple.com" target="_blank">ganna@apple.com</a>></span><span class="Apple-converted-space"> </span>wrote:<br><blockquote class="gmail_quote" style="margin: 0px 0px 0px 0.8ex; border-left-width: 1px; border-left-color: rgb(204, 204, 204); border-left-style: solid; padding-left: 1ex;"><div style="word-wrap: break-word;">Are you asking about the clang static analyzer?<div><br></div><div>We've recently gave a talk on the static analyzer. See "Building a checker in 24 hours" at <a href="http://llvm.org/devmtg/2012-11/" target="_blank">http://llvm.org/devmtg/2012-11/</a> 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.</div><div><br></div><div>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:<span class="Apple-converted-space"> </span><a href="http://clang-developers.42468.n3.nabble.com/Patch-Update-to-Checker-Development-Manual-td4031120.html" target="_blank">http://clang-developers.42468.n3.nabble.com/Patch-Update-to-Checker-Development-Manual-td4031120.html</a>) </div><div><br></div><div>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 <a href="http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-January/003996.html" target="_blank">http://lists.cs.uiuc.edu/pipermail/cfe-dev/2009-January/003996.html</a></div><div><br></div><div>Cheers,</div><div>Anna.<div><div class="h5"><br><div><div>On Apr 2, 2013, at 4:22 AM, YuvalShahar <<a href="mailto:yuval.shahar.007@gmail.com" target="_blank">yuval.shahar.007@gmail.com</a>> wrote:</div><br><blockquote type="cite"><div style="letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px;">Is there any documentation of the path sensitive algorithm?<br><br><br><br>--<br>View this message in context:<span> </span><a href="http://clang-developers.42468.n3.nabble.com/Path-sensitive-algorithm-tp4031254.html" target="_blank">http://clang-developers.42468.n3.nabble.com/Path-sensitive-algorithm-tp4031254.html</a><br>Sent from the Clang Developers mailing list archive at<span> </span><a href="http://nabble.com/" target="_blank">Nabble.com</a>.<br>_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu" target="_blank">cfe-dev@cs.uiuc.edu</a><br><a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a></div></blockquote></div></div></div></div></div></blockquote></div></div></div></blockquote></div><br></body></html>