On 25 Oct 2013, at 18:51, Jordan Rose <[email protected]> wrote:

>>> 
>>> +        const ObjCSelectorExpr *SelExpr = 
>>> cast<ObjCSelectorExpr>(ME->getArg(0));
>>> 
>>> This could fail if the user passes a SEL variable.
>>> 
>> 
>> Well spotted. I have added a helper method to extract the ObjCSelectorExpr 
>> in the case of a SEL variable, it is very ugly code though, is there an 
>> easier way to do this? see selectorForArgument().
> 
> The way you've done it will break for re-assignments, so that won't work. I 
> think the right thing to do is just ignore that case for now; in the long 
> term, I think the correct solution is to model SEL regions in the same sort 
> of way as we do string literals.
> 

OK, I removed the code and replaced it with a TODO for now.

> 
> I'm still concerned about the diagnostic text:
> 
> +  os << "Calling method introduced in ";
> +  os << Introduced;
> +  os << " (deployment target is ";
> +  os << deploymentTarget(State);
> +  os << ")";
> 
> At the very least we need to distinguish "method" and "function"; for bonus 
> points, saying that the entire class or protocol was introduced in version X 
> would be nice polish.
> 
> Jordan

How about the attached patch? It prints the class or protocol version when the 
method has no specific introduced version.

Richard

Attachment: unavailable-2710.patch
Description: Binary data

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to