[cfe-dev] libclang: Getting ObjCInterfaceDecl cursor from ObjCMessageExpr cursor
nikita at zhuk.fi
Sat Jan 8 11:17:55 PST 2011
I saw the LLVM developer meeting's presentation of libclang and decided to try it out. The API looks really good and as a ObjC developer I feel much more comfortable using C API instead of clang's internal C++ APIs. So I would like to thank you very much for developing this API.
Now, a question / feature request. When traversing the AST with CXCursors, I encounter CXCursor pointing to a ObjCMessageExpr. Is there any way of getting the cursor which points to the declaration of the receiver interface, equivalent of getReceiverInterface() in the underlying ObjCMessageExpr C++ class? If not (I suppose not - by looking at the CXCursor.cpp), are there any known / recommended ways of traversing ObjC class hierarchies with libclang API, or would this be a useful addition to the API?
Ted Kremenek mentioned in  that there are tools using libclang which use ObjC type hierarchy, are these tools public / open source and if so, can you give some pointers to them?
More information about the cfe-dev