I am on Oracle Linux 9 (based on Redhat). Have built doxygen from source with clang support
cmake -Duse_libclang=ON -G "Unix Makefiles" ...
$ doxygen --version
1.13.2
Have turned on the required fields in Doxyfile
CLANG_ASSISTED_PARSING = YES
ENABLE_PREPROCESSING = YES
MACRO_EXPANSION = YES
SKIP_FUNCTION_MACROS = NO
EXPAND_ONLY_PREDEF = NO
PREDEFINED =
HAVE_DOT = YES
Then I run this doxygen on a sample C file.
void defg()
{int i=10; i++;}
void xyz()
{defg();}
#define MYFUNC2() xyz()
int main()
{ MYFUNC2();}
My expectation is that I should be able to see call graph that goes something like [main]->[xyz]->[defg]
But there is no call graph going out of main
(as though it does not make any function calls).
I do see [xyz]->[defg]
and an entry for the macro MYFUNC2
under which there is a value filed xyz()
.
I am at a loss on how to figure out what is going on and get what I want from it. I looked at the doxygen output, it does not say whether it is using clang or not. But I remember that it used to warn that it was not built with clang support before I addressed that issue.
I already referred this thread. But I have already enabled clang, so not sure what else is missing.
The preprocessor output of doxygen shows that the macro is being expanded. But it is not reflecting on the final call graphs that are being generated.
00001 void defg()
00002 {int i=10; i++;}
00003
00004 void xyz()
00005 {defg();}
00006
00007 #define MYFUNC2()
00008
00009
00010 int main()
00011 {
00012 xyz() ;
00013 }