Skip to content

Commit 2172eea

Browse files
committed
[clang-format][NFC] Take a constant conjunct out of a loop condition
1 parent 5b83bd1 commit 2172eea

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

clang/lib/Format/UnwrappedLineParser.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1967,8 +1967,9 @@ void UnwrappedLineParser::parseStructuralElement(
19671967
auto I = Line->Tokens.begin(), E = Line->Tokens.end();
19681968
while (I != E && I->Tok->is(tok::comment))
19691969
++I;
1970-
while (I != E && Style.isVerilog() && I->Tok->is(tok::hash))
1971-
++I;
1970+
if (Style.isVerilog())
1971+
while (I != E && I->Tok->is(tok::hash))
1972+
++I;
19721973
return I != E && (++I == E);
19731974
};
19741975
if (OneTokenSoFar()) {

0 commit comments

Comments
 (0)