[cfe-dev] objc method lookup in super class implementation
Jean-Daniel Dupas
devlists at shadowlab.org
Sun Mar 8 09:26:26 PDT 2009
OK,
I will have a look at this, and I will also handle the class method
case.
Le 8 mars 09 à 17:08, steve naroff a écrit :
> Hi Jean-Daniel,
>
> This patch looks good, however it doesn't handle 'super'.
>
> snaroff% ../../../../Debug/bin/clang method-lookup-4.m
> method-lookup-4.m:30:3: warning: method '-myMethod' not found
> (return type defaults to 'id')
> [super myMethod];
> ^~~~~~~~~~~~~~~~
> 1 diagnostic generated.
>
> Since the patch relates to looking in super classes, it would be
> nice if it handled messages to 'super' as well.
>
> Thanks,
>
> snaroff
>
> On Mar 8, 2009, at 7:09 AM, Jean-Daniel Dupas wrote:
>
>> Hello,
>>
>> When clang lookup a method, it searches in the class implementation
>> if it is in scope, but it does not try to search in super class
>> implementation that may be in the scope too.
>>
>> The result is that it emits "may not responds to selector" warning
>> where it is obvious that the object will, as its superclass
>> implement it.
>>
>> Here is a patch to lookup in superclasses implementations (if in
>> scope), and a test case.
>>
>>
>>
>> <lookup-superimpl.patch>
>> _______________________________________________
>> cfe-dev mailing list
>> cfe-dev at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20090308/07468a95/attachment.html>
More information about the cfe-dev
mailing list