<div dir="ltr">Thank you for quickly answering my question. it seems like the static analysis tool interface is the better way to perform this task. After reading the CFG.cpp and CFG.h I think that building the CFG on my own from the AST can be a big amount of work and a little bit tedious.<br></div><div class="gmail_extra"><br><div class="gmail_quote">2016-05-24 23:36 GMT+02:00 Jonathan Roelofs <span dir="ltr"><<a href="mailto:jonathan@codesourcery.com" target="_blank">jonathan@codesourcery.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class=""><br>
<br>
On 5/24/16 3:33 PM, Alexey Sidorin via cfe-dev wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hello,<br>
<br>
In Clang tools, you can use CFG class (search for CFG.cpp, CFG.h).<br>
However, I'm not sure if it is available with Python bindings.<br>
<br>
<br>
23.05.2016 22:28, shr dev via cfe-dev пишет:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Hi everyone,<br>
<br>
I am trying to build a C static analysis tool and in order to make<br>
some procedures I need to build Control Flow Graphs. I am using clang<br>
</blockquote></blockquote>
<br></span>
There's already a bunch of infrastructure in place for this... are you sure you want to start from scratch? (It uses the CFG infra that Alexey mentioned).<br>
<br>
<a href="http://clang-analyzer.llvm.org/" rel="noreferrer" target="_blank">http://clang-analyzer.llvm.org/</a><br>
<br>
<br>
Jon<div class="HOEnZb"><div class="h5"><br>
<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
for parsing the c files and building the AST, in particular I am<br>
working with python bindings. I was wondering if there is any way to<br>
build and interact with a Control Flow Graph in the same way I can do<br>
it throught the AST with pyhton bindings.<br>
I inspected the files and I realized that with python bindings this is<br>
not possible (maybe I am wrong since I am a little newbie). Maybe<br>
exist another way to do it, can you help me with that?<br>
<br>
Thank you so much, I hope this is the right place for this type of<br>
questions.<br>
<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
</blockquote>
<br>
<br>
<br>
_______________________________________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>
<br>
</blockquote>
<br></div></div><span class="HOEnZb"><font color="#888888">
-- <br>
Jon Roelofs<br>
<a href="mailto:jonathan@codesourcery.com" target="_blank">jonathan@codesourcery.com</a><br>
CodeSourcery / Mentor Embedded<br>
</font></span></blockquote></div><br></div>