[cfe-dev] libclang: Getting interface from CXCursor_ObjCCategoryDecl
Allan Odgaard
lists+cfe-dev at simplit.com
Tue Nov 18 01:47:55 PST 2014
On 17 Nov 2014, at 15:09, Jacob Carlborg wrote:
> On 2014-11-17 13:01, Allan Odgaard wrote:
>> […] How can I get the interface that the category is associated
>> with?
>
> I'm not sure if there's a better way, but this is what I did:
>
> Visit the CXCursor_ObjCCategoryDecl cursor's children and pick the
> first cursor that has the CXCursor_ObjCClassRef kind. […]
Thanks, I ended up using that solution.
Re-reading the clang header file I see there is
CXIdxObjCCategoryDeclInfo with more info, but that is only available
when using the callback-based indexing API, so I did not experiment with
that.
More information about the cfe-dev
mailing list