[cfe-dev] Is Clang what I need?

Pedro Delgado Perez pedro.delgadoperez at mail.uca.es
Mon Jan 7 02:44:38 PST 2013


 Hello,
I've just known Clang looking for a soution to the task i need to perform. Well, what I need is to parser a C++ program in order to get some information about the code and, after that, to change the code regarding that information collected.For instance, I would need to know if a certain program contains some arithmetic operators., obtaining a record with the line where the operator is located and which operator is. I've been reading about Clang and now I know you can go through the AST, but i'm not totally sure if it's what I'm looking for because apart from the example I've commented above, I would need a lot of kinds of information:- What are the global and the local variables.- If there is an overriden member when a class inherits from another.- If a method of a class is overloaded.-...I need that information because I have to change the original program once I have the record with the information. For instance, if in the code there is a reference to an overriden member, I have to turn that reference into the hidden member. The other question I have is: is it worth the effort and the time to learn how to use clang? I need an opinion to know how easy or tough is to learn how to use it.I hope you could lend me a hand. Thanks in advance. 

Pedro D.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20130107/630611ac/attachment.html>


More information about the cfe-dev mailing list