I have 3 files:
test.c
int table[] = { #define X(val) val, #include "test.x" #undef X }; void level2(void) { level3(); level4(); } void level3(void) { level4(); }
test2.c
void level1(void) { level2(); level3(); level4(); } void level4(void) { }
test.x
X(1) X(2) X(3)
I use doxygen to create callgraphs for these functions. Here is what I expected:
- level1:
- Links level2 (), level3 () and level4 ().
- level2:
- References level3 () and level4 ().
- Link to level1 ().
- level3:
- Links level4 ().
- Link to level1 () and level2 ().
- level4:
- Link to level1 (), level2 () and level3 ().
But here is what I got:
- level1:
- Links level2 (), level3 () and level4 ().
- level2:
- level3:
- level4:
It seems that the X-macro on test.c is the culprit. I managed to get it to work by doing 2 things (or will):
- Renaming
test.x , so doxygen does not find it. It will show a warning, but the callgraph is correct. - Add a
test.x newline at the end of test.x Usually the file ends immediately after X(3) .
Question:
How can I get a reliable callgraph from doxygen without editing files? Is there a parameter that I need to change, or is this a simple mistake?
source share