Skip to content

Commit 0b4cfbb

Browse files
committed
fix
1 parent 6d73c0a commit 0b4cfbb

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

‎lib/tokenize.cpp‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10414,6 +10414,7 @@ void Tokenizer::simplifyBitfields()
1041410414
while (Token::Match(typeTok, "%name% :: %name%"))
1041510415
typeTok = typeTok->tokAt(2);
1041610416
if (Token::Match(typeTok, "%type% %name% :") &&
10417+
typeTok->str() != "enum" &&
1041710418
!Token::Match(tok->next(), "case|public|protected|private|class|struct") &&
1041810419
!Token::simpleMatch(tok->tokAt(2), "default :")) {
1041910420
Token *tok1 = typeTok->next();
@@ -10422,7 +10423,7 @@ void Tokenizer::simplifyBitfields()
1042210423
tooLargeError(tok1->tokAt(2));
1042310424
if (tok1 && tok1->tokAt(2) &&
1042410425
(Token::Match(tok1->tokAt(2), "%bool%|%num%") ||
10425-
!Token::Match(tok1->tokAt(2), "public|protected|private| %type% ::|<|,|{|;"))) {
10426+
!Token::Match(tok1->tokAt(2), "public|protected|private| %type% ::|<|,|{"))) {
1042610427
while (tok1->next() && !Token::Match(tok1->next(), "[;,)]{}=]")) {
1042710428
if (Token::Match(tok1->next(), "[([]"))
1042810429
Token::eraseTokens(tok1, tok1->linkAt(1));

0 commit comments

Comments
 (0)