CLion 2022.1 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 | Parameter names and clear the C/C++ checkbox or specific checkboxes in the node.

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

    Disable parameter hints in the editor

Toggle parameter hints for a function/method

To hide parameter hints for particular cases, do one of the following:

  • In the editor, select Disable Hints for... from the context menu:

    Hints context menu
  • You can also configure the list of exceptions.

    Go to Settings/Preferences | Editor | Inlay Hints | Parameter names | C/C++ and click Exclude list.... In the dialog that opens, specify the methods you want to hide the hints for:

    Parameter hints settings
Last modified: 25 July 2022