[cfe-dev] generate/create a function call dynamically in clang

Eli Bendersky eliben at gmail.com
Sun Oct 31 08:54:41 PDT 2010


Hello,

In some situations, I need to generate a function call on the fly in clang.
For example, whenever I find a reference to some identifier 'myvar', I want
to replace the reference with the call foo(myvar), where 'foo' is a known
function name.

I investigated the code of clang and I see CallExpr represents a function
call, but it requires quite a lot to be created and I'm not sure where to
get that information.just be created. What would be the best way to go about
this?

Thanks in advance.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20101031/e2312b27/attachment.html>


More information about the cfe-dev mailing list