Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
docs/clang-tidy/checks/readability-function-size.rst
Show All 30 Lines | .. option:: ParameterThreshold | ||||
Flag functions that exceed a specified number of parameters. The default | Flag functions that exceed a specified number of parameters. The default | ||||
is `-1` (ignore the number of parameters). | is `-1` (ignore the number of parameters). | ||||
.. option:: NestingThreshold | .. option:: NestingThreshold | ||||
Flag compound statements which create next nesting level after | Flag compound statements which create next nesting level after | ||||
`NestingThreshold`. This may differ significantly from the expected value | `NestingThreshold`. This may differ significantly from the expected value | ||||
for macro-heavy code. The default is `-1` (ignore the nesting level). | for macro-heavy code. The default is `-1` (ignore the nesting level). | ||||
.. option:: VariableThreshold | |||||
Flag functions exceeding this number of variables declared in the body. | |||||
aaron.ballman: This should clarify that parameters do not count as variables declared in the body. | |||||
This gets oh so more interesting with the testcase i added. unsigned ActualNumberParameters = Func->getNumParams(); unsigned BodyVariables = FI.Variables - ActualNumberParameters; lebedev.ri: This gets oh so more interesting with the testcase i added.
I'm not sure whether we actually… | |||||
The default is `-1` (ignore the number of variables). | |||||
Please do note that function parameters are not counted here. | |||||
Also, the variables declared in macros expansion, and in nested lambdas, | |||||
nested classes are not counted. | |||||
aaron.ballmanUnsubmitted I'd combine these into a serial list, like: Please note that function parameters and variables declared in macro expansions, lambdas, and nested class inline functions are not counted. aaron.ballman: I'd combine these into a serial list, like: `Please note that function parameters and variables… |
This should clarify that parameters do not count as variables declared in the body.