<html><head><meta http-equiv="Content-Type" content="text/html charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Mar 9, 2016, at 1:24 PM, Alexander Smirnov via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">For future references.<br class=""><br class="">In that particular case it will be enough to check if Call has declaration<br class=""><br class="">Call.getDecl()<br class=""><br class="">and throw an error only if there is no declaration.<br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Tue, Mar 8, 2016 at 7:26 PM, Alexander Smirnov <span dir="ltr" class=""><<a href="mailto:alexander@smirn0v.ru" target="_blank" class="">alexander@smirn0v.ru</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">As far as I understand I should extend existing NullabilityChecker and use propagated 'nullability' attribute. Seems to be the only way to understand probability that the block is null.<div class=""><br class=""></div><div class="">Still will be happy to get your thoughts on this.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sun, Mar 6, 2016 at 11:50 PM, Alexander Smirnov <span dir="ltr" class=""><<a href="mailto:alexander@smirn0v.ru" target="_blank" class="">alexander@smirn0v.ru</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr" class="">Hello,<br class=""><br class="">I'm trying to add ObjC clang analyzer checker to check if called block is non null.<br class=""><br class="">I thought that at some ProgramState SVal for the called block will be constrained to null and that's all I need to check.<br class=""><br class="">I was naive.<br class=""><br class="">Here is code of the checker: <a href="http://pastebin.com/raw/dcE12ayk" target="_blank" class="">http://pastebin.com/raw/dcE12ayk</a><br class="">But it reports error even for simple code like:<br class=""><br class="">void(^bl)(void) = ^{}; <br class="">bl();<br class=""><br class=""><div class="">That's caused by the fact that for my checker SVal for "bl" is "underconstrained".</div><div class=""><br class=""></div><div class="">Could please someone lead me on the right examples from current checkers? Or explain, what am I doing wrong ?</div></div>
</blockquote></div><br class=""></div></div></div></blockquote></div></div></div></blockquote><br class=""><div>I highly recommend watching these slides/video; I believe it answers the question about the state being underconstrained closer to the end. If it does not, please get back to me.</div><div><a href="http://llvm.org/devmtg/2012-11/videos/Zaks-Rose-Checker24Hours.mp4" class="">http://llvm.org/devmtg/2012-11/videos/Zaks-Rose-Checker24Hours.mp4</a></div><a href="http://llvm.org/devmtg/2012-11/Zaks-Rose-Checker24Hours.pdf" class="">http://llvm.org/devmtg/2012-11/Zaks-Rose-Checker24Hours.pdf</a></div><div><br class=""></div><div>You can find a bit more resources on the Clang Static Analyzer development here:</div><div><a href="http://clang-analyzer.llvm.org/checker_dev_manual.html" class="">http://clang-analyzer.llvm.org/checker_dev_manual.html</a></div><div><br class=""></div><div>Cheers,</div><div>Anna.</div><div><br class=""><blockquote type="cite" class=""><div class=""><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="HOEnZb"><div class="h5">
</div></div></blockquote></div><br class=""></div>
_______________________________________________<br class="">cfe-dev mailing list<br class=""><a href="mailto:cfe-dev@lists.llvm.org" class="">cfe-dev@lists.llvm.org</a><br class="">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev<br class=""></div></blockquote></div><br class=""></body></html>