Open HadrienG2 opened 4 months ago
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: