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

Documentation for #define macros #371

Open
sjkelly opened this issue Jan 27, 2022 · 1 comment
Open

Documentation for #define macros #371

sjkelly opened this issue Jan 27, 2022 · 1 comment

Comments

@sjkelly
Copy link

sjkelly commented Jan 27, 2022

For some packages there are many constants that are nice to have documented. For example, in this format:

/*!
 * Indicate end of burst for transmit or receive.
 * For write, end of burst if set by the caller.
 * For read, end of burst is set by the driver.
 */
#define END_BURST (1 << 1)

is output as:

const END_BURST = 1 << 1

I am attempting the changes for this but I am having difficulty tracking down where the comment is dropped from the parser.

@melonedo
Copy link
Contributor

Libclang does not provide these information.
From https://github.com/llvm/llvm-project/blob/8f972cb0fd0cf2513a1134a5f37b3c059376ca47/clang/tools/libclang/CIndex.cpp#L8429-L8431 and https://github.com/llvm/llvm-project/blob/8f972cb0fd0cf2513a1134a5f37b3c059376ca47/clang/tools/libclang/CXComment.cpp#L28-L32, we can see that libclang only provides comment information for declarations, while a macro #define is, unfortunately, a MacroDefinition.

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