Clang 10: Get return value of an ObjC method

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Clang 10: Get return value of an ObjC method

via cfe-dev
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

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


_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Clang 10: Get return value of an ObjC method

via cfe-dev
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).

Best

Jon

On 4 Oct 2018, at 20:24, Bryan Jones via cfe-dev <[hidden email]> wrote:

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

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

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

_______________________________________________
cfe-dev mailing list
[hidden email]
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev