[cfe-dev] ObjC Block call checker

Alexander Smirnov via cfe-dev cfe-dev at lists.llvm.org
Tue Mar 8 08:26:24 PST 2016

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.

Still will be happy to get your thoughts on this.

On Sun, Mar 6, 2016 at 11:50 PM, Alexander Smirnov <alexander at smirn0v.ru>

> Hello,
> I'm trying to add ObjC clang analyzer checker to check if called block is
> non null.
> I thought that at some ProgramState SVal for the called block will be
> constrained to null and that's all I need to check.
> I was naive.
> Here is code of the checker: http://pastebin.com/raw/dcE12ayk
> But it reports error even for simple code like:
> void(^bl)(void) = ^{};
> bl();
> That's caused by the fact that for my checker SVal for "bl" is
> "underconstrained".
> Could please someone lead me on the right examples from current checkers?
> Or explain, what am I doing wrong ?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160308/895d2bd6/attachment.html>

More information about the cfe-dev mailing list