clang 19.0.0git
Public Member Functions | List of all members
clang::tooling::ReplaceStmtWithStmt Class Reference

Replace the text of the statement bound to FromId with the text of the statement bound to ToId. More...

#include "clang/Tooling/RefactoringCallbacks.h"

Inheritance diagram for clang::tooling::ReplaceStmtWithStmt:
Inheritance graph
[legend]

Public Member Functions

 ReplaceStmtWithStmt (StringRef FromId, StringRef ToId)
 
void run (const ast_matchers::MatchFinder::MatchResult &Result) override
 Called on every match by the MatchFinder.
 
- Public Member Functions inherited from clang::tooling::RefactoringCallback
 RefactoringCallback ()
 
ReplacementsgetReplacements ()
 
- Public Member Functions inherited from clang::ast_matchers::MatchFinder::MatchCallback
virtual ~MatchCallback ()
 
virtual void run (const MatchResult &Result)=0
 Called on every match by the MatchFinder.
 
virtual void onStartOfTranslationUnit ()
 Called at the start of each translation unit.
 
virtual void onEndOfTranslationUnit ()
 Called at the end of each translation unit.
 
virtual StringRef getID () const
 An id used to group the matchers.
 
virtual std::optional< TraversalKindgetCheckTraversalKind () const
 TraversalKind to use while matching and processing the result nodes.
 

Additional Inherited Members

- Protected Attributes inherited from clang::tooling::RefactoringCallback
Replacements Replace
 

Detailed Description

Replace the text of the statement bound to FromId with the text of the statement bound to ToId.

Definition at line 113 of file RefactoringCallbacks.h.

Constructor & Destructor Documentation

◆ ReplaceStmtWithStmt()

clang::tooling::ReplaceStmtWithStmt::ReplaceStmtWithStmt ( StringRef  FromId,
StringRef  ToId 
)

Definition at line 103 of file RefactoringCallbacks.cpp.

Member Function Documentation

◆ run()

void clang::tooling::ReplaceStmtWithStmt::run ( const ast_matchers::MatchFinder::MatchResult Result)
overridevirtual

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