Code documentation

Keep your code well-documented with support for the renowned Doxygen format.

Preview the documentation

See the Doxygen documentation preview in the Quick Documentation pop-up Ctrl+Q. Doxygen commands are parsed and aligned in a nice-looking way there in addition to the type information.

If function parameters are documented separately from the function description, CLion will merge all the comments and show you the full function’s signature documentation (just like Doxygen does when generating the output):

Doxygen preview

Rename safely

To keep the documentation correct, use Rename refactoring Shift+F6 to update function name or its parameters. CLion will get the Doxygen comments updated as well as other references:

Rename for Doxygen

Use completion

To help you type quicker CLion comes with auto-completion for Doxygen commands and function parameters:

Doxygen completion

Generate documentation

To add a new Doxygen comment for a function simply generate it. Type /**, /*!, /// or //! and then press Enter. A stub will be generated for you in case your function has parameters, returns a value or throws an exception.

Doxygen comment generation