Skip to content

Commit 25aa128

Browse files
committed
Fix clang-tidy build.
1 parent 4794062 commit 25aa128

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

clang-tools-extra/clang-tidy/readability/FunctionCognitiveComplexityCheck.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -127,12 +127,12 @@ struct CognitiveComplexity final {
127127
// https://sonarcloud.io/projects?languages=c%2Ccpp&size=5 we can estimate:
128128
// value ~20 would result in no allocs for 98% of functions, ~12 for 96%, ~10
129129
// for 91%, ~8 for 88%, ~6 for 84%, ~4 for 77%, ~2 for 64%, and ~1 for 37%.
130-
static_assert(sizeof(Detail) <= 8,
130+
static_assert(sizeof(Detail) <= 16,
131131
"Since we use SmallVector to minimize the amount of "
132132
"allocations, we also need to consider the price we pay for "
133133
"that in terms of stack usage. "
134134
"Thus, it is good to minimize the size of the Detail struct.");
135-
SmallVector<Detail, DefaultLimit> Details; // 25 elements is 200 bytes.
135+
SmallVector<Detail, DefaultLimit> Details; // 25 elements is 400 bytes.
136136
// Yes, 25 is a magic number. This is the seemingly-sane default for the
137137
// upper limit for function cognitive complexity. Thus it would make sense
138138
// to avoid allocations for any function that does not violate the limit.

0 commit comments

Comments
 (0)