[cfe-dev] source traversing with clang......

jignesh vasoya jigneshvasoya at gmail.com
Thu Jan 13 05:13:13 PST 2011


Hi,
I want to traverse source code of "C" language.
i want to extract all the "for loops" in given C file. After extraction loop
body i want to visit its body statements.
then i want to extract all the functions one by one in the given source
file.

i want to do these using clang.
what will be better? writing clang-plugin or separate program like whole
program analysis?
i may need to visit each and every statement of the function.

how can i write AST walker that can walk through all the node?
is there any sub type walker for loops and functions only(means that will
visit only loops of functions)?

-- 
*___________________________________________________________________________
*
-----------------------------------------------------------------------------------------------------------------------------
*Jignesh Vasoya
CSE - IIT MADRAS
9962248684*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110113/d6ea8ad3/attachment.html>


More information about the cfe-dev mailing list