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

Support forward declarations for C-like languages #1028

Open
wants to merge 7 commits into
base: master
Choose a base branch
from

Conversation

masnagam
Copy link

@masnagam masnagam commented Nov 6, 2024

Output forward declarations for C-like languages:

  • Definition for opaque types will not output if those are used as pointer types
  • Declaration order is changed in order to solve problems of recursive type definitions

Limitations:

  • No forward declaration will be output when --style=type is specified
  • Forward declarations for template types in C++ are not supported

Fixes #43

The following files are removed

- tests/expectations/std_lib_both.c
- tests/expectations/std_lib_both.compat.c

because opaque type definitions are replaced with forward
declarations.
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.

Generate forward declarations for structs with cyclical pointer references
1 participant