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

Watch this video to learn about parameter hints and type hints on a practical example:

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

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

parameter hints for non-const references

CLion doesn't show parameter hints in the following cases:

  • For initializers, when the argument is used as a designated initializer.

  • If the argument expression is a single name and it matches the parameter name exactly:

    Parameter hints cases
  • For setters and setter-like functions, if what is being set equals the parameter name: set_number(int number).

  • When there is a comment before the parameter, like /*hint*/hint or /*hint=*/hint.

Toggle parameter hints globally

Parameter hints are enabled by default. To hide them, use one of the following options:

  • Go to Settings/Preferences | Editor | Inlay Hints | C/C++/Objective-C and clear the Show parameter hints checkbox or specific checkboxes in the node.

  • In the editor, right-click a parameter hint and select Disable hints from the context menu.

Toggle parameter hints for a method

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 Exclude list... or select Disable Hints for Method ... from the context menu:

    Hints context menu
  2. In the Exclude List dialog, configure the methods for which you don't want to see the hints.

    Parameter hints settings
Last modified: 21 January 2022