Skip to content

Add typedef for anonymous structures #5

Open
X-Ryl669 wants to merge 2 commits into
larkmjc:trunkfrom
X-Ryl669:addTypeDef
Open

Add typedef for anonymous structures #5
X-Ryl669 wants to merge 2 commits into
larkmjc:trunkfrom
X-Ryl669:addTypeDef

Conversation

@X-Ryl669

Copy link
Copy Markdown

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.

@larkmjc

larkmjc commented Aug 29, 2022

Copy link
Copy Markdown
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