CLion 2017.1 Help

Inline

CLion provides the following inline refactorings:

  • Inline Constant. This refactoring is opposite to the Extract Constant refactoring.
  • Inline Define. This refactoring is opposite to the Extract Define refactoring.
  • Inline Typedef. This refactoring is opposite to the Extract Typedef refactoring.
  • Inline Parameter. This refactoring is opposite to the Extract Parameter refactoring.
  • Inline Function. This refactoring is opposite to the Extract Function refactoring.

Inline Function Refactoring Example

BeforeAfter
/help/img/idea/2017.1/cl_inlineFunctionBefore.png
/help/img/idea/2017.1/cl_inlineFunctionAfter.png

To perform the inline refactoring

  1. Place the caret in the editor at the desired symbol to be inlined.
  2. Do one of the following:
    • On the main menu or on the context menu, choose Refactor | Inline.
    • Press Ctrl+Alt+N.
  3. In the Inline dialog box that corresponds to the selected symbol, confirm the inline refactoring or view the selected symbol usages in Find Refactoring Preview.

See Also

Last modified: 19 July 2017