CLion
 
Get CLion
You are viewing the documentation for an earlier version of CLion.

Extract function

Last modified: 11 February 2024

The following demo illustrates the usage of the Extract function refactoring, as well as Extract parameter, Extract lambda parameter, and Live templates:

When the Extract Function refactoring is invoked, CLion analyzes the selected block of code and detects variables that are the input for the selected code fragment and the variables that are output for it.

The detected output variable is used as a return value for the extracted function.