Lines Matching full:transformer

1 //===--- Transformer.cpp - Transformer library implementation ---*- C++ -*-===//
9 #include "clang/Tooling/Transformer/RewriteRule.h"
15 #include "clang/Tooling/Transformer/SourceCode.h"
25 using namespace transformer;
32 const char transformer::RootID[] = "___root___";
34 static Expected<SmallVector<transformer::Edit, 1>>
36 SmallVector<transformer::Edit, 1> Edits; in translateEdits()
52 transformer::Edit T; in translateEdits()
78 EditGenerator transformer::editList(SmallVector<ASTEdit, 1> Edits) { in editList()
84 EditGenerator transformer::edit(ASTEdit Edit) { in edit()
90 EditGenerator transformer::noopEdit(RangeSelector Anchor) { in noopEdit()
92 -> Expected<SmallVector<transformer::Edit, 1>> { in noopEdit()
109 transformer::flattenVector(SmallVector<EditGenerator, 2> Generators) { in flattenVector()
126 ASTEdit transformer::changeTo(RangeSelector Target, TextGenerator Replacement) { in changeTo()
133 ASTEdit transformer::note(RangeSelector Anchor, TextGenerator Note) { in note()
135 E.TargetRange = transformer::before(Anchor); in note()
162 ASTEdit transformer::remove(RangeSelector S) { in remove()
168 case transformer::IncludeFormat::Quoted: in formatHeaderPath()
170 case transformer::IncludeFormat::Angled: in formatHeaderPath()
173 llvm_unreachable("Unknown transformer::IncludeFormat enum"); in formatHeaderPath()
176 ASTEdit transformer::addInclude(RangeSelector Target, StringRef Header, in addInclude()
186 transformer::detail::makeEditGenerator(llvm::SmallVector<ASTEdit, 1> Edits) { in makeEditGenerator()
190 EditGenerator transformer::detail::makeEditGenerator(ASTEdit Edit) { in makeEditGenerator()
194 RewriteRule transformer::detail::makeRule(DynTypedMatcher M, in makeRule()
201 RewriteRule transformer::makeRule(ast_matchers::internal::DynTypedMatcher M, in makeRule()
275 for (auto &Matcher : transformer::detail::buildMatchers(Rule)) in registerMatchers()
282 size_t I = transformer::detail::findSelectedCase(Result, Rule); in run()
299 llvm::Expected<SmallVector<clang::transformer::Edit, 1>>
309 llvm::Expected<SmallVector<clang::transformer::Edit, 1>>
310 transformer::detail::rewriteDescendants(const Decl &Node, RewriteRule Rule, in rewriteDescendants()
315 llvm::Expected<SmallVector<clang::transformer::Edit, 1>>
316 transformer::detail::rewriteDescendants(const Stmt &Node, RewriteRule Rule, in rewriteDescendants()
321 llvm::Expected<SmallVector<clang::transformer::Edit, 1>>
322 transformer::detail::rewriteDescendants(const TypeLoc &Node, RewriteRule Rule, in rewriteDescendants()
327 llvm::Expected<SmallVector<clang::transformer::Edit, 1>>
328 transformer::detail::rewriteDescendants(const DynTypedNode &DNode, in rewriteDescendants()
344 EditGenerator transformer::rewriteDescendants(std::string NodeId, in rewriteDescendants()
348 -> llvm::Expected<SmallVector<clang::transformer::Edit, 1>> { in rewriteDescendants()
359 void transformer::addInclude(RewriteRuleBase &Rule, StringRef Header, in addInclude()
402 transformer::applyFirst(ArrayRef<RewriteRuleWith<void>> Rules) { in applyFirst()
410 transformer::detail::buildMatchers(const RewriteRuleBase &Rule) { in buildMatchers()
442 DynTypedMatcher transformer::detail::buildMatcher(const RewriteRuleBase &Rule) { in buildMatcher()
448 SourceLocation transformer::detail::getRuleMatchLoc(const MatchResult &Result) { in getRuleMatchLoc()
465 size_t transformer::detail::findSelectedCase(const MatchResult &Result, in findSelectedCase()