I believe that you can get the location of ‘(’/‘)’ and insert a new parameter after/before that location. The locations of braces should be in the FunctionTypeLoc which you can extract from the TypeLoc value returned by calling ((FunctionDecl *)YourFunction)->getTypeSourceInfo->getTypeLoc();
Once you get the TypeLoc of the function, you can try casting it to function type loc using getAsAdjusted. Here’s a snipped from SemaDecl that emits a warning using the location of the ‘(’: