15 #ifndef LLVM_CLANG_TOOLING_REFACTOR_TRANSFORMER_H_ 16 #define LLVM_CLANG_TOOLING_REFACTOR_TRANSFORMER_H_ 23 #include "llvm/ADT/STLExtras.h" 24 #include "llvm/ADT/SmallVector.h" 25 #include "llvm/Support/Error.h" 29 #include <type_traits> 120 ast_matchers::internal::DynTypedMatcher
Matcher;
133 static constexpr llvm::StringLiteral RootID =
"___root___";
146 Edits.emplace_back(std::move(Edit));
147 return makeRule(std::move(M), std::move(Edits), std::move(Explanation));
222 return change(
before(std::move(S)), std::move(Replacement));
228 return change(
after(std::move(S)), std::move(Replacement));
282 std::function<void(Expected<clang::tooling::AtomicChange> Change)>;
290 : Rule(
std::move(Rule)), Consumer(
std::move(Consumer)) {}
308 #endif // LLVM_CLANG_TOOLING_REFACTOR_TRANSFORMER_H_ A class to allow finding matches over the Clang AST.
Represents a character-granular source range.
Contains all information for a given match.
Dataflow Directional Tag Classes.
Defines a combinator library supporting the definition of selectors, which select source ranges based...
Called when the Match registered for it was successfully found in the AST.