Clang 10: Get return value of an ObjC method


I am using libclang (via the Python binding) to parse an Objective-C header file and generate a new Swift file. On macOS 10.13.6 with Xcode 9.4.1, the script works perfectly.

On Mojave, with Xcode 10, the script can’t find the return values of Objective-C methods any longer because they no longer appear to be children of the cursor that represents each method. The result_type of each cursor is also INVALID, so I’m struggling to see how I can pull the return type of an ObjC method.

Has something changed in Clang that would cause this? For a very detailed writeup, with examples, please see:

I’m sorry to spam the list, but expertise with Clang is rare and nobody elsewhere seems to have any ideas. Thank you for your help.


I’ve done a little work with libclang and the python bindings and could take a look if you can send me a simple reproduction of the problem (ideally a passing/failing python test).