CLion
 
Get CLion
Join the CLion 2025.1 Early Access Program and try out new features before they are released! Find out more

TODO comments

Last modified: 22 October 2024

Sometimes, you need to mark parts of your code for future reference: areas of optimization and improvement, possible changes, questions to be discussed, and so on. CLion lets you add special types of comments that are highlighted in the editor, indexed, and listed in the TODO tool window. This way you and your teammates can keep track of issues that require attention.

Example of TODO comment

By default, there are two patterns recognized by CLion: TODO and FIXME in both lower and upper case. These patterns can be used inside line and block comments of any supported file type. You can modify the default patterns or add your own patterns if necessary.

https://resources.jetbrains.com/help/img/idea/2024.3/cl_multiline_todo.png
Gif

You can view all the available TODO items in the TODO tool window (View | Tool Windows | TODO). To jump to the location of the relevant comment in the source code, double-click the corresponding TODO item in the TODO tool window. To automatically jump to the location of the relevant comment every time you select the corresponding TODO item, right-click the TODO tool window header, point to View Options, and select Navigate with Single Click (this option is enabled by default).