[cfe-dev] Removing entire function definition

Divya Muthukumaran via cfe-dev cfe-dev at lists.llvm.org
Fri Jan 22 08:18:45 PST 2016


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,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160122/b4f4f955/attachment.html>


More information about the cfe-dev mailing list