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 7f34d3a commit ccb6b0dCopy full SHA for ccb6b0d
clang/lib/Sema/SemaStmt.cpp
@@ -2215,16 +2215,16 @@ namespace {
2215
// Return when there is nothing to check.
2216
if (!Body || !Third) return;
2217
2218
- if (S.Diags.isIgnored(diag::warn_redundant_loop_iteration,
2219
- Third->getBeginLoc()))
2220
- return;
2221
-
2222
// Get the last statement from the loop body.
2223
CompoundStmt *CS = dyn_cast<CompoundStmt>(Body);
2224
if (!CS || CS->body_empty()) return;
2225
Stmt *LastStmt = CS->body_back();
2226
if (!LastStmt) return;
2227
+ if (S.Diags.isIgnored(diag::warn_redundant_loop_iteration,
+ Third->getBeginLoc()))
+ return;
+
2228
bool LoopIncrement, LastIncrement;
2229
DeclRefExpr *LoopDRE, *LastDRE;
2230
0 commit comments