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 843e362 commit 8849adcCopy full SHA for 8849adc
clang/lib/Sema/SemaStmt.cpp
@@ -2207,16 +2207,16 @@ namespace {
2207
// Return when there is nothing to check.
2208
if (!Body || !Third) return;
2209
2210
- if (S.Diags.isIgnored(diag::warn_redundant_loop_iteration,
2211
- Third->getBeginLoc()))
2212
- return;
2213
-
2214
// Get the last statement from the loop body.
2215
CompoundStmt *CS = dyn_cast<CompoundStmt>(Body);
2216
if (!CS || CS->body_empty()) return;
2217
Stmt *LastStmt = CS->body_back();
2218
if (!LastStmt) return;
2219
+ if (S.Diags.isIgnored(diag::warn_redundant_loop_iteration,
+ Third->getBeginLoc()))
+ return;
+
2220
bool LoopIncrement, LastIncrement;
2221
DeclRefExpr *LoopDRE, *LastDRE;
2222
0 commit comments