Skip to content

Commit 179ade6

Browse files
committed
[clang-format] Fix an issue reported by static analyzer
Fixes #79685.
1 parent faf555f commit 179ade6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

clang/lib/Format/WhitespaceManager.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1469,7 +1469,7 @@ WhitespaceManager::CellDescriptions WhitespaceManager::getCells(unsigned Start,
14691469
while (NextNonComment->is(tok::comma))
14701470
NextNonComment = NextNonComment->getNextNonComment();
14711471
auto j = i;
1472-
while (Changes[j].Tok != NextNonComment && j < End)
1472+
while (j < End && Changes[j].Tok != NextNonComment)
14731473
++j;
14741474
if (j < End && Changes[j].NewlinesBefore == 0 &&
14751475
Changes[j].Tok->isNot(tok::r_brace)) {

0 commit comments

Comments
 (0)