[cfe-dev] Clang to flowchart

Brendan Simon (eTRIX) brendan.simon at etrix.com.au
Sun Nov 14 02:28:17 PST 2010


>> > I want to produce some flowcharts and workflows from a complex
>> > multit-hreaded C++ codebase.
>> > 
>> > I was thinking that gcc-xml might be useful so I asked on the mailing
>> > list, and they suggested that Clang might be a useful option.
>> > 
>> > Are there any tools based on Clang that can produce flowcharts/workflows
>> > so I can get a better picture of how the complex multit-hreaded C++
>> > operates ??
> Internally, Clang has the facilities to build a control-flow graph. You could build on top of that.
>
>> > Is there suitable output from Clang about all the function calls, etc
>> > (e.g. in xml format) that can be used to generate UML or flowcharts or
>> > other documents ??
> Clang has an XML format, but it's not rich enough to be useful for this purpose.

I'm not familiar with the Clang codebase at all, so if someone could
point me to the parts of the code that would be a starting point to
build a control-flow graph then that be a great benefit.

If anyone has any ideas for on implementation for such a feature I would
also be keen to hear them.

Cheers, Brendan.




More information about the cfe-dev mailing list