Skip to content

Commit 1c05dfb

Browse files
[StaticAnalyzer] Use a range-based for loop (NFC) (#169175)
Identified with modernize-loop-convert.
1 parent c593993 commit 1c05dfb

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

clang/lib/StaticAnalyzer/Checkers/CallAndMessageChecker.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -322,13 +322,12 @@ bool CallAndMessageChecker::PreVisitProcessArg(
322322
else {
323323
os << " (e.g., via the field chain: '";
324324
bool first = true;
325-
for (SmallVectorImpl<const FieldDecl *>::iterator
326-
DI = F.FieldChain.begin(), DE = F.FieldChain.end(); DI!=DE;++DI){
325+
for (const FieldDecl *FD : F.FieldChain) {
327326
if (first)
328327
first = false;
329328
else
330329
os << '.';
331-
os << **DI;
330+
os << *FD;
332331
}
333332
os << "')";
334333
}

0 commit comments

Comments
 (0)