clang 20.0.0git
Public Member Functions | Static Protected Member Functions | List of all members
clang::tooling::detail::TransformerImpl Class Referenceabstract

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

#include "clang/Tooling/Transformer/Transformer.h"

Inheritance diagram for clang::tooling::detail::TransformerImpl:
Inheritance graph
[legend]

Public Member Functions

virtual ~TransformerImpl ()=default
 
void onMatch (const ast_matchers::MatchFinder::MatchResult &Result)
 
virtual std::vector< ast_matchers::internal::DynTypedMatcher > buildMatchers () const =0
 

Static Protected Member Functions

static llvm::Expected< llvm::SmallVector< AtomicChange, 1 > > convertToAtomicChanges (const llvm::SmallVectorImpl< transformer::Edit > &Edits, const ast_matchers::MatchFinder::MatchResult &Result)
 Converts a set of Edit into a AtomicChange per file modified.
 

Detailed Description

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

Definition at line 25 of file Transformer.h.

Constructor & Destructor Documentation

◆ ~TransformerImpl()

virtual clang::tooling::detail::TransformerImpl::~TransformerImpl ( )
virtualdefault

Member Function Documentation

◆ buildMatchers()

virtual std::vector< ast_matchers::internal::DynTypedMatcher > clang::tooling::detail::TransformerImpl::buildMatchers ( ) const
pure virtual

◆ convertToAtomicChanges()

llvm::Expected< llvm::SmallVector< AtomicChange, 1 > > clang::tooling::detail::TransformerImpl::convertToAtomicChanges ( const llvm::SmallVectorImpl< transformer::Edit > &  Edits,
const ast_matchers::MatchFinder::MatchResult Result 
)
staticprotected

Converts a set of Edit into a AtomicChange per file modified.

Returns an error if the edits fail to compose, e.g. overlapping edits.

Definition at line 35 of file Transformer.cpp.

References clang::transformer::AddInclude, ID, Iter, clang::transformer::Range, clang::Result, and clang::T.

◆ onMatch()

void clang::tooling::detail::TransformerImpl::onMatch ( const ast_matchers::MatchFinder::MatchResult Result)

Definition at line 26 of file Transformer.cpp.

References clang::Result.


The documentation for this class was generated from the following files: