Beispiel #1
0
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()));
    }
}
Beispiel #2
0
void RemoveStatement(clang::Rewriter& TheRewriter, clang::CallExpr const * const Statement)
{
    ExpandSourceRange SourceRange{TheRewriter};
    TheRewriter.RemoveText(SourceRange(Statement->getSourceRange()));
}