class TransformerImpl

Declaration

class TransformerImpl { /* full declaration omitted */ };

Description

Implementation details of \c Transformer with type erasure around\c RewriteRule<T> as well as the corresponding consumers.

Declared at: clang/include/clang/Tooling/Transformer/Transformer.h:25

Method Overview

  • public virtual std::vector<ast_matchers::internal::DynTypedMatcher> buildMatchers() const
  • protected static llvm::Expected<llvm::SmallVector<AtomicChange, 1>> convertToAtomicChanges(const llvm::SmallVectorImpl<transformer::Edit> & Edits, const ast_matchers::MatchFinder::MatchResult & Result)
  • public void onMatch(const ast_matchers::MatchFinder::MatchResult & Result)
  • private virtual void onMatchImpl(const ast_matchers::MatchFinder::MatchResult & Result)
  • public virtual ~TransformerImpl()

Methods

virtual std::vector<
    ast_matchers::internal::DynTypedMatcher>
buildMatchers() const

Declared at: clang/include/clang/Tooling/Transformer/Transformer.h:32

static llvm::Expected<
    llvm::SmallVector<AtomicChange, 1>>
convertToAtomicChanges(
    const llvm::SmallVectorImpl<
        transformer::Edit>& Edits,
    const ast_matchers::MatchFinder::MatchResult&
        Result)

Description

Converts a set of \c Edit into a \c AtomicChange per file modified. Returns an error if the edits fail to compose, e.g. overlapping edits.

Declared at: clang/include/clang/Tooling/Transformer/Transformer.h:38

Parameters

const llvm::SmallVectorImpl<transformer::Edit>& Edits
const ast_matchers::MatchFinder::MatchResult& Result

void onMatch(
    const ast_matchers::MatchFinder::MatchResult&
        Result)

Declared at: clang/include/clang/Tooling/Transformer/Transformer.h:29

Parameters

const ast_matchers::MatchFinder::MatchResult& Result

virtual void onMatchImpl(
    const ast_matchers::MatchFinder::MatchResult&
        Result)

Declared at: clang/include/clang/Tooling/Transformer/Transformer.h:43

Parameters

const ast_matchers::MatchFinder::MatchResult& Result

virtual ~TransformerImpl()

Declared at: clang/include/clang/Tooling/Transformer/Transformer.h:27