<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Hi Lei,<div><br></div><div>There are a variety of ways to get started.  Roughly I can see the tasks broken down into three areas:</div><div><br></div><div>(1) Fix crashes/bugs in current C++ analysis functionality already supported.</div><div><br></div><div>(2) Add support for C++ expressions/etc. not currently handled by the analyzer.</div><div><br></div><div>(3) Large infrastructural changes, e.g., basic inter procedural analysis to (better handle things like RAII.</div><div><br></div><div>I would suggest starting with (1) or (2).</div><div><br></div><div>For (1), there are already some existing Bugzilla's for specific issues.  It's not easy to get a query of all of them, and that's something we should fix.  You can also just run the analyzer over a bunch of C++ code and see what comes out.  Identifying false positives, false negatives, and crashes, are all useful.  Even just filing bug reports with reduced test cases is immensely useful.</div><div><br></div><div>For (2), a good place to look is in ExprEngine::Visit():</div><div><br></div><div><div>  switch (S->getStmtClass()) {</div><div>    // C++ and ARC stuff we don't support yet.</div><div>    case Expr::ObjCIndirectCopyRestoreExprClass:</div><div>    case Stmt::CXXBindTemporaryExprClass:</div><div>    case Stmt::CXXCatchStmtClass:</div><div>    case Stmt::CXXDependentScopeMemberExprClass:</div><div>    case Stmt::CXXForRangeStmtClass:</div><div>    case Stmt::CXXPseudoDestructorExprClass:</div><div>    case Stmt::CXXTemporaryObjectExprClass:</div><div>    case Stmt::CXXThrowExprClass:</div><div>    case Stmt::CXXTryStmtClass:</div><div>    case Stmt::CXXTypeidExprClass:</div><div>    case Stmt::CXXUuidofExprClass:</div><div>    case Stmt::CXXUnresolvedConstructExprClass:</div></div><div>    …</div><div><br></div><div>Gradually chipping away at this list directly expands the amount of C++ code the analyzer can handle.</div><div><br></div><div>Another option is to work on more C++-specific checkers.</div><div><br></div><div>Cheers,</div><div>Ted</div><div><br></div><div><div><div>On Jul 29, 2011, at 12:32 AM, 章磊 wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><p>Hi clang,</p><p>The C++ analysis support is a WIP and i want to contribute to it, but i don't know current state of C++ analysis support and where to get started.</p><p>Maybe i can try to fix some crashes at first?</p><p>And where can i get some small C++ codebases(as Crypto++)?<br clear="all"><br>-- <br>Best regards!<br><br>Lei Zhang<br></p>
_______________________________________________<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>