Code documentation

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

Doxygen preview

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).

Rename for Doxygen

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.

Doxygen completion

Use completion

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

Doxygen comment generation

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.

Quick Doc

Quick Documentation

Quick Documentation popup (Ctrl+Q) is a universal tool to help you get more information on a code element at the caret. By default, CLion shows quick documentation in a popup on mouseover automatically. Depending on the element you invoke it for, the popup can include:
  • Function signature details.
  • Code documentation (either regular or Doxygen comments).
  • Inferred types, which is especially valuable for modern C++ that might lack explicit types.
  • The size of the type.
  • Macro replacements to help you better understand and debug nested macros.
  • Values of constant expressions.
  • Enum value as an integer.