<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">The analyzer stops analyzing a path when it hits a fail stop bug (because analyzing the rest of the path would be meaningless). In this case, *c = b triggers a warning from the analyzer where 'c' is used uninitialized.<div><br><div><div>On Feb 6, 2012, at 1:55 AM, Zong <<a href="mailto:zong_y365@163.com">zong_y365@163.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:arial"> Dear All,<br><br>I have a very simple clang analyzer checker code snippet like below,<br><br>--------------------------------------------------<br>using namespace clang;<br>using namespace ento;<br><br>namespace {<br> class myChecker: public Checker< check::PreStmt<Stmt> > {<br> public:<br> void checkPreStmt(const Stmt *S, CheckerContext &Ctx) const ;<br><br> };<br>}<br><br>void myChecker::checkPreStmt(const Stmt *S, CheckerContext &Ctx) const {<br> S->dumpAll();<br>}<br>--------------------------------------------------<br><br>This analyzer was then fed with the test code:<br><br>int main()<br>{<br> int *b;<br> int *c;<br> *c=b;<br> return 0;<br>}<br><br>Why can't I observe a "ReturnStmt"? <br>If I change "*c=b" with something other (e.g., b=c), then "ReturnStmt" appears. I just can!
't figure out the reason. Would someone please help me ? Thanks!<br><br>Best,<br>Z<br></div><br><br><span title="neteasefooter"><span id="netease_mail_footer"></span></span>_______________________________________________<br>cfe-dev mailing list<br><a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev<br></blockquote></div><br></div></body></html>