clang  6.0.0svn
Static Public Member Functions | List of all members
clang::tooling::ExtractFunction Class Referencefinal

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"

Inheritance diagram for clang::tooling::ExtractFunction:
Inheritance graph
[legend]
Collaboration diagram for clang::tooling::ExtractFunction:
Collaboration graph
[legend]

Static Public Member Functions

static Expected< ExtractFunctioninitiate (RefactoringRuleContext &Context, CodeRangeASTSelection Code, Optional< std::string > DeclName)
 Initiates the extract function refactoring operation. More...
 
static const RefactoringDescriptordescribe ()
 

Additional Inherited Members

- Public Member Functions inherited from clang::tooling::SourceChangeRefactoringRule
void invoke (RefactoringResultConsumer &Consumer, RefactoringRuleContext &Context) final override
 Initiates and performs a specific refactoring action. More...
 
- Public Member Functions inherited from clang::tooling::RefactoringActionRuleBase
virtual ~RefactoringActionRuleBase ()
 

Detailed Description

An "Extract Function" refactoring moves code into a new function that's then called from the place where the original code was.

Definition at line 21 of file Extract.h.

Member Function Documentation

◆ describe()

const RefactoringDescriptor & clang::tooling::ExtractFunction::describe ( )
static

Definition at line 60 of file Extract.cpp.

◆ initiate()

Expected< ExtractFunction > clang::tooling::ExtractFunction::initiate ( RefactoringRuleContext Context,
CodeRangeASTSelection  Code,
Optional< std::string >  DeclName 
)
static

Initiates the extract function refactoring operation.

Parameters
CodeThe selected set of statements.
DeclNameThe name name of the extract function. If None, "extracted" is used.

Definition at line 70 of file Extract.cpp.


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