Debian Codegraph @

clang-tools-extra/docs/clang-tidy/checks/readability/named-parameter.rst

raw
1 .. title:: clang-tidy - readability-named-parameter
2
3 readability-named-parameter
4 ===========================
5
6 Find functions with unnamed arguments.
7
8 The check implements the following rule originating in the Google C++ Style
9 Guide:
10
11 https://google.github.io/styleguide/cppguide.html#Function_Declarations_and_Definitions
12
13 All parameters should have the same name in both the function declaration and definition.
14 If a parameter is not utilized, its name can be commented out in a function definition.
15
16 .. code-block:: c++
17
18 int doingSomething(int a, int b, int c);
19
20 int doingSomething(int a, int b, int /*c*/) {
21 // Ok: the third param is not used
22 return a + b;
23 }
24
25 Corresponding cpplint.py check name: `readability/function`.