[cfe-dev] Getting the class name for a category in libclang

Jacob Carlborg doob at me.com
Sat Oct 30 01:42:35 PDT 2010


On 2010-10-29 22:45, David Chisnall wrote:
> On 29 Oct 2010, at 21:38, Ted Kremenek wrote:
>
>> On Oct 29, 2010, at 12:46 PM, David Chisnall wrote:
>>
>>> There also doesn't seem to be a way of walking the class hierarchy; I was expecting to be able to find the superclass for a class interface decl, but the only way I can see for doing this is to find the token and then parse the source code myself, which rather defeats the point of using libclang...
>>
>> I can be done using the current APIs.  Tools have been built on this API that care very much about the Objective-C type hierarchy.
>
> Hints welcome - I'd certainly be very happy to use the existing APIs if you felt like documenting how to walk the hierarchy without adding new APIs...

Don't know if you have solved this or not but have you looked in the 
Objective-C rewriter (lib/Rewrite/RewriteObjC.cpp)?

-- 
/Jacob Carlborg




More information about the cfe-dev mailing list