[NFCI] Fix set-but-unused warning in UnwrappedLineParser.cpp

This commit is contained in:
Dávid Bolvanský 2022-03-24 08:00:19 +01:00
parent 630ea7e58f
commit 1c13bbdde6
1 changed files with 0 additions and 4 deletions

View File

@ -600,10 +600,8 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) {
do {
// Get next non-comment token.
FormatToken *NextTok;
unsigned ReadTokens = 0;
do {
NextTok = Tokens->getNextToken();
++ReadTokens;
} while (NextTok->is(tok::comment));
switch (Tok->Tok.getKind()) {
@ -643,7 +641,6 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) {
ScopedMacroState MacroState(*Line, Tokens, NextTok);
do {
NextTok = Tokens->getNextToken();
++ReadTokens;
} while (NextTok->isNot(tok::eof));
}
@ -696,7 +693,6 @@ void UnwrappedLineParser::calculateBraceTypes(bool ExpectClassBody) {
// We can have an array subscript after a braced init
// list, but C++11 attributes are expected after blocks.
NextTok = Tokens->getNextToken();
++ReadTokens;
ProbablyBracedList = NextTok->isNot(tok::l_square);
}
}