Use clang's include paths when parsing the translation units #45
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
For quite a while we've had the issue that some type definitions were missing, most notably
size_twhen generating documentation for libgit2. We "solved" that by defining it ourselves whenDOCURIUMis defined. This is clearly a terrible hack but we did not know what was happening.Then in #39 we got errors about not finding
stddef.h. Further investigation revealed that this was because that PR included a change to ask the library to print out errors.It turns out that by default we do not include the directory in which clang stores its headers, which means we've been missing some necessary ones for quite some time now.
This PR queries clang for its include file by parsing its verbose output (inspiration from drothlis/clang-ctags#7) and passing it as an include path. We also remove
-DDOCURIUM=1as it should no longer be necessary.