Skip to content

Commit 1d474e4

Browse files
[llvm-cov] Use a range-based for loop (NFC) (#168671)
Identified with modernize-loop-convert.
1 parent 5c73fed commit 1d474e4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/tools/llvm-cov/SourceCoverageViewHTML.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -955,8 +955,8 @@ void SourceCoverageViewHTML::renderLine(raw_ostream &OS, LineRef L,
955955

956956
// 2. Escape all of the snippets.
957957

958-
for (unsigned I = 0, E = Snippets.size(); I < E; ++I)
959-
Snippets[I] = escape(Snippets[I], getOptions());
958+
for (std::string &Snippet : Snippets)
959+
Snippet = escape(Snippet, getOptions());
960960

961961
// 3. Use \p WrappedSegment to set the highlight for snippet 0. Use segment
962962
// 1 to set the highlight for snippet 2, segment 2 to set the highlight for

0 commit comments

Comments
 (0)