<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; ">Hi Anna,<div><br><div><div>On 11/10/2012, at 4:49 AM, Anna Zaks <<a href="mailto:ganna@apple.com">ganna@apple.com</a>> wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><meta http-equiv="Content-Type" content="text/html charset=windows-1252"><div 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></blockquote><div><br></div><div>A bit of both actually. Although I guess that depends on how "sensitive" we need to be. Mostly I just want to count certain things within methods and given that methods can't be nested, I could use the context to just set/reset the current count while visiting each node in an AST.</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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></blockquote><div><br></div><div>I have read these pages which is how I got a skeleton up and "running". My ultimate goal is to have these checks run inside Xcode while building Mac/iOS applications so I'd love some guidance on that score too. Building a completely custom binary seemed, at face value, to be the simplest but least appealing approach.</div><div><br></div><div>Ideally I'd somehow configure them as "plugins" from within an Xcode project but for now, while I'm learning, a custom binary seems the easiest.</div><br><blockquote type="cite"><div style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><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></blockquote><div><br></div><div>Oh thanks for the heads up on that. I looked at some of the checkers but hadn't managed to look at all of them. I shall check out both.</div></div><br></div><div>Thank you so much for getting back to me.</div><div><br></div><div>Simon</div><div><br></div></body></html>