clang 20.0.0git
Public Member Functions | Friends | List of all members
clang::tooling::ASTMatchRefactorer Class Reference

Adaptor between ast_matchers::MatchFinder and tooling::RefactoringTool. More...

#include "clang/Tooling/RefactoringCallbacks.h"

Public Member Functions

 ASTMatchRefactorer (std::map< std::string, Replacements > &FileToReplaces)
 
template<typename T >
void addMatcher (const T &Matcher, RefactoringCallback *Callback)
 
void addDynamicMatcher (const ast_matchers::internal::DynTypedMatcher &Matcher, RefactoringCallback *Callback)
 
std::unique_ptr< ASTConsumernewASTConsumer ()
 

Friends

class RefactoringASTConsumer
 

Detailed Description

Adaptor between ast_matchers::MatchFinder and tooling::RefactoringTool.

Runs AST matchers and stores the tooling::Replacements in a map.

Definition at line 53 of file RefactoringCallbacks.h.

Constructor & Destructor Documentation

◆ ASTMatchRefactorer()

clang::tooling::ASTMatchRefactorer::ASTMatchRefactorer ( std::map< std::string, Replacements > &  FileToReplaces)
explicit

Definition at line 27 of file RefactoringCallbacks.cpp.

Member Function Documentation

◆ addDynamicMatcher()

void clang::tooling::ASTMatchRefactorer::addDynamicMatcher ( const ast_matchers::internal::DynTypedMatcher &  Matcher,
RefactoringCallback Callback 
)

◆ addMatcher()

template<typename T >
void clang::tooling::ASTMatchRefactorer::addMatcher ( const T Matcher,
RefactoringCallback Callback 
)
inline

◆ newASTConsumer()

std::unique_ptr< ASTConsumer > clang::tooling::ASTMatchRefactorer::newASTConsumer ( )

Definition at line 68 of file RefactoringCallbacks.cpp.

Friends And Related Function Documentation

◆ RefactoringASTConsumer

friend class RefactoringASTConsumer
friend

Definition at line 70 of file RefactoringCallbacks.h.


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