Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Building control flow graph for C/C++ code using CDT

Hi Ridhi,

I don't have a specific answer for you - but you can look in this direction.

Eclipse CDT includes a feature called Codan (Code analysis) that does use/make (not sure which) CFGs to do some of that analysis. There is an example plug-in called org.eclipse.cdt.codan.ui.cfgview which includes a view to visualize the CFG called ControlFlowGraphView that you can look at to see how it gets the CFG and apply that to your own work.

This archived content on the Wiki may be useful too:


Jonah Graham
Kichwa Coders

On Tue, 26 Jul 2022 at 01:33, Ridhi Jain <ridhij@xxxxxxxxxxx> wrote:

I want to build a control flow graph of a C/C++ code snippet. I can get the IASTTranslationUnit and can also visit each node in the AST.  However, I could not find any code to generate a CFG for the same code. Can you please help?

Apologies if you have received multiple copies of this question.

cdt-dev mailing list
To unsubscribe from this list, visit

Back to the top