summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
diff options
context:
space:
mode:
authorBenjamin Kramer <benny.kra@googlemail.com>2014-09-15 12:48:25 +0000
committerBenjamin Kramer <benny.kra@googlemail.com>2014-09-15 12:48:25 +0000
commit6e195426e72282a63f19d0fc448fb1d6730ccd07 (patch)
tree677d16bd904feed3b2a00330397b88690f50ff81 /clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
parent707a2e098dd6b30ebf7d6246360c794296eb0ad9 (diff)
downloadbcm5719-llvm-6e195426e72282a63f19d0fc448fb1d6730ccd07.tar.gz
bcm5719-llvm-6e195426e72282a63f19d0fc448fb1d6730ccd07.zip
[clang-tidy] Add a checker for long functions.
As this is very dependent on the code base it has some ways of configuration. It's possible to pick between 3 modes of operation: - Line counting: number of lines including whitespace and comments - Statement counting: number of statements within compoundStmts. - Branch counter In addition a threshold can be picked, warnings are only emitted when it is met. The thresholds can be configured via a .clang-tidy file. Differential Revision: http://reviews.llvm.org/D4986 llvm-svn: 217768
Diffstat (limited to 'clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp')
-rw-r--r--clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
index 489f5b31dd7..6cfc967fbed 100644
--- a/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
+++ b/clang-tools-extra/clang-tidy/misc/MiscTidyModule.cpp
@@ -12,6 +12,7 @@
#include "../ClangTidyModuleRegistry.h"
#include "ArgumentCommentCheck.h"
#include "BoolPointerImplicitConversion.h"
+#include "FunctionSize.h"
#include "RedundantSmartptrGet.h"
#include "SwappedArgumentsCheck.h"
#include "UndelegatedConstructor.h"
@@ -27,6 +28,7 @@ public:
CheckFactories.registerCheck<ArgumentCommentCheck>("misc-argument-comment");
CheckFactories.registerCheck<BoolPointerImplicitConversion>(
"misc-bool-pointer-implicit-conversion");
+ CheckFactories.registerCheck<FunctionSizeCheck>("misc-function-size");
CheckFactories.registerCheck<RedundantSmartptrGet>(
"misc-redundant-smartptr-get");
CheckFactories.registerCheck<SwappedArgumentsCheck>(
OpenPOWER on IntegriCloud