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

cldoc treats .hpp files as main files #4

Closed
simonask opened this issue Feb 13, 2013 · 2 comments
Closed

cldoc treats .hpp files as main files #4

simonask opened this issue Feb 13, 2013 · 2 comments

Comments

@simonask
Copy link

When cldoc generates documentation for header files with the .hpp ending, they are treated as if they were .c/.cpp/.cxx files.

This is a problem, because Clang generates a warning when it encounters a #pragma once directive in a main file, and due to issue #3, this causes cldoc to exit immediately.

@jessevdk
Copy link
Owner

Having fixed issue #3, I've started looking at this issue. Unfortunately, I don't really see any way for libclang to indicate it should parse something as a header. Even worse, you can't rely only on a files extension to indicate whether it's a header or not. The "best" solution to this problem is to have a dummy .cpp file which includes the corresponding header, but it goes against the idea of cldoc to require zero modifications to the original source.

@jessevdk
Copy link
Owner

So this still generates a warning, but will still generate the right thing. I'm closing this for now.

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