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 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:
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:
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 C/C++ checkbox or specific checkboxes in the node.
and clear theIn the editor, right-click a parameter hint and select Disable hints from the context menu.
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:
You can also configure the list of exceptions.
Go to Exclude list.... In the dialog that opens, specify the methods you want to hide the hints for:
and click