diff options
| author | Alexander Kornienko <alexfh@google.com> | 2017-03-01 10:17:32 +0000 |
|---|---|---|
| committer | Alexander Kornienko <alexfh@google.com> | 2017-03-01 10:17:32 +0000 |
| commit | 9108644dbf54e4727728ab08c8b7e21bfcd12e8c (patch) | |
| tree | 8c99253407ef37f69e1a8229c42cccfbd08bd2a7 /clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.h | |
| parent | eedf7ec07f40ab17fb8d77ed15ae27a65473856a (diff) | |
| download | bcm5719-llvm-9108644dbf54e4727728ab08c8b7e21bfcd12e8c.tar.gz bcm5719-llvm-9108644dbf54e4727728ab08c8b7e21bfcd12e8c.zip | |
[clang-tidy] Add parametercount for readibility-function-size
Summary:
Add an option to function-size to warn about high parameter counts.
This might be relevant for cppcoreguidelines and the safety module as well. Since the safety module is not landed in master already, i did not create an alias, but that can be done later as well.
Reviewers: sbenza, alexfh, hokein
Reviewed By: alexfh, hokein
Subscribers: JDevlieghere
Patch by Jonas Toth!
Differential Revision: https://reviews.llvm.org/D29561
llvm-svn: 296599
Diffstat (limited to 'clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.h')
| -rw-r--r-- | clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.h b/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.h index ed40330c3cd..905a0d79e84 100644 --- a/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.h +++ b/clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.h @@ -27,6 +27,8 @@ namespace readability { /// macro-heavy code. The default is `800`. /// * `BranchThreshold` - flag functions exceeding this number of control /// statements. The default is `-1` (ignore the number of branches). +/// * `ParameterThreshold` - flag functions having a high number of parameters. +/// The default is `6`. class FunctionSizeCheck : public ClangTidyCheck { public: FunctionSizeCheck(StringRef Name, ClangTidyContext *Context); @@ -39,6 +41,7 @@ private: const unsigned LineThreshold; const unsigned StatementThreshold; const unsigned BranchThreshold; + const unsigned ParameterThreshold; }; } // namespace readability |

