clang API Documentation
Replace the text of the statement bound to FromId with the text in ToText.
More...
#include <RefactoringCallbacks.h>


Public Member Functions | |
| ReplaceStmtWithText (StringRef FromId, StringRef ToText) | |
| 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 in ToText.
Definition at line 52 of file RefactoringCallbacks.h.
| clang::tooling::ReplaceStmtWithText::ReplaceStmtWithText | ( | StringRef | FromId, |
| StringRef | ToText | ||
| ) |
Definition at line 37 of file RefactoringCallbacks.cpp.
| void clang::tooling::ReplaceStmtWithText::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 40 of file RefactoringCallbacks.cpp.
References clang::ast_matchers::BoundNodes::getStmtAs(), clang::CharSourceRange::getTokenRange(), clang::ast_matchers::MatchFinder::MatchResult::Nodes, clang::tooling::RefactoringCallback::Replace, and clang::ast_matchers::MatchFinder::MatchResult::SourceManager.