Delete a parameter of a FunctionDecl

I want to modify the parameters of a FunctionDecl at AST level. In
particular, I want to remove a specific parameter of a function. What is the
most convenient way to do this? I realized that in FunctionDecl class there
is no functionality to change the parameter number..

Thank you and forgive me being newbie

I want to modify the parameters of a FunctionDecl at AST level. In
particular, I want to remove a specific parameter of a function. What is the
most convenient way to do this? I realized that in FunctionDecl class there
is no functionality to change the parameter number..

The AST isn't exactly designed to be mutable. Why do you want to do this?

I'm trying to write a simple source to source translator. At some point of
time, I visit a function and translate it into another language, but this
language does not support some parameter. For now I tell the
printer(DeclPrinter) not to print it, and in some case, where an parameter
needs to be replaced by another, I also use printer to print the proper
string. But I guess there must be a way alternate the AST directly.

Generally, the way we suggest performing source-to-source translation
is using the rewriter: instead of modifying the AST, just write out
the changes you want directly to the output file. The AST is not
designed to be modified in the way you are attempting.

-Eli