28 #ifndef LLVM_CLANG_TOOLING_REFACTORINGCALLBACKS_H 29 #define LLVM_CLANG_TOOLING_REFACTORINGCALLBACKS_H 56 std::map<std::string, Replacements> &FileToReplaces);
61 Callbacks.push_back(Callback);
64 void addDynamicMatcher(
const ast_matchers::internal::DynTypedMatcher &Matcher,
67 std::unique_ptr<ASTConsumer> newASTConsumer();
71 std::vector<RefactoringCallback *> Callbacks;
73 std::map<std::string, Replacements> &FileToReplaces;
97 create(StringRef FromId, StringRef ToTemplate);
101 struct TemplateElement {
106 std::vector<TemplateElement> Template);
108 std::vector<TemplateElement> Template;
133 const bool PickTrueBranch;
A class to allow finding matches over the Clang AST.
Replace an if-statement bound to Id with the outdented text of its body, choosing the consequent or t...
The base class of the type hierarchy.
void addMatcher(const DeclarationMatcher &NodeMatch, MatchCallback *Action)
Adds a matcher to execute when running over the AST.
Contains all information for a given match.
Replace the text of the statement bound to FromId with the text in ToText.
virtual void run(const MatchResult &Result)=0
Called on every match by the MatchFinder.
Dataflow Directional Tag Classes.
std::unique_ptr< DiagnosticConsumer > create(StringRef OutputFile, DiagnosticOptions *Diags, bool MergeChildRecords=false)
Returns a DiagnosticConsumer that serializes diagnostics to a bitcode file.
Called when the Match registered for it was successfully found in the AST.