clang 20.0.0git
|
An "Extract Function" refactoring moves code into a new function that's then called from the place where the original code was. More...
#include "clang/Tooling/Refactoring/Extract/Extract.h"
Static Public Member Functions | |
static Expected< ExtractFunction > | initiate (RefactoringRuleContext &Context, CodeRangeASTSelection Code, std::optional< std::string > DeclName) |
Initiates the extract function refactoring operation. | |
static const RefactoringDescriptor & | describe () |
Additional Inherited Members | |
Public Member Functions inherited from clang::tooling::SourceChangeRefactoringRule | |
void | invoke (RefactoringResultConsumer &Consumer, RefactoringRuleContext &Context) final |
Initiates and performs a specific refactoring action. | |
Public Member Functions inherited from clang::tooling::RefactoringActionRuleBase | |
virtual | ~RefactoringActionRuleBase () |
virtual void | invoke (RefactoringResultConsumer &Consumer, RefactoringRuleContext &Context)=0 |
Initiates and performs a specific refactoring action. | |
An "Extract Function" refactoring moves code into a new function that's then called from the place where the original code was.
|
static |
Definition at line 60 of file Extract.cpp.
|
static |
Initiates the extract function refactoring operation.
Code | The selected set of statements. |
DeclName | The name of the extract function. If None, "extracted" is used. |
Definition at line 70 of file Extract.cpp.
References clang::tooling::CodeRangeASTSelection::isInFunctionLikeBodyOfCode(), and clang::tooling::CodeRangeASTSelection::size().