28#ifndef LLVM_CLANG_TOOLING_REFACTORINGCALLBACKS_H
29#define LLVM_CLANG_TOOLING_REFACTORINGCALLBACKS_H
56 std::map<std::string, Replacements> &FileToReplaces);
60 MatchFinder.addMatcher(Matcher, Callback);
61 Callbacks.push_back(Callback);
71 std::vector<RefactoringCallback *> Callbacks;
73 std::map<std::string, Replacements> &FileToReplaces;
97 create(StringRef FromId, StringRef ToTemplate);
101 struct TemplateElement {
102 enum { Literal, Identifier }
Type;
105 ReplaceNodeWithTemplate(llvm::StringRef FromId,
106 std::vector<TemplateElement> Template);
108 std::vector<TemplateElement> Template;
133 const bool PickTrueBranch;
The base class of the type hierarchy.
Called when the Match registered for it was successfully found in the AST.
A class to allow finding matches over the Clang AST.
ReplaceIfStmtWithItsBody(StringRef Id, bool PickTrueBranch)
void run(const ast_matchers::MatchFinder::MatchResult &Result) override
Called on every match by the MatchFinder.
ReplaceStmtWithText(StringRef FromId, StringRef ToText)
void run(const ast_matchers::MatchFinder::MatchResult &Result) override
Called on every match by the MatchFinder.
The JSON file list parser is used to communicate input to InstallAPI.
@ Result
The result type of a method or function.
const FunctionProtoType * T
Contains all information for a given match.