CLion 2021.2 Help

Parameter hints

Parameter hints show the names of function parameters for the passed arguments. CLion displays them in the editor inlined with your code to improve its readability:

parameter hints

Parameter hints can help you understand a function call without exploring the function signature (which you can do with the Parameter Info tooltip or by navigating to the function declaration).

Parameter hints are displayed for argument literals and expressions with more than one operand: function calls, lambdas, initializer lists, macro expressions, and constructors (including the constructors invoked through emplace_back -like functions). Hints for initializers are not shown when the argument is used as a designated initializer.

Arguments passed by non-const reference show the hint &: to indicate the fact they can be modified:

parameter hints for non-const references

Hide and toggle parameter hints

The hints are enabled by default. To hide them, go to Settings/Preferences | Editor | Inlay Hints | C/C++/Objective-C and clear the Show parameter names hints checkbox.

You can assign a shortcut to quickly toggle the hints on and off. Go to Settings/Preferences | Keymap, search for hints, and add a shortcut for the Toggle parameter name hints action:

add a shortcut for toggling parameter hints

    Configure parameter hints

    To hide parameter hints for particular cases, configure the list of exceptions.

    1. Go to Settings/Preferences | Editor | Inlay Hints | C/C++/Objective-C and click Black list....

      parameter hints settings
    2. Add methods for which you don't want to see the hints.

    You can also adjust the hints settings right from the editor:

    • Press Alt+Enter on a hint to quickly disable it for the current function.

      quick fix to disable hints for a function
    • Right-click a hint and select from the list of options.

      context menu for parameter hints

    Last modified: 24 September 2021