CLion
 
Get CLion
Join the CLion 2025.1 Early Access Program and try out new features before they are released! Find out more

Parameter hints for C/C++

Last modified: 26 May 2024

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.