Removing entire function definition

Hello,

I need to remove the definition of a function such as this

extern “C” void * func_name() {

}

If I try,

bool VisitFunctionDecl(FunctionDecl * f) {
Rewriter.RemoveText(f->getSourceRange())
}

it only removes void * func_name() { } leaving a dangling extern “C”. How can I get rid of the extern “C” as well?

Thanks,