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

Objective C / C++ Union Support #705

Closed
bosborn opened this issue Sep 16, 2021 · 2 comments · Fixed by #706
Closed

Objective C / C++ Union Support #705

bosborn opened this issue Sep 16, 2021 · 2 comments · Fixed by #706

Comments

@bosborn
Copy link
Contributor

bosborn commented Sep 16, 2021

Any chance of supporting union similar to struct in ObjCDeclarationKind.swift?

Running jazzy version 0.14.0 with a C++ dependency already built, receiving the following error:
SourceKittenFramework/ObjCDeclarationKind.swift:81: Fatal error: Unsupported CXCursorKind: UnionDecl

Manually changing union in the offending file to struct allows documentation to generate.

Example:
typedef union { double a; int b; char *c; } VALUE;
to
typedef struct { double a; int b; char *c; } VALUE;

@johnfairh
Copy link
Collaborator

There's a good chance all this needs is adding CXCursor_UnionDecl in that file and a quick testcase in ClangTranslationUnitTests -- this does look to be a missing ObjC feature though can't be that common in practice as I don't remember hearing a request for it before.

@bosborn
Copy link
Contributor Author

bosborn commented Sep 17, 2021

Took a shot at it in #706. Not too familiar with the testing framework, so based it on the results from using struct.

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 a pull request may close this issue.

2 participants