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

Unwrap and remove statements

Last modified: 11 February 2024

For C++, this refactoring safely unwraps if...else, for, while, do...while and try...catch control statements, or accurately removes enclosing parts of the nested statements.

Besides C++, the Unwrap/Remove action is available for:

Examples in different languages showing statements unwrapping:

https://resources.jetbrains.com/help/img/idea/2023.3/cl_unwrap_example.png
Gif