[cfe-dev] Clang 10: Get return value of an ObjC method

Bryan Jones via cfe-dev cfe-dev at lists.llvm.org
Thu Oct 4 12:24:26 PDT 2018


Hello:

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 10.0.0.0 that would cause this? For a very detailed writeup, with examples, please see: https://stackoverflow.com/questions/52640399/libclang-python-binding-get-objc-method-return-value <https://stackoverflow.com/questions/52640399/libclang-python-binding-get-objc-method-return-value>

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.

-Bryan

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20181004/a2a9186c/attachment.html>


More information about the cfe-dev mailing list