Skip to content

Commit d8cded0

Browse files
committed
fix windows tests
1 parent 2b4699f commit d8cded0

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

clang-tools-extra/test/clang-tidy/checkers/readability/function-size-no-member-init-as-stmts.cpp

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,3 +62,12 @@ struct TemplateD {
6262
// CHECK-MESSAGES: :[[@LINE-6]]:3: warning: function 'TemplateD<T>' exceeds recommended size/complexity thresholds [readability-function-size]
6363
// CHECK-MESSAGES: :[[@LINE-7]]:3: note: 2 lines including whitespace and comments (threshold 0)
6464
// CHECK-MESSAGES: :[[@LINE-8]]:3: note: 1 statements (threshold 0)
65+
66+
void instantiate() {
67+
TemplateC<int> c;
68+
TemplateD<int> d(5);
69+
}
70+
// CHECK-MESSAGES: :[[@LINE-4]]:6: warning: function 'instantiate' exceeds recommended size/complexity thresholds [readability-function-size]
71+
// CHECK-MESSAGES: :[[@LINE-5]]:6: note: 3 lines including whitespace and comments (threshold 0)
72+
// CHECK-MESSAGES: :[[@LINE-6]]:6: note: 2 statements (threshold 0)
73+
// CHECK-MESSAGES: :[[@LINE-7]]:6: note: 2 variables (threshold 1)

clang-tools-extra/test/clang-tidy/checkers/readability/function-size.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -368,4 +368,11 @@ struct TemplateD {
368368
// CHECK-MESSAGES: :[[@LINE-7]]:3: note: 2 lines including whitespace and comments (threshold 0)
369369
// CHECK-MESSAGES: :[[@LINE-8]]:3: note: 2 statements (threshold 0)
370370

371-
371+
void instantiate() {
372+
TemplateC<int> c;
373+
TemplateD<int> d(5);
374+
}
375+
// CHECK-MESSAGES: :[[@LINE-4]]:6: warning: function 'instantiate' exceeds recommended size/complexity thresholds [readability-function-size]
376+
// CHECK-MESSAGES: :[[@LINE-5]]:6: note: 3 lines including whitespace and comments (threshold 0)
377+
// CHECK-MESSAGES: :[[@LINE-6]]:6: note: 2 statements (threshold 0)
378+
// CHECK-MESSAGES: :[[@LINE-7]]:6: note: 2 variables (threshold 1)

0 commit comments

Comments
 (0)