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 for variable template #2

Closed
foonathan opened this issue May 5, 2016 · 6 comments
Closed

Support for variable template #2

foonathan opened this issue May 5, 2016 · 6 comments

Comments

@foonathan
Copy link
Collaborator

Due to libclang 3.7 limitations there is no support for variable or alias templates.
Variable templates become normal variables and alias templates are simply ignored.

Before a libclang version gets available try to work around that somehow.

@foonathan foonathan added the bug label May 5, 2016
foonathan added a commit that referenced this issue Jun 6, 2016
Finish Feature Libclang-3.8-Fixes

Add support for alias templates, see #2.
@foonathan
Copy link
Collaborator Author

Under libclang 3.8 or higher alias templates are now supported.

foonathan added a commit that referenced this issue Jun 7, 2016
Add support for alias templates, see #2.
@foonathan foonathan changed the title Support for variable and alias template Support for variable template Nov 11, 2016
@purpleKarrot
Copy link

You might consider using libtooling instead of libclang. This is what @chandlerc recommended to @agserm and @bgeller for copperspice/doxypress.

@foonathan
Copy link
Collaborator Author

Yeah, I know I should. But I got it working except for this issue and #39, so I see what I can do.

@agserm
Copy link

agserm commented Nov 29, 2016

As @purpleKarrot noted, libclang will most likely never support the level of parsing you need for a documentation engine. We discovered this in developing doxypress. The libclang interface is really oriented toward a code completion use case, and basically supports "whatever XCode needed to understand." We tried to make libclang work for our case but eventually realized it would be futile and we would be fighting the API every step of the way.

@foonathan
Copy link
Collaborator Author

I was able to get all the information I wanted, because I've coupled libclang with my own parser that scans the tokens of a cursor.

The problem with variable templates is that - last time I've checked - they are reported as regular variables, so I was not able to get the template information. This seems to be a libclang bug though.

@foonathan
Copy link
Collaborator Author

This is now tracked here: standardese/cppast#11

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

3 participants