<html><head><meta http-equiv="Content-Type" content="text/html charset=windows-1252"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">Simon,<div><br></div><div>Are you writing a path-sensitive checker or just an AST visitor?</div><div><br></div><div>If you have not looked at this yet, here are the bits of documentation we have available. It's very rudimentary and we are planning on extending it in the near future.</div><div><a href="http://clang-analyzer.llvm.org/checker_dev_manual.html">http://clang-analyzer.llvm.org/checker_dev_manual.html</a></div><div><a href="http://clang.llvm.org/doxygen/classento_1_1CheckerDocumentation.html">http://clang.llvm.org/doxygen/classento_1_1CheckerDocumentation.html</a></div><div><br></div><div>It might be helpful to look at the existing checkers and use them as examples. For example, NSErrorChecker.cpp contains a non-path sensitive check that visits function/method declarations. AttrNonNullChecker is path sensitive and it registers a callback on all calls.</div><div><br></div><div>Cheers,</div><div>Anna. </div><div><br><div><div>On Oct 10, 2012, at 5:45 AM, Simon Harris <<a href="mailto:haruki_zaemon@mac.com">haruki_zaemon@mac.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite">10+ years ago I wrote a whole slew of static analysis checks for Java including some code duplication checking, complexity metrics, etc.<br><br>I'm looking to port some or all of them to clang — for now specifically to check Objective-C code but there's no reason they couldn't be used for more than that.<br><br>I've successfully managed to get a skeleton checker compiled in and run but I'm now largely stumped.<br><br>My specific question to get me over the first hurdle is how to I get call backs when visiting a function/method declaration?<br><br>Sorry if this has all be asked before.<br><br>Simon<br>_______________________________________________<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>