CLion 2017.3 Help

Inline

Introduction

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
cl inlineFunctionBefore
cl inlineFunctionAfter

Performing 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.
Last modified: 15 December 2017

See Also