We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 901e484 commit 47a40e8Copy full SHA for 47a40e8
clang-tools-extra/docs/clang-tidy/checks/readability/named-parameter.rst
@@ -10,7 +10,16 @@ Guide:
10
11
https://google.github.io/styleguide/cppguide.html#Function_Declarations_and_Definitions
12
13
-All parameters should be named, with identical names in the declaration and
14
-implementation.
+All parameters should have the same name in both the function declaration and definition.
+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`.
0 commit comments