Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add typedef for anonymous structures #5

Open
wants to merge 2 commits into
base: trunk
Choose a base branch
from

Conversation

X-Ryl669
Copy link

See #3
I'm trying to create a function signature from crefl database. Since it's not possible to refer to an anonymous structure in a function signature, we need the typedef as written by the initial code.

This adds the feature, by substituting an anonymous struct to a typedef if possible.
However, it breaks tests, but I don't know if it's expected or not.

@michaeljclark
Copy link
Owner

thanks, I'll take a look. I'll need some time to inspect the resulting graphs. I haven't yet automated the testing beyond creating text output that I diff locally. that of course does not handle structural changes that require changing the baselines, like referencing the most specific type in a decl versus a desugared type. as I mentioned before, the tests are not buttoned down in CI because the graph schema is still under some flux. where I got up to was function addresses, libffi integration, qualifiers and dependent expressions for VLAs using operator patterns.

C++ is in the back of my mind but I wanted to complete C first because while I'm building this for use in a C++ app, most of the reflection stuff that I need for an entity-component system is simply structures, functions and intrinsic types. I do need a C++-style invocation on an interface, but I need to build it in terms of C so that C can call C++ virtual functions using crefl and libffi.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants