clang API Documentation
Replace the text of the statement bound to FromId
with the text of the statement bound to ToId
.
More...
#include <RefactoringCallbacks.h>
Public Member Functions | |
ReplaceStmtWithStmt (StringRef FromId, StringRef ToId) | |
void | run (const ast_matchers::MatchFinder::MatchResult &Result) override |
Called on every match by the MatchFinder . |
Replace the text of the statement bound to FromId
with the text of the statement bound to ToId
.
Definition at line 64 of file RefactoringCallbacks.h.
clang::tooling::ReplaceStmtWithStmt::ReplaceStmtWithStmt | ( | StringRef | FromId, |
StringRef | ToId | ||
) |
Definition at line 50 of file RefactoringCallbacks.cpp.
void clang::tooling::ReplaceStmtWithStmt::run | ( | const ast_matchers::MatchFinder::MatchResult & | Result | ) | [override, virtual] |
Called on every match by the MatchFinder
.
Implements clang::ast_matchers::MatchFinder::MatchCallback.
Definition at line 53 of file RefactoringCallbacks.cpp.
References clang::ast_matchers::BoundNodes::getStmtAs(), clang::ast_matchers::MatchFinder::MatchResult::Nodes, clang::tooling::RefactoringCallback::Replace, clang::tooling::replaceStmtWithStmt(), and clang::ast_matchers::MatchFinder::MatchResult::SourceManager.