You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
C libraries commonly (ab)use defines to represent compilation constants. Therefore, the Doxygen documentation of these defines can contain valuable information and should be kept by bindgen, but alas it currently does not happen.
I am well aware that because defines are handled by the preprocessor, solving this may be harder than it sounds...
Input C/C++ Header
/** \brief Current component and plugin ABI version (see hwloc/plugins.h) */
#defineHWLOC_COMPONENT_ABI7
Bindgen Invocation
$ bindgen input.h
Actual Results
Bindgen discards the docs:
pubconstHWLOC_COMPONENT_ABI:u32 = 7;
Expected Results
Bindgen keeps the docs around:
#[doc = " \brief Current component and plugin ABI version (see hwloc/plugins.h) "]pubconstHWLOC_COMPONENT_ABI:u32 = 7;
The text was updated successfully, but these errors were encountered:
You are right, solving it seems to be harder than it looks.
I tried to parse the comment when the clang cursor is under a macro definition and we get null. There doesn't seem to be any way to fetch this info from the clang API: https://clang.llvm.org/doxygen/classclang_1_1MacroDefinition.html. MacroInfo doesn't have any info regarding documentation or comments.
So it seems this is not something we can do unless someone makes a custom parser for it which sounds like a lot of work.
C libraries commonly (ab)use defines to represent compilation constants. Therefore, the Doxygen documentation of these defines can contain valuable information and should be kept by bindgen, but alas it currently does not happen.
I am well aware that because defines are handled by the preprocessor, solving this may be harder than it sounds...
Input C/C++ Header
Bindgen Invocation
Actual Results
Bindgen discards the docs:
Expected Results
Bindgen keeps the docs around:
The text was updated successfully, but these errors were encountered: