We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 83e4eff commit 395da75Copy full SHA for 395da75
clang-tools-extra/clang-tidy/readability/FunctionSizeCheck.cpp
@@ -225,10 +225,12 @@ void FunctionSizeCheck::check(const MatchFinder::MatchResult &Result) {
225
<< ActualNumberParameters << ParameterThreshold.value();
226
}
227
228
- for (const auto &CSPos : FI.NestingThresholders) {
229
- diag(CSPos, "nesting level %0 starts here (threshold %1)",
230
- DiagnosticIDs::Note)
231
- << NestingThreshold.value() + 1 << NestingThreshold.value();
+ if (NestingThreshold) {
+ for (const auto &CSPos : FI.NestingThresholders) {
+ diag(CSPos, "nesting level %0 starts here (threshold %1)",
+ DiagnosticIDs::Note)
232
+ << NestingThreshold.value() + 1 << NestingThreshold.value();
233
+ }
234
235
236
if (VariableThreshold && FI.Variables > VariableThreshold) {
0 commit comments