[cfe-dev] Rewriter: How to rewrite an empty function argument list?

Marcel Schaible via cfe-dev cfe-dev at lists.llvm.org
Sun Jul 30 08:44:00 PDT 2017


Hi everyone,

I am trying to transform function arguments. For functions with a at 
least one argument I can position the Rewriter on the paramdecl.

But if the function has no arguments there is no paramdecl. So how can I 
rewrite the argument list of such a function?

Example:

int foo() { return 42; } transform into int foo(int p1) { return 42;);

Thanks

Marcel




More information about the cfe-dev mailing list