29 #ifndef LLVM_CLANG_TOOLING_REFACTORINGCALLBACKS_H 30 #define LLVM_CLANG_TOOLING_REFACTORINGCALLBACKS_H 57 std::map<std::string, Replacements> &FileToReplaces);
61 MatchFinder.addMatcher(Matcher, Callback);
62 Callbacks.push_back(Callback);
65 void addDynamicMatcher(
const ast_matchers::internal::DynTypedMatcher &Matcher,
68 std::unique_ptr<ASTConsumer> newASTConsumer();
72 std::vector<RefactoringCallback *> Callbacks;
74 std::map<std::string, Replacements> &FileToReplaces;
98 create(StringRef FromId, StringRef ToTemplate);
102 struct TemplateElement {
103 enum { Literal, Identifier }
Type;
107 std::vector<TemplateElement> Template);
109 std::vector<TemplateElement> Template;
134 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.
const FunctionProtoType * T
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.