diff options
author | Alexander Kornienko <alexfh@google.com> | 2014-10-26 01:41:14 +0000 |
---|---|---|
committer | Alexander Kornienko <alexfh@google.com> | 2014-10-26 01:41:14 +0000 |
commit | 2192a8e5193716613bb9d64090a8843f7e5ca7fb (patch) | |
tree | 9d697a594076c9629ae0f9b89a4703317aab77b0 /clang-tools-extra/test/clang-tidy/misc-function-size.cpp | |
parent | f0ba6ce309d9ab412982e71cda9b3981e25625fd (diff) | |
download | bcm5719-llvm-2192a8e5193716613bb9d64090a8843f7e5ca7fb.tar.gz bcm5719-llvm-2192a8e5193716613bb9d64090a8843f7e5ca7fb.zip |
[clang-tidy] Bring order to check registration.
Summary:
Register readability checks in a separate module. Renamed the checks
and test file names accordingly.
Reviewers: djasper, klimek
Reviewed By: klimek
Subscribers: curdeius, cfe-commits
Differential Revision: http://reviews.llvm.org/D5936
llvm-svn: 220631
Diffstat (limited to 'clang-tools-extra/test/clang-tidy/misc-function-size.cpp')
-rw-r--r-- | clang-tools-extra/test/clang-tidy/misc-function-size.cpp | 58 |
1 files changed, 0 insertions, 58 deletions
diff --git a/clang-tools-extra/test/clang-tidy/misc-function-size.cpp b/clang-tools-extra/test/clang-tidy/misc-function-size.cpp deleted file mode 100644 index e0b24215723..00000000000 --- a/clang-tools-extra/test/clang-tidy/misc-function-size.cpp +++ /dev/null @@ -1,58 +0,0 @@ -// RUN: rm -rf %t -// RUN: mkdir -p %t -// RUN: sed 's#// *[A-Z-][A-Z-]*:.*#//#' %s > %t/t.cpp -// RUN: echo '{ Checks: "-*,misc-function-size", CheckOptions: [{key: misc-function-size.LineThreshold, value: 0}, {key: misc-function-size.StatementThreshold, value: 0}, {key: misc-function-size.BranchThreshold, value: 0}]}' > %t/.clang-tidy -// RUN: clang-tidy %t/t.cpp -- -std=c++11 2>&1 | FileCheck %s -implicit-check-not='{{warning:|error:|note:}}' - -void foo1() { -} - -void foo2() {;} -// CHECK: warning: function 'foo2' exceeds recommended size/complexity thresholds -// CHECK: note: 1 statements (threshold 0) - -void foo3() { -; - -} -// CHECK: warning: function 'foo3' exceeds recommended size/complexity thresholds -// CHECK: note: 3 lines including whitespace and comments (threshold 0) -// CHECK: note: 1 statements (threshold 0) - -void foo4(int i) { if (i) {} else; {} -} -// CHECK: warning: function 'foo4' exceeds recommended size/complexity thresholds -// CHECK: note: 1 lines including whitespace and comments (threshold 0) -// CHECK: note: 3 statements (threshold 0) -// CHECK: note: 1 branches (threshold 0) - -void foo5(int i) {for(;i;)while(i) -do;while(i); -} -// CHECK: warning: function 'foo5' exceeds recommended size/complexity thresholds -// CHECK: note: 2 lines including whitespace and comments (threshold 0) -// CHECK: note: 7 statements (threshold 0) -// CHECK: note: 3 branches (threshold 0) - -template <typename T> T foo6(T i) {return i; -} -int x = foo6(0); -// CHECK: warning: function 'foo6' exceeds recommended size/complexity thresholds -// CHECK: note: 1 lines including whitespace and comments (threshold 0) -// CHECK: note: 1 statements (threshold 0) - -void bar1() { [](){;;;;;;;;;;;if(1){}}(); - - -} -// CHECK: warning: function 'bar1' exceeds recommended size/complexity thresholds -// CHECK: note: 3 lines including whitespace and comments (threshold 0) -// CHECK: note: 14 statements (threshold 0) -// CHECK: note: 1 branches (threshold 0) - -void bar2() { class A { void barx() {;;} }; } -// CHECK: warning: function 'bar2' exceeds recommended size/complexity thresholds -// CHECK: note: 3 statements (threshold 0) -// -// CHECK: warning: function 'barx' exceeds recommended size/complexity thresholds -// CHECK: note: 2 statements (threshold 0) |