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.
2 parents 8a8fee1 + ccb6b0d commit 8cd17bbCopy full SHA for 8cd17bb
clang/lib/Sema/SemaStmt.cpp
@@ -2224,16 +2224,16 @@ namespace {
2224
// Return when there is nothing to check.
2225
if (!Body || !Third) return;
2226
2227
- if (S.Diags.isIgnored(diag::warn_redundant_loop_iteration,
2228
- Third->getBeginLoc()))
2229
- return;
2230
-
2231
// Get the last statement from the loop body.
2232
CompoundStmt *CS = dyn_cast<CompoundStmt>(Body);
2233
if (!CS || CS->body_empty()) return;
2234
Stmt *LastStmt = CS->body_back();
2235
if (!LastStmt) return;
2236
+ if (S.Diags.isIgnored(diag::warn_redundant_loop_iteration,
+ Third->getBeginLoc()))
+ return;
+
2237
bool LoopIncrement, LastIncrement;
2238
DeclRefExpr *LoopDRE, *LastDRE;
2239
0 commit comments