[cfe-dev] Determining if ObjCIvarDecl is in multi-declaration

Emerson Murphy-Hill emerson at apple.com
Wed Apr 23 09:58:28 PDT 2008


On Apr 23, 2008, at 9:42 AM, Chris Lattner wrote:

>
> On Apr 23, 2008, at 9:22 AM, Emerson Murphy-Hill wrote:
>
>> Suppose I have an objective-c interface:
>>
>> @interface C {
>>   int x,y;
>> };
>>
>> I parse it, and have an ObjCIvarDecl for x.  How can I determine  
>> that x is in a multi-declaration?  I could check which  
>> ObjCIvarDecls' locations overlap, but is there an easier way?
>>
>
> What else do you need to know?  What action would you take based on  
> whether it was a multi declaration or not?
>
> Capturing this information is quite straight-forward, but it is good  
> to have the whole picture in mind before doing something like this.
>
> -Chris

I'm removing an instance variable.  In the current code, if it's a  
multi-decl, I just give up, which is what spawned this question.   
Ideally, I'd like to be able to remove an inst var from a multi-decl  
as easily as from a single decl.

Thanks,

e
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20080423/9502d283/attachment.html>


More information about the cfe-dev mailing list