void RemoveFunction(clang::Rewriter& TheRewriter, const FunctionDecl* F) { ExpandSourceRange SourceRange{TheRewriter}; TheRewriter.RemoveText(SourceRange(F->getSourceRange())); if (FunctionTemplateDecl* D = F->getDescribedFunctionTemplate()) { TheRewriter.RemoveText(SourceRange(D->getSourceRange())); } }
void RemoveStatement(clang::Rewriter& TheRewriter, clang::CallExpr const * const Statement) { ExpandSourceRange SourceRange{TheRewriter}; TheRewriter.RemoveText(SourceRange(Statement->getSourceRange())); }