https://bugs.llvm.org/show_bug.cgi?id=38858
Bug ID: 38858
Summary: C documentation ignored for documented Macros
Product: clang
Version: 7.0
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: libclang
Assignee: unassignedclangb...@nondot.org
Reporter: b...@bowild.com
CC: kli...@google.com, llvm-bugs@lists.llvm.org
Created attachment 20851
--> https://bugs.llvm.org/attachment.cgi?id=20851&action=edit
Example C file that demonstrates the issue.
clang fails to report documentation for Macros.
clang properly reports documentation for most symbols (documentation for
functions and global variables) but fails to report any documentation for
macros.
For IDE purposes, (for example, when using clang with vim or SublimeText3),
this could result in the mistaken belief that no documentation about the macro
exists, even if the macro has specific instructions or warnings documenting
it's existence / use.
This is especially frustrating when using macros to shadow C functions in order
to implement "named arguments" (using a struct and __VA_ARGS__). In these cases
the documentation is totally lost.
The following C file will demonstrate the issue:
```c
/**
* Function documentation is properly reported to the IDE.
*/
static int my_noop(void) { return 1; }
/**
* Global variable documentation is also reported to the IDE.
*/
static int my_noop_i = 0;
/**
* Why does this documentation not show?.
*/
#define NOOP
int main(void) {
my_noop_i = my_noop();
NOOP;
return 0;
}
```
Note: might be related to bug #35424
--
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs