[cfe-dev] [Patch] Generate a warning if a message is sent to a nil receiver with return type larger than void* (PR 2718)

Ted Kremenek kremenek at apple.com
Tue Apr 7 18:42:47 PDT 2009


Hi Nikita,

This looks great.  Just to confirm, I think the particular reference  
to the Apple documentation is the following:

http://developer.apple.com/documentation/MacOSX/Conceptual/universal_binary/universal_binary_tips/universal_binary_tips.html#//apple_ref/doc/uid/TP40002217-CH239-CJBJABFC

I'll go ahead and apply the patch.

Ted

On Apr 7, 2009, at 11:23 AM, Valeri Zhuk wrote:

> The attached patch generates warnings of cases where an ObjC message  
> is sent to a nil object and the size of return type of that message  
> is larger than the size of void pointer. This may result in  
> undefined return values as described in PR 2718 [1]. The patch also  
> includes test cases.
>
> Warnings are currently generated only in those cases where we know  
> for sure that an object pointer is nil. Enabling this warning in all  
> possible nil cases would probably produce too many false positives.
>
>
>
> <clang-nil-checker.patch>
>
>
>
>
> [1] http://llvm.org/bugs/show_bug.cgi?id=2718
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev




More information about the cfe-dev mailing list