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 support for C-specific qualifiers and syntax not supported by C++ #220

Open
staticintlucas opened this issue Mar 21, 2022 · 1 comment

Comments

@staticintlucas
Copy link

I understand this project is mainly focused on C++, but I'm trying to move a C project away from Doxygen and figured I'd give Standardese a try.

My code makes use of the C restrict qualifier which Standardese seems to recognise as an identifier. This causes a ton of expected ')' errors. The restrict and _Atomic qualifiers are one of the few parts of C which have not made their way into any C++ standard.

The only other C-specific syntax that I can think of is static array indices, but currently the error comes from libclang saying static array size is a C99 feature, not permitted in C++. So hopefully if libclang is told to parse C code everything else will just work.

If you're happy to add support I can work on a PR. The additional qualifiers would require some upstream changes in foonathan/cppast, while static array indices would probably just require allowing C standards in --compilation.standard and passing that to libclang

@foonathan
Copy link
Collaborator

I welcome any PRs to cppast.

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

No branches or pull requests

2 participants