CLion 2019.1 Help

Use Quick-Fixes

By default, CLion analyses the code in all open files and highlights the detected code issues. You can fix most of the issues immediately by applying quick-fixes. Place the caret at the highlighted piece of code and press Alt+Enter:

If you perform code analysis or execute a single inspection in a larger scope of source files, CLion displays the detected code issues in the Inspection Results Tool Window. When you select a specific issue in this window, its report is shown in the right part of the window.

If there are available fixes to the issue, CLion notifies it in the following ways:

  • The Apply a Quickfix icons actions intentionBulb svg button becomes available on the toolbar of the Inspection Results tool window.

  • The available fixes are shown in the optional Problem resolution field of the report.

  • The available fixes are shown in the context menu of the issue.

If there are no available fixes, the only option is to fix the issue manually.

Fix a problem reported by code inspection

In the Inspection Results Tool Window, select the issue and do one of the following:

  • If CLion suggests any fixes to the issue as described above, you can use one of them to fix the problem immediately:

    quick-fixed for inspection results

    You can also batch-apply quick-fixes for several issues at a time: select the issues, click the bulb icons actions intentionBulb svg button (or press Alt+Enter) and select the resolution to be applied:

    apply quick-fixes in the batch mode

  • If no resolutions are suggested, use the Jump to source command in the context menu and fix the problem manually.

Last modified: 24 July 2019

See Also