admin管理员组文章数量:1312680
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 }
本文标签:
版权声明:本文标题:How to make doxygen expand macros to include function calls in call graphs, etc., with clang - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741183713a2353962.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论