How to make doxygen expand macros to include function calls in call graphs, etc., with clang - Stack Overflow

I am on Oracle Linux 9 (based on Redhat). Have built doxygen from source with clang supportcmake -Duse

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 }

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1741183714a4321615.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信