Skip to content

Commit 02402ee

Browse files
committed
Make simplifyBitfields() a bit more strict
1 parent 4f922f5 commit 02402ee

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

lib/tokenize.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8900,7 +8900,6 @@ void Tokenizer::simplifyBitfields()
89008900
{
89018901
bool goback = false;
89028902
for (Token *tok = list.front(); tok; tok = tok->next()) {
8903-
89048903
if (goback) {
89058904
goback = false;
89068905
tok = tok->previous();
@@ -8925,7 +8924,7 @@ void Tokenizer::simplifyBitfields()
89258924

89268925
last = tok1->next();
89278926
}
8928-
} else if (Token::Match(tok->next(), "const| %type% : %any% ;") &&
8927+
} else if (Token::Match(tok->next(), "const| %type% : %num%|%bool% ;") &&
89298928
tok->next()->str() != "default") {
89308929
const int offset = (tok->next()->str() == "const") ? 1 : 0;
89318930

0 commit comments

Comments
 (0)