sighingnow / libclang

(Unofficial) Release libclang (clang.cindex) on pypi.
https://pypi.org/project/libclang
Other
85 stars 23 forks source link

Check if a function is inline #51

Open Victorious3 opened 1 year ago

Victorious3 commented 1 year ago

This seems to be missing from the API, my workaround is looking at the tokens but it's not very elegant.

Zeratul-Aiur commented 1 year ago

A solution is extensions to the Clang bindings that do not exist in the current version.

Reference

See Also:

sighingnow commented 1 year ago

clang binding is only used for parsing. Can you describe your question in more detail? e.g., using some examples to show what you want to archive.

Victorious3 commented 1 year ago

What I was trying to do was creating bindings for C for my custom programming language. As (static) inline functions aren't in the shared library, I need to filter them out somehow.

JhnW commented 1 year ago

If nothing has been added to the C bindings for liblacng, the best search for inline functions is to iterate over function tokens. Or you can just use devan (I hope next time the author will forgive me for the brazen publicity). I use libclang as a backend wrapping this type of cases.