[cfe-dev] Suggestion on how to accomplish a "function porting"

Marco marco.diiga at gmail.com
Wed May 14 12:59:52 PDT 2014


I'm a newbie with libtooling and I managed to "tweak" a cpp function (let's
call it function1()) through Preprocessor and ASFrontEnd actions. Now the
function is ready and I'd like to have a second cpp function (function2())
which resides into another cpp file, call it.

I'm thinking how I might do this: the solutions I see for now are either
"text-pasting" the entire file which contains function1() right before
function2() (I don't quite like this solution, plus there are no guarantees
that things won't conflict with each other if there's something static) or
find the include directives and types for function1(), insert them right
before function2() and have function2() call function1() through an external
declaration.

Not sure if I explained my tricky goal, if not I'll try to make it simpler.



--
View this message in context: http://clang-developers.42468.n3.nabble.com/Suggestion-on-how-to-accomplish-a-function-porting-tp4039519.html
Sent from the Clang Developers mailing list archive at Nabble.com.



More information about the cfe-dev mailing list